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
84824631
Commit
84824631
authored
Apr 20, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OdfFormatWriter - presentation styled list
parent
dc3ecb1f
Changes
10
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
275 additions
and
82 deletions
+275
-82
ASCOfficeOdfFileW/source/OdfFormat/odf_conversion_context.cpp
...fficeOdfFileW/source/OdfFormat/odf_conversion_context.cpp
+1
-0
ASCOfficeOdfFileW/source/OdfFormat/odf_lists_styles_context.cpp
...iceOdfFileW/source/OdfFormat/odf_lists_styles_context.cpp
+52
-35
ASCOfficeOdfFileW/source/OdfFormat/odf_lists_styles_context.h
...fficeOdfFileW/source/OdfFormat/odf_lists_styles_context.h
+4
-4
ASCOfficeOdfFileW/source/OdfFormat/odf_style_context.cpp
ASCOfficeOdfFileW/source/OdfFormat/odf_style_context.cpp
+2
-1
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertDrawing.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertDrawing.cpp
+183
-35
ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.h
ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.h
+5
-1
ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.cpp
+4
-4
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.cpp
+8
-1
ASCOfficePPTXFile/PPTXFormat/Logic/Shape.cpp
ASCOfficePPTXFile/PPTXFormat/Logic/Shape.cpp
+15
-1
ASCOfficePPTXFile/PPTXFormat/Logic/Shape.h
ASCOfficePPTXFile/PPTXFormat/Logic/Shape.h
+1
-0
No files found.
ASCOfficeOdfFileW/source/OdfFormat/odf_conversion_context.cpp
View file @
84824631
...
...
@@ -262,6 +262,7 @@ void odf_conversion_context::process_settings(_object & object, bool isRoot)
void
odf_conversion_context
::
process_styles
(
_object
&
object
,
bool
isRoot
)
{
create_element
(
L"office"
,
L"styles"
,
object
.
styles
,
this
,
true
);
//общие стили
object
.
style_context
->
process_office_styles
(
object
.
styles
.
back
());
page_layout_context
()
->
process_office_styles
(
object
.
styles
.
back
());
...
...
ASCOfficeOdfFileW/source/OdfFormat/odf_lists_styles_context.cpp
View file @
84824631
This diff is collapsed.
Click to expand it.
ASCOfficeOdfFileW/source/OdfFormat/odf_lists_styles_context.h
View file @
84824631
...
...
@@ -55,7 +55,7 @@ struct list_format_state
std
::
vector
<
office_element_ptr
>
elements
;
std
::
wstring
odf_list_style_name
;
bool
automatic
;
};
class
odf_lists_styles_context
...
...
@@ -64,7 +64,7 @@ public:
odf_lists_styles_context
();
void
set_odf_context
(
odf_conversion_context
*
Context
);
void
start_style
(
int
abstract_number
);
void
start_style
(
int
abstract_number
=
-
1
);
int
start_style_level
(
int
level
,
int
type
);
style_list_level_properties
*
get_list_level_properties
();
style_list_level_label_alignment
*
get_list_level_alignment_properties
();
...
...
@@ -84,9 +84,9 @@ public:
void
add_style
(
int
oox_style_num
,
int
oox_based_num
);
void
process_styles
(
office_element_ptr
root
);
void
process_styles
(
office_element_ptr
root
,
bool
automatic
);
std
::
wstring
get_style_name
(
int
oox_style_num
);
std
::
wstring
get_style_name
(
int
oox_style_num
=
-
1
);
std
::
wstring
get_style_name1
(
int
oox_style_num
);
private:
std
::
vector
<
list_format_state
>
lists_format_array_
;
...
...
ASCOfficeOdfFileW/source/OdfFormat/odf_style_context.cpp
View file @
84824631
...
...
@@ -161,6 +161,7 @@ void odf_style_context::process_automatic_styles(office_element_ptr root )
if
(
/*it->automatic_== true && */
style_state_list_
[
i
]
->
root_
==
false
&&
style_state_list_
[
i
]
->
odf_style_
)
root
->
add_child_element
(
style_state_list_
[
i
]
->
odf_style_
);
}
lists_styles_context_
.
process_styles
(
root
,
true
);
}
void
odf_style_context
::
process_office_styles
(
office_element_ptr
root
)
...
...
@@ -175,7 +176,7 @@ void odf_style_context::process_office_styles(office_element_ptr root )
root
->
add_child_element
(
style_state_list_
[
i
]
->
odf_style_
);
}
lists_styles_context_
.
process_styles
(
root
);
lists_styles_context_
.
process_styles
(
root
,
false
);
}
std
::
wstring
odf_style_context
::
find_odf_style_name
(
int
oox_id_style
,
style_family
::
type
family
,
bool
root
,
bool
automatic
)
{
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertDrawing.cpp
View file @
84824631
This diff is collapsed.
Click to expand it.
ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.h
View file @
84824631
...
...
@@ -263,6 +263,7 @@ namespace PPTX
class
Theme
;
namespace
Logic
{
class
Bullet
;
class
ClrMap
;
class
SpTreeElem
;
class
GraphicFrame
;
...
...
@@ -405,6 +406,9 @@ public:
void
convert
(
PPTX
::
Logic
::
NvPr
*
oox_nvPr
);
void
convert
(
PPTX
::
Logic
::
Paragraph
*
oox_para
,
PPTX
::
Logic
::
TextListStyle
*
oox_list_style
=
NULL
);
void
convert_list_level
(
PPTX
::
Logic
::
TextParagraphPr
*
oox_para_props
,
int
level
);
void
convert_list
(
PPTX
::
Logic
::
TextListStyle
*
oox_list_style
);
void
convert
(
PPTX
::
Logic
::
TextListStyle
*
oox_list_style
,
int
level
,
cpdoccore
::
odf_writer
::
style_paragraph_properties
*
paragraph_properties
,
cpdoccore
::
odf_writer
::
style_text_properties
*
text_properties
);
void
convert
(
PPTX
::
Logic
::
TextParagraphPr
*
oox_para_props
,
cpdoccore
::
odf_writer
::
style_paragraph_properties
*
paragraph_properties
,
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.cpp
View file @
84824631
...
...
@@ -3101,8 +3101,8 @@ void DocxConverter::convert(OOX::Numbering::CLvl* oox_num_lvl)
}
}
else
{
aligment_props
->
fo_text_indent_
=
odf_types
::
length
(
0
,
odf_types
::
length
::
cm
);
aligment_props
->
fo_margin_left_
=
odf_types
::
length
(
0
,
odf_types
::
length
::
cm
);
aligment_props
->
fo_text_indent_
=
odf_types
::
length
(
0
,
odf_types
::
length
::
cm
);
aligment_props
->
fo_margin_left_
=
odf_types
::
length
(
0
,
odf_types
::
length
::
cm
);
}
}
...
...
@@ -3114,7 +3114,7 @@ void DocxConverter::convert(OOX::Numbering::CLvl* oox_num_lvl)
convert
(
oox_num_lvl
->
m_oRPr
.
GetPointer
(),
text_props
);
//create text style for symbols list НА ЛОКАЛЬНОМ контексте - иначе пересечение имен стилей (todoo вытащить генерацию имен в общую часть)
styles_context
->
create_style
(
L""
,
odf_types
::
style_family
::
Text
,
false
,
true
,
-
1
);
styles_context
->
create_style
(
L""
,
odf_types
::
style_family
::
Text
,
false
,
true
,
-
1
);
odf_writer
::
odf_style_state_ptr
style_state
=
styles_context
->
last_state
(
odf_types
::
style_family
::
Text
);
if
(
style_state
)
{
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.cpp
View file @
84824631
...
...
@@ -989,6 +989,13 @@ void PptxConverter::convert_slide(PPTX::Logic::CSld *oox_slide, PPTX::Logic::TxS
pShape
->
Merge
(
update_shape
);
//if (pShape->IsListStyleEmpty() == false)
//{
// //create list style
//}else if (listMasterStyle)
//{
//}
OoxConverter
::
convert
(
&
update_shape
);
}
else
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Shape.cpp
View file @
84824631
...
...
@@ -437,7 +437,6 @@ namespace PPTX
pWriter
->
EndRecord
();
}
void
Shape
::
FillLevelUp
()
{
if
((
m_pLevelUp
==
NULL
)
&&
(
nvSpPr
.
nvPr
.
ph
.
IsInit
()))
...
...
@@ -452,6 +451,21 @@ namespace PPTX
}
}
bool
Shape
::
IsListStyleEmpty
()
{
if
((
m_pLevelUp
)
&&
(
m_pLevelUp
->
IsListStyleEmpty
()
==
false
))
return
false
;
if
(
txBody
.
IsInit
()
==
false
)
return
true
;
if
(
txBody
->
lstStyle
.
IsInit
()
==
false
)
return
true
;
for
(
int
i
=
0
;
i
<
10
;
i
++
)
{
if
(
txBody
->
lstStyle
->
levels
[
i
].
IsInit
())
return
false
;
}
return
true
;
}
void
Shape
::
Merge
(
Shape
&
shape
,
bool
bIsSlidePlaceholder
)
{
if
(
m_pLevelUp
)
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Shape.h
View file @
84824631
...
...
@@ -303,6 +303,7 @@ namespace PPTX
void
FillLevelUp
();
void
Merge
(
Shape
&
shape
,
bool
bIsSlidePlaceholder
=
false
);
bool
IsListStyleEmpty
();
void
SetLevelUpElement
(
Shape
*
p
){
m_pLevelUp
=
p
;};
...
...
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