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
7ae68b53
Commit
7ae68b53
authored
Nov 29, 2016
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OdfFormatReader - fix same small bags
parent
57bd7a0d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
64 additions
and
50 deletions
+64
-50
ASCOfficeOdfFile/src/odf/style_paragraph_properties_pptx.cpp
ASCOfficeOdfFile/src/odf/style_paragraph_properties_pptx.cpp
+20
-20
ASCOfficeOdfFile/src/odf/style_text_properties.cpp
ASCOfficeOdfFile/src/odf/style_text_properties.cpp
+25
-14
ASCOfficeOdfFile/src/odf/styles.cpp
ASCOfficeOdfFile/src/odf/styles.cpp
+19
-16
No files found.
ASCOfficeOdfFile/src/odf/style_paragraph_properties_pptx.cpp
View file @
7ae68b53
...
...
@@ -276,25 +276,6 @@ void paragraph_format_properties::pptx_convert(oox::pptx_conversion_context & Co
{
std
::
wstringstream
&
_pPr
=
Context
.
get_text_context
().
get_styles_context
().
paragraph_attr
();
//сначала аттрибуты к самому pPr или defPPr
if
(
fo_text_align_
)
{
std
::
wstring
jc
;
switch
(
fo_text_align_
->
get_type
())
{
case
text_align
:
:
Start
:
case
text_align
:
:
Left
:
jc
=
L"l"
;
break
;
case
text_align
:
:
End
:
case
text_align
:
:
Right
:
jc
=
L"r"
;
break
;
case
text_align
:
:
Center
:
jc
=
L"ctr"
;
break
;
case
text_align
:
:
Justify
:
jc
=
L"just"
;
break
;
}
if
(
jc
.
length
()
>
0
)
_pPr
<<
L"algn=
\"
"
<<
jc
<<
"
\"
"
;
}
if
(
fo_margin_left_
||
fo_margin_right_
||
fo_text_indent_
)
{
// TODO auto indent
...
...
@@ -315,6 +296,26 @@ void paragraph_format_properties::pptx_convert(oox::pptx_conversion_context & Co
if
(
!
w_firstLine
.
empty
())
_pPr
<<
L"indent=
\"
"
<<
w_firstLine
<<
"
\"
"
;
}
if
(
fo_text_align_
)
{
std
::
wstring
jc
;
switch
(
fo_text_align_
->
get_type
())
{
case
text_align
:
:
Start
:
case
text_align
:
:
Left
:
jc
=
L"l"
;
break
;
case
text_align
:
:
End
:
case
text_align
:
:
Right
:
jc
=
L"r"
;
break
;
case
text_align
:
:
Center
:
jc
=
L"ctr"
;
break
;
case
text_align
:
:
Justify
:
jc
=
L"just"
;
break
;
}
if
(
jc
.
length
()
>
0
)
_pPr
<<
L"algn=
\"
"
<<
jc
<<
"
\"
"
;
}
if
(
style_vertical_align_
)
{
std
::
wstring
w_val
;
...
...
@@ -329,7 +330,6 @@ void paragraph_format_properties::pptx_convert(oox::pptx_conversion_context & Co
if
(
!
w_val
.
empty
())
_pPr
<<
L"fontAlgn=
\"
"
<<
w_val
<<
"
\"
"
;
}
//if (style_writing_mode_)
//{
...
...
ASCOfficeOdfFile/src/odf/style_text_properties.cpp
View file @
7ae68b53
...
...
@@ -343,6 +343,17 @@ void text_format_properties_content::pptx_convert(oox::pptx_conversion_context &
CP_XML_ATTR
(
L"cap"
,
"small"
);
}
}
if
(
fo_text_transform_
)
{
if
(
fo_font_variant_
->
get_type
()
==
text_transform
::
Uppercase
)
{
CP_XML_ATTR
(
L"cap"
,
"all"
);
}
else
if
(
fo_font_variant_
->
get_type
()
==
text_transform
::
Lowercase
)
{
CP_XML_ATTR
(
L"cap"
,
"small"
);
}
}
// underline
line_width
under
=
style_text_underline_width_
.
get_value_or
(
line_width
::
Auto
);
bool
underlineBold
=
under
.
get_type
()
==
line_width
::
Bold
||
...
...
@@ -363,7 +374,7 @@ void text_format_properties_content::pptx_convert(oox::pptx_conversion_context &
switch
(
style_text_underline_type_
->
get_type
())
{
case
line_type
:
:
Single
:
underline
=
L"sng"
;
break
;
case
line_type
:
:
Double
:
underline
=
L"d
ouble
"
;
break
;
case
line_type
:
:
Double
:
underline
=
L"d
bl
"
;
break
;
}
}
else
if
(
style_text_underline_style_
)
...
...
@@ -397,8 +408,8 @@ void text_format_properties_content::pptx_convert(oox::pptx_conversion_context &
case
line_style
:
:
Wave
:
if
(
underlineBold
)
underline
=
L"wavyHeavy"
;
else
if
(
style_text_underline_type_
.
get_value_or
(
line_type
(
line_type
::
Single
)
).
get_type
()
==
line_type
::
Double
)
underline
=
L"wavyD
ouble
"
;
else
underline
=
L"wav
e
"
;
underline
=
L"wavyD
bl
"
;
else
underline
=
L"wav
y
"
;
break
;
}
}
...
...
@@ -427,8 +438,8 @@ void text_format_properties_content::pptx_convert(oox::pptx_conversion_context &
std
::
wstring
w_val
;
if
(
fo_language_
)
w_val
=
*
fo_language_
;
else
if
(
fo_country_
)
w_val
=
*
fo_country_
;
else
if
(
style_country_asian_
)
w_val
=
*
style_country_asian_
;
else
if
(
style_language_asian_
)
w_val
=
*
style_language_asian_
;
else
if
(
style_country_asian_
)
w_val
=
*
style_country_asian_
;
else
if
(
style_language_asian_
)
w_val
=
*
style_language_asian_
;
else
if
(
style_language_complex_
)
w_val
=
*
style_language_complex_
;
else
if
(
style_country_complex_
)
w_val
=
*
style_country_complex_
;
...
...
@@ -619,7 +630,7 @@ void text_format_properties_content::docx_convert(oox::docx_conversion_context &
underline
=
L"single"
;
break
;
case
line_type
:
:
Double
:
underline
=
L"d
ouble
"
;
underline
=
L"d
bl
"
;
break
;
}
}
...
...
@@ -666,9 +677,9 @@ void text_format_properties_content::docx_convert(oox::docx_conversion_context &
if
(
underlineBold
)
underline
=
L"wavyHeavy"
;
else
if
(
style_text_underline_type_
.
get_value_or
(
line_type
(
line_type
::
Single
)
).
get_type
()
==
line_type
::
Double
)
underline
=
L"wavyD
ouble
"
;
underline
=
L"wavyD
bl
"
;
else
underline
=
L"wav
e
"
;
underline
=
L"wav
y
"
;
break
;
}
}
...
...
@@ -1109,7 +1120,7 @@ void text_format_properties_content::oox_convert (std::wostream & _rPr, bool gra
underline
=
L"single"
;
break
;
case
line_type
:
:
Double
:
underline
=
L"d
ouble
"
;
underline
=
L"d
bl
"
;
break
;
}
}
...
...
@@ -1156,9 +1167,9 @@ void text_format_properties_content::oox_convert (std::wostream & _rPr, bool gra
if
(
underlineBold
)
underline
=
L"wavyHeavy"
;
else
if
(
style_text_underline_type_
.
get_value_or
(
line_type
(
line_type
::
Single
)
).
get_type
()
==
line_type
::
Double
)
underline
=
L"wavyD
ouble
"
;
underline
=
L"wavyD
bl
"
;
else
underline
=
L"wav
e
"
;
underline
=
L"wav
y
"
;
break
;
}
}
...
...
ASCOfficeOdfFile/src/odf/styles.cpp
View file @
7ae68b53
...
...
@@ -1455,39 +1455,42 @@ void style_master_page::pptx_convert(oox::pptx_conversion_context & Context)
////////////////
const
wchar_t
*
hdrHeader
=
L"<w:hdr \
xmlns:wpc=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas
\"
\
xmlns:mc=
\"
http://schemas.openxmlformats.org/markup-compatibility/2006
\"
\
xmlns:o=
\"
urn:schemas-microsoft-com:office:office
\"
\
xmlns:r=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships
\"
\
xmlns:w=
\"
http://schemas.openxmlformats.org/wordprocessingml/2006/main
\"
\
xmlns:m=
\"
http://schemas.openxmlformats.org/officeDocument/2006/math
\"
\
xmlns:v=
\"
urn:schemas-microsoft-com:vml
\"
\
xmlns:wp14=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing
\"
\
xmlns:wp=
\"
http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing
\"
\
xmlns:w10=
\"
urn:schemas-microsoft-com:office:word
\"
\
xmlns:w=
\"
http://schemas.openxmlformats.org/wordprocessingml/2006/main
\"
\
xmlns:w14=
\"
http://schemas.microsoft.com/office/word/2010/wordml
\"
\
xmlns:wp=
\"
http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing
\"
\
xmlns:wp14=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing
\"
\
xmlns:wpi=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingInk
\"
\
xmlns:wpg=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingGroup
\"
\
xmlns:wps=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingShape
\"
\
xmlns:wpc=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas
\"
\
xmlns:mc=
\"
http://schemas.openxmlformats.org/markup-compatibility/2006
\"
\
xmlns:wpi=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingInk
\"
\
xmlns:wne=
\"
http://schemas.microsoft.com/office/word/2006/wordml
\"
\
xmlns:wps=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingShape
\"
\
xmlns:a=
\"
http://schemas.openxmlformats.org/drawingml/2006/main
\"
\
xmlns:v=
\"
urn:schemas-microsoft-com:vml
\"
\
mc:Ignorable=
\"
w14 wp14
\"
>"
;
const
wchar_t
*
ftrHeader
=
L"<w:ftr \
xmlns:wpc=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas
\"
\
xmlns:mc=
\"
http://schemas.openxmlformats.org/markup-compatibility/2006
\"
\
xmlns:o=
\"
urn:schemas-microsoft-com:office:office
\"
\
xmlns:r=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships
\"
\
xmlns:w=
\"
http://schemas.openxmlformats.org/wordprocessingml/2006/main
\"
\
xmlns:m=
\"
http://schemas.openxmlformats.org/officeDocument/2006/math
\"
\
xmlns:v=
\"
urn:schemas-microsoft-com:vml
\"
\
xmlns:wp14=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing
\"
\
xmlns:wp=
\"
http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing
\"
\
xmlns:w10=
\"
urn:schemas-microsoft-com:office:word
\"
\
xmlns:w=
\"
http://schemas.openxmlformats.org/wordprocessingml/2006/main
\"
\
xmlns:w14=
\"
http://schemas.microsoft.com/office/word/2010/wordml
\"
\
xmlns:wp=
\"
http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing
\"
\
xmlns:wp14=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing
\"
\
xmlns:wpi=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingInk
\"
\
xmlns:wpg=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingGroup
\"
\
xmlns:wps=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingShape
\"
\
xmlns:wpc=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas
\"
\
xmlns:mc=
\"
http://schemas.openxmlformats.org/markup-compatibility/2006
\"
\
xmlns:wpi=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingInk
\"
\
xmlns:wne=
\"
http://schemas.microsoft.com/office/word/2006/wordml
\"
\
xmlns:wps=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingShape
\"
\
xmlns:a=
\"
http://schemas.openxmlformats.org/drawingml/2006/main
\"
\
xmlns:v=
\"
urn:schemas-microsoft-com:vml
\"
\
mc:Ignorable=
\"
w14 wp14
\"
>"
;
void
style_header
::
docx_convert
(
oox
::
docx_conversion_context
&
Context
)
...
...
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