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
087da9d2
Commit
087da9d2
authored
Apr 23, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
c505aced
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
52 deletions
+59
-52
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertDrawing.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertDrawing.cpp
+8
-14
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.cpp
+51
-38
No files found.
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertDrawing.cpp
View file @
087da9d2
...
...
@@ -1357,7 +1357,6 @@ void OoxConverter::convert(PPTX::Logic::Paragraph *oox_paragraph, PPTX::Logic::T
if
(
odf_context
()
->
drawing_context
()
->
is_wordart
())
odf_context
()
->
drawing_context
()
->
set_paragraph_properties
(
paragraph_properties
);
}
//list_level++;
if
(
oox_paragraph
->
RunElems
.
empty
()
&&
list_present
)
list_present
=
false
;
// ms не обозначает присутствие списка, libra - показывает значек
...
...
@@ -1374,21 +1373,16 @@ void OoxConverter::convert(PPTX::Logic::Paragraph *oox_paragraph, PPTX::Logic::T
odf_context
()
->
text_context
()
->
list_state_
.
style_name
=
L""
;
}
if
(
odf_context
()
->
text_context
()
->
list_state_
.
started_list
==
false
)
if
(
list_local
)
{
if
(
list_local
)
{
_CP_OPT
(
bool
)
inStyles
=
odf_context
()
->
drawing_context
()
->
get_presentation
();
_CP_OPT
(
bool
)
inStyles
=
odf_context
()
->
drawing_context
()
->
get_presentation
();
odf_context
()
->
styles_context
()
->
lists_styles
().
start_style
(
inStyles
&&
*
inStyles
);
convert_list_level
(
oox_paragraph
->
pPr
.
GetPointer
(),
list_level
/*- 1*/
);
odf_context
()
->
styles_context
()
->
lists_styles
().
end_style
();
}
list_style_name
=
odf_context
()
->
styles_context
()
->
lists_styles
().
get_style_name
();
//last added
//odf_context()->text_context()->start_list(list_style_name);
}
odf_context
()
->
styles_context
()
->
lists_styles
().
start_style
(
inStyles
&&
*
inStyles
);
convert_list_level
(
oox_paragraph
->
pPr
.
GetPointer
(),
list_level
/*- 1*/
);
odf_context
()
->
styles_context
()
->
lists_styles
().
end_style
();
}
list_style_name
=
odf_context
()
->
styles_context
()
->
lists_styles
().
get_style_name
();
//last added
list_level
++
;
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.cpp
View file @
087da9d2
...
...
@@ -955,53 +955,66 @@ void PptxConverter::convert_slide(PPTX::Logic::CSld *oox_slide, PPTX::Logic::TxS
smart_ptr
<
PPTX
::
WrapperWritingElement
>
pElem
=
oox_slide
->
spTree
.
SpTreeElems
[
i
].
GetElem
();
smart_ptr
<
PPTX
::
Logic
::
Shape
>
pShape
=
pElem
.
smart_dynamic_cast
<
PPTX
::
Logic
::
Shape
>
();
if
(
pShape
.
IsInit
()
&&
pShape
->
nvSpPr
.
nvPr
.
ph
.
is_init
()
)
if
(
pShape
.
IsInit
())
{
pShape
->
FillLevelUp
();
if
(
pShape
->
nvSpPr
.
nvPr
.
ph
->
type
.
IsInit
())
odf_context
()
->
drawing_context
()
->
set_placeholder_type
(
pShape
->
nvSpPr
.
nvPr
.
ph
->
type
->
GetBYTECode
());
else
odf_context
()
->
drawing_context
()
->
set_placeholder_type
(
0
);
if
(
pShape
->
nvSpPr
.
nvPr
.
ph
.
is_init
())
{
pShape
->
FillLevelUp
();
if
(
pShape
->
nvSpPr
.
nvPr
.
ph
->
type
.
IsInit
())
odf_context
()
->
drawing_context
()
->
set_placeholder_type
(
pShape
->
nvSpPr
.
nvPr
.
ph
->
type
->
GetBYTECode
());
else
odf_context
()
->
drawing_context
()
->
set_placeholder_type
(
0
);
if
(
pShape
->
nvSpPr
.
nvPr
.
ph
->
idx
.
IsInit
())
odf_context
()
->
drawing_context
()
->
set_placeholder_id
(
pShape
->
nvSpPr
.
nvPr
.
ph
->
idx
.
get
());
if
(
pShape
->
nvSpPr
.
nvPr
.
ph
->
idx
.
IsInit
())
odf_context
()
->
drawing_context
()
->
set_placeholder_id
(
pShape
->
nvSpPr
.
nvPr
.
ph
->
idx
.
get
());
if
(
!
bPlaceholders
)
continue
;
if
(
!
bPlaceholders
)
continue
;
PPTX
::
Logic
::
TextListStyle
*
listMasterStyle
=
NULL
;
if
(
txStyles
)
{
std
::
wstring
type
=
pShape
->
nvSpPr
.
nvPr
.
ph
->
type
.
get_value_or
(
_T
(
"body"
));
if
((
type
==
L"title"
)
||
(
type
==
L"ctrTitle"
))
listMasterStyle
=
txStyles
->
titleStyle
.
GetPointer
();
else
if
((
type
==
L"body"
)
||
(
type
==
L"subTitle"
)
||
(
type
==
L"obj"
))
listMasterStyle
=
txStyles
->
bodyStyle
.
GetPointer
();
else
if
(
type
!=
L""
)
listMasterStyle
=
txStyles
->
otherStyle
.
GetPointer
();
}
PPTX
::
Logic
::
Shape
update_shape
;
if
(
listMasterStyle
)
{
update_shape
.
txBody
=
new
PPTX
::
Logic
::
TxBody
();
PPTX
::
Logic
::
TextListStyle
*
listMasterStyle
=
NULL
;
PPTX
::
Logic
::
TextListStyle
*
newListStyle
=
new
PPTX
::
Logic
::
TextListStyle
();
for
(
int
i
=
0
;
i
<
10
;
i
++
)
if
(
txStyles
)
{
if
(
listMasterStyle
->
levels
[
i
].
is_init
())
listMasterStyle
->
levels
[
i
]
->
Merge
(
newListStyle
->
levels
[
i
]);
std
::
wstring
type
=
pShape
->
nvSpPr
.
nvPr
.
ph
->
type
.
get_value_or
(
_T
(
"body"
));
if
((
type
==
L"title"
)
||
(
type
==
L"ctrTitle"
))
listMasterStyle
=
txStyles
->
titleStyle
.
GetPointer
();
else
if
((
type
==
L"body"
)
||
(
type
==
L"subTitle"
)
||
(
type
==
L"obj"
))
listMasterStyle
=
txStyles
->
bodyStyle
.
GetPointer
();
else
if
(
type
!=
L""
)
listMasterStyle
=
txStyles
->
otherStyle
.
GetPointer
();
}
update_shape
.
txBody
->
lstStyle
.
reset
(
newListStyle
);
PPTX
::
Logic
::
Shape
update_shape
;
if
(
listMasterStyle
)
{
update_shape
.
txBody
=
new
PPTX
::
Logic
::
TxBody
();
PPTX
::
Logic
::
TextListStyle
*
newListStyle
=
new
PPTX
::
Logic
::
TextListStyle
();
for
(
int
i
=
0
;
i
<
10
;
i
++
)
{
if
(
listMasterStyle
->
levels
[
i
].
is_init
())
listMasterStyle
->
levels
[
i
]
->
Merge
(
newListStyle
->
levels
[
i
]);
}
update_shape
.
txBody
->
lstStyle
.
reset
(
newListStyle
);
}
pShape
->
Merge
(
update_shape
);
OoxConverter
::
convert
(
&
update_shape
);
}
pShape
->
Merge
(
update_shape
);
OoxConverter
::
convert
(
&
update_shape
);
else
if
(
pShape
->
txBody
.
IsInit
()
&&
presentation
->
defaultTextStyle
.
IsInit
())
{
//default text style with master clrScheme
PPTX
::
Logic
::
Shape
update_shape
;
update_shape
.
txBody
=
new
PPTX
::
Logic
::
TxBody
();
//OoxConverter::convert(pShape.operator->());
presentation
->
defaultTextStyle
->
Merge
(
update_shape
.
txBody
->
lstStyle
);
pShape
->
Merge
(
update_shape
);
OoxConverter
::
convert
(
&
update_shape
);
}
else
OoxConverter
::
convert
(
pShape
.
operator
->
());
}
else
{
...
...
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