Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
onlyoffice_core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
onlyoffice_core
Commits
f5b141ee
Commit
f5b141ee
authored
May 19, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
1e47dc11
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
66 additions
and
36 deletions
+66
-36
ASCOfficeOdfFile/src/docx/pptx_output_xml.cpp
ASCOfficeOdfFile/src/docx/pptx_output_xml.cpp
+10
-6
ASCOfficeOdfFile/src/odf/anim_elements.cpp
ASCOfficeOdfFile/src/odf/anim_elements.cpp
+3
-3
ASCOfficeOdfFile/src/odf/datatypes/clockvalue.cpp
ASCOfficeOdfFile/src/odf/datatypes/clockvalue.cpp
+45
-25
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.cpp
+7
-1
X2tConverter/build/Qt/X2tConverter.pri
X2tConverter/build/Qt/X2tConverter.pri
+1
-1
No files found.
ASCOfficeOdfFile/src/docx/pptx_output_xml.cpp
View file @
f5b141ee
...
...
@@ -273,7 +273,7 @@ void pptx_xml_slideMaster::write_to(std::wostream & strm)
CP_XML_ATTR
(
L"accent6"
,
L"accent6"
);
CP_XML_ATTR
(
L"accent5"
,
L"accent5"
);
CP_XML_ATTR
(
L"accent4"
,
L"accent4"
);
CP_XML_ATTR
(
L"accent3"
,
L"accent
5
"
);
CP_XML_ATTR
(
L"accent3"
,
L"accent
3
"
);
CP_XML_ATTR
(
L"accent2"
,
L"accent2"
);
CP_XML_ATTR
(
L"accent1"
,
L"accent1"
);
CP_XML_ATTR
(
L"tx2"
,
L"dk2"
);
...
...
@@ -283,7 +283,7 @@ void pptx_xml_slideMaster::write_to(std::wostream & strm)
}
CP_XML_NODE
(
L"p:sldLayoutIdLst"
)
{
for
(
in
t
i
=
0
;
i
<
layoutsId_
.
size
();
i
++
)
for
(
size_
t
i
=
0
;
i
<
layoutsId_
.
size
();
i
++
)
{
CP_XML_NODE
(
L"p:sldLayoutId"
)
{
...
...
@@ -420,10 +420,14 @@ void pptx_xml_presentation::write_to(std::wostream & strm)
{
CP_XML_STREAM
()
<<
slideMastersData_
.
str
();
}
CP_XML_NODE
(
L"p:notesMasterIdLst"
)
{
CP_XML_STREAM
()
<<
slideNotesMastersData_
.
str
();
}
std
::
wstring
notesMaster
=
slideNotesMastersData_
.
str
();
if
(
notesMaster
.
empty
()
==
false
)
{
CP_XML_NODE
(
L"p:notesMasterIdLst"
)
{
CP_XML_STREAM
()
<<
notesMaster
;
}
}
CP_XML_NODE
(
L"p:sldIdLst"
)
{
CP_XML_STREAM
()
<<
slidesData_
.
str
();
...
...
ASCOfficeOdfFile/src/odf/anim_elements.cpp
View file @
f5b141ee
...
...
@@ -303,15 +303,15 @@ void anim_transitionFilter::pptx_convert(oox::pptx_conversion_context & Context)
if
(
filter_attlist_
.
smil_subtype_
.
get
()
==
L"fromTop"
)
dir
=
L"d"
;
else
if
(
filter_attlist_
.
smil_subtype_
.
get
()
==
L"fromLeft"
)
dir
=
L"r"
;
else
if
(
filter_attlist_
.
smil_subtype_
.
get
()
==
L"fromRight"
)
dir
=
L"l"
;
else
if
(
filter_attlist_
.
smil_subtype_
.
get
()
==
L"fromBottom"
)
dir
=
L"u"
;
else
if
(
filter_attlist_
.
smil_subtype_
.
get
()
==
L"fromBottom"
)
dir
=
L"u"
;
else
if
(
filter_attlist_
.
smil_subtype_
.
get
()
==
L"topRight"
)
dir
=
L"ld"
;
else
if
(
filter_attlist_
.
smil_subtype_
.
get
()
==
L"bottomLeft"
)
dir
=
L"lu"
;
else
if
(
filter_attlist_
.
smil_subtype_
.
get
()
==
L"bottomLeft"
)
dir
=
L"lu"
;
else
if
(
filter_attlist_
.
smil_subtype_
.
get
()
==
L"bottomRight"
)
dir
=
L"ru"
;
else
if
(
filter_attlist_
.
smil_subtype_
.
get
()
==
L"topLeft"
)
dir
=
L"rd"
;
else
if
(
filter_attlist_
.
smil_subtype_
.
get
()
==
L"fromTopLeft"
)
dir
=
L"rd"
;
else
if
(
filter_attlist_
.
smil_subtype_
.
get
()
==
L"fromBottomLeft"
)
dir
=
L"ru"
;
else
if
(
filter_attlist_
.
smil_subtype_
.
get
()
==
L"fromBottomLeft"
)
dir
=
L"ru"
;
else
if
(
filter_attlist_
.
smil_subtype_
.
get
()
==
L"fromTopRight"
)
dir
=
L"ld"
;
else
if
(
filter_attlist_
.
smil_subtype_
.
get
()
==
L"fromBottomRight"
)
dir
=
L"lu"
;
...
...
ASCOfficeOdfFile/src/odf/datatypes/clockvalue.cpp
View file @
f5b141ee
...
...
@@ -84,22 +84,22 @@ std::wostream & operator << (std::wostream & _Wostream, const clockvalue & _Val)
return
_Wostream
;
}
static
bool
parseTime
(
const
std
::
wstring
&
Time
,
double
&
Hours
,
double
&
Minutes
,
double
&
Seconds
,
int
&
Ms
)
bool
parseTime
(
std
::
wstring
Time
,
double
&
Hours
,
double
&
Minutes
,
double
&
Seconds
,
int
&
Ms
)
{
try
{
boost
::
match_results
<
std
::
wstring
::
const_iterator
>
res
;
//Full clock values:
// 02:30:03 = 2 hours, 30 minutes and 3 seconds
// 50:00:10.25 = 50 hours, 10 seconds and 250 milliseconds
boost
::
match_results
<
std
::
wstring
::
const_iterator
>
res1
;
boost
::
wregex
r1
(
L"([
\\
d]+):([
\\
d]+):([
\\
d+(
\\
.
\\
d{0,})?]+)"
);
if
(
boost
::
regex_match
(
Time
,
res
,
r1
))
if
(
boost
::
regex_match
(
Time
,
res
1
,
r1
))
{
Hours
=
boost
::
lexical_cast
<
int
>
(
res
[
1
].
str
());
Minutes
=
boost
::
lexical_cast
<
int
>
(
res
[
2
].
str
());
Seconds
=
boost
::
lexical_cast
<
double
>
(
res
[
3
].
str
());
Hours
=
boost
::
lexical_cast
<
int
>
(
res
1
[
1
].
str
());
Minutes
=
boost
::
lexical_cast
<
int
>
(
res
1
[
2
].
str
());
Seconds
=
boost
::
lexical_cast
<
double
>
(
res
1
[
3
].
str
());
return
true
;
}
...
...
@@ -107,11 +107,12 @@ static bool parseTime(const std::wstring & Time, double & Hours, double & Minute
// 02:33 = 2 minutes and 33 seconds
// 00:10.5 = 10.5 seconds = 10 seconds and 500 milliseconds
std
::
wstring
Time2
=
L"00:10.5"
;
boost
::
match_results
<
std
::
wstring
::
const_iterator
>
res2
;
boost
::
wregex
r2
(
L"([
\\
d]+):([
\\
d+(
\\
.
\\
d{0,})?]+)"
);
if
(
boost
::
regex_match
(
Time
,
res
,
r2
))
if
(
boost
::
regex_match
(
Time
,
res
2
,
r2
))
{
Minutes
=
boost
::
lexical_cast
<
int
>
(
res
[
1
].
str
());
Seconds
=
boost
::
lexical_cast
<
double
>
(
res
[
2
].
str
());
Minutes
=
boost
::
lexical_cast
<
int
>
(
res
2
[
1
].
str
());
Seconds
=
boost
::
lexical_cast
<
double
>
(
res
2
[
2
].
str
());
return
true
;
}
...
...
@@ -121,32 +122,51 @@ static bool parseTime(const std::wstring & Time, double & Hours, double & Minute
// 30s = 30 seconds
// 5ms = 5 milliseconds
// 12.467 = 12 seconds and 467 milliseconds
boost
::
wregex
r3
(
L"([
\\
d+(
\\
.
\\
d{0,})?]+)([A-Za-z]{0,})"
);
if
(
boost
::
regex_match
(
Time
,
res
,
r3
))
{
if
(
!
res
[
2
].
str
().
empty
())
std
::
vector
<
std
::
wstring
>
values
;
boost
::
wregex
r3
(
L"([
\\
d+(
\\
.
\\
d{0,})?]+)([A-Za-z]+)"
);
if
(
boost
::
regex_split
(
std
::
back_inserter
(
values
),
Time
,
r3
,
boost
::
match_default
|
boost
::
format_all
))
{
int
val
=
-
1
;
for
(
size_t
i
=
0
;
i
<
values
.
size
()
;
i
++
)
{
std
::
wstring
n
=
res
[
2
].
str
();
std
::
transform
(
n
.
begin
(),
n
.
end
(),
n
.
begin
(),
::
tolower
);
if
(
n
==
L"h"
)
if
(
values
[
i
].
empty
())
continue
;
if
(
values
[
i
]
==
L"h"
)
{
if
(
val
>=
0
)
Hours
=
val
;
val
=
-
1
;
}
else
if
(
values
[
i
]
==
L"min"
)
{
Hours
=
boost
::
lexical_cast
<
double
>
(
res
[
1
].
str
());
if
(
val
>=
0
)
Minutes
=
val
;
val
=
-
1
;
}
else
if
(
n
==
L"min
"
)
else
if
(
values
[
i
]
==
L"s
"
)
{
Minutes
=
boost
::
lexical_cast
<
double
>
(
res
[
1
].
str
());
if
(
val
>=
0
)
Seconds
=
val
;
val
=
-
1
;
}
else
if
(
n
==
L"
s"
)
else
if
(
values
[
i
]
==
L"m
s"
)
{
Seconds
=
boost
::
lexical_cast
<
double
>
(
res
[
1
].
str
());
if
(
val
>=
0
)
Ms
=
val
;
val
=
-
1
;
}
else
if
(
n
==
L"ms"
)
else
{
Ms
=
boost
::
lexical_cast
<
int
>
(
res
[
1
].
str
());
try
{
val
=
boost
::
lexical_cast
<
double
>
(
values
[
i
]);
}
catch
(...)
{
continue
;
}
}
}
else
Seconds
=
boost
::
lexical_cast
<
double
>
(
res
[
1
].
str
());
return
true
;
}
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.cpp
View file @
f5b141ee
...
...
@@ -653,6 +653,11 @@ void PptxConverter::convert(PPTX::Logic::EmptyTransition *oox_transition)
odp_context
->
current_slide
().
set_transition_type
(
20
);
//miscShapeWipe
odp_context
->
current_slide
().
set_transition_subtype
(
L"cornersOut"
);
}
else
if
(
oox_transition
->
name
==
L"switch"
)
{
odp_context
->
current_slide
().
set_transition_type
(
20
);
//miscShapeWipe
odp_context
->
current_slide
().
set_transition_subtype
(
L"topToBottom"
);
}
else
{
odp_context
->
current_slide
().
set_transition_type
(
36
);
//fade
...
...
@@ -772,7 +777,8 @@ void PptxConverter::convert(PPTX::Logic::SplitTransition *oox_transition)
{
if
(
!
oox_transition
)
return
;
//name == split
odp_context
->
current_slide
().
set_transition_type
(
8
);
odp_context
->
current_slide
().
set_transition_type
(
3
);
odp_context
->
current_slide
().
set_transition_subtype
(
L"vertical"
);
}
void
PptxConverter
::
convert
(
PPTX
::
Logic
::
ZoomTransition
*
oox_transition
)
{
...
...
X2tConverter/build/Qt/X2tConverter.pri
View file @
f5b141ee
...
...
@@ -7,7 +7,7 @@
QT -= core
QT -= gui
VERSION = 2.4.4
56
.0
VERSION = 2.4.4
60
.0
DEFINES += INTVER=$$VERSION
TARGET = x2t
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment