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
18393505
Commit
18393505
authored
Apr 24, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
d7587e91
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
22 deletions
+37
-22
ASCOfficeOdfFileW/source/OdfFormat/odf_drawing_context.cpp
ASCOfficeOdfFileW/source/OdfFormat/odf_drawing_context.cpp
+8
-4
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertDrawing.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertDrawing.cpp
+4
-1
ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.cpp
+2
-0
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.cpp
+20
-15
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.h
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.h
+1
-1
ASCOfficePPTXFile/PPTXFormat/SlideLayout.h
ASCOfficePPTXFile/PPTXFormat/SlideLayout.h
+2
-1
No files found.
ASCOfficeOdfFileW/source/OdfFormat/odf_drawing_context.cpp
View file @
18393505
...
@@ -336,6 +336,7 @@ void odf_drawing_context::set_background_state(bool Val)
...
@@ -336,6 +336,7 @@ void odf_drawing_context::set_background_state(bool Val)
impl_
->
is_background_
=
Val
;
impl_
->
is_background_
=
Val
;
impl_
->
current_graphic_properties
=
new
graphic_format_properties
();
impl_
->
current_graphic_properties
=
new
graphic_format_properties
();
start_area_properties
();
}
}
void
odf_drawing_context
::
check_anchor
()
void
odf_drawing_context
::
check_anchor
()
...
@@ -473,6 +474,7 @@ void odf_drawing_context::start_drawing()
...
@@ -473,6 +474,7 @@ void odf_drawing_context::start_drawing()
}
}
void
odf_drawing_context
::
end_drawing_background
(
odf_types
::
common_draw_fill_attlist
&
common_draw_attlist
)
void
odf_drawing_context
::
end_drawing_background
(
odf_types
::
common_draw_fill_attlist
&
common_draw_attlist
)
{
{
end_area_properties
();
if
(
impl_
->
current_drawing_state_
.
elements_
.
empty
()
==
false
)
return
;
if
(
impl_
->
current_drawing_state_
.
elements_
.
empty
()
==
false
)
return
;
if
(
!
impl_
->
is_background_
||
!
impl_
->
current_graphic_properties
)
return
;
if
(
!
impl_
->
is_background_
||
!
impl_
->
current_graphic_properties
)
return
;
...
@@ -491,15 +493,13 @@ void odf_drawing_context::end_drawing()
...
@@ -491,15 +493,13 @@ void odf_drawing_context::end_drawing()
draw_base
*
draw
=
dynamic_cast
<
draw_base
*>
(
impl_
->
current_drawing_state_
.
elements_
[
0
].
elm
.
get
());
draw_base
*
draw
=
dynamic_cast
<
draw_base
*>
(
impl_
->
current_drawing_state_
.
elements_
[
0
].
elm
.
get
());
if
(
draw
)
if
(
draw
)
{
{
if
(
impl_
->
is_presentation
_
)
if
(
impl_
->
current_drawing_state_
.
presentation_class_
||
impl_
->
current_drawing_state_
.
presentation_placeholder
_
)
{
{
_CP_OPT
(
std
::
wstring
)
draw_layer
;
_CP_OPT
(
std
::
wstring
)
draw_layer
;
if
(
impl_
->
is_presentation_
.
get
()
==
true
)
if
(
impl_
->
is_presentation_
.
get
()
==
true
)
{
//master
{
//master
draw_layer
=
L"backgroundobjects"
;
draw_layer
=
L"backgroundobjects"
;
//if (impl_->current_drawing_state_.presentation_class_)
// draw_layer = L"backgroundobjects";
//else draw_layer = L"layout";
if
(
!
impl_
->
current_drawing_state_
.
presentation_class_
)
if
(
!
impl_
->
current_drawing_state_
.
presentation_class_
)
impl_
->
current_drawing_state_
.
presentation_class_
=
presentation_class
::
outline
;
impl_
->
current_drawing_state_
.
presentation_class_
=
presentation_class
::
outline
;
...
@@ -1186,10 +1186,14 @@ void odf_drawing_context::set_shadow(int type, std::wstring hexColor, _CP_OPT(do
...
@@ -1186,10 +1186,14 @@ void odf_drawing_context::set_shadow(int type, std::wstring hexColor, _CP_OPT(do
void
odf_drawing_context
::
set_placeholder_id
(
std
::
wstring
val
)
void
odf_drawing_context
::
set_placeholder_id
(
std
::
wstring
val
)
{
{
if
(
!
impl_
->
is_presentation_
)
return
;
impl_
->
current_drawing_state_
.
presentation_placeholder_
=
val
;
impl_
->
current_drawing_state_
.
presentation_placeholder_
=
val
;
}
}
void
odf_drawing_context
::
set_placeholder_type
(
int
val
)
void
odf_drawing_context
::
set_placeholder_type
(
int
val
)
{
{
if
(
!
impl_
->
is_presentation_
)
return
;
switch
(
val
)
switch
(
val
)
{
{
case
0
:
impl_
->
current_drawing_state_
.
presentation_class_
=
presentation_class
::
outline
;
break
;
case
0
:
impl_
->
current_drawing_state_
.
presentation_class_
=
presentation_class
::
outline
;
break
;
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertDrawing.cpp
View file @
18393505
...
@@ -433,6 +433,8 @@ void OoxConverter::convert(PPTX::Logic::Shape *oox_shape)
...
@@ -433,6 +433,8 @@ void OoxConverter::convert(PPTX::Logic::Shape *oox_shape)
{
{
if
(
oox_shape
==
NULL
)
return
;
if
(
oox_shape
==
NULL
)
return
;
_CP_OPT
(
bool
)
bMasterPresentation
=
odf_context
()
->
drawing_context
()
->
get_presentation
();
odf_context
()
->
drawing_context
()
->
start_drawing
();
odf_context
()
->
drawing_context
()
->
start_drawing
();
int
type
=
1000
;
//custom
int
type
=
1000
;
//custom
...
@@ -448,7 +450,8 @@ void OoxConverter::convert(PPTX::Logic::Shape *oox_shape)
...
@@ -448,7 +450,8 @@ void OoxConverter::convert(PPTX::Logic::Shape *oox_shape)
type
=
preset
.
GetValue
();
type
=
preset
.
GetValue
();
}
}
if
(
type
==
SimpleTypes
::
shapetypeRect
&&
oox_shape
->
txBody
.
IsInit
())
type
=
2000
;
if
(
type
==
SimpleTypes
::
shapetypeRect
&&
oox_shape
->
txBody
.
IsInit
())
type
=
2000
;
if
(
type
==
2000
&&
oox_shape
->
txBody
->
bodyPr
.
IsInit
()
if
(
type
==
2000
&&
oox_shape
->
txBody
->
bodyPr
.
IsInit
()
&&
oox_shape
->
txBody
->
bodyPr
->
fromWordArt
.
get_value_or
(
false
))
&&
oox_shape
->
txBody
->
bodyPr
->
fromWordArt
.
get_value_or
(
false
))
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.cpp
View file @
18393505
...
@@ -130,6 +130,8 @@ bool OoxConverter::UpdateProgress(long nComplete)
...
@@ -130,6 +130,8 @@ bool OoxConverter::UpdateProgress(long nComplete)
void
OoxConverter
::
set_fonts_directory
(
const
std
::
wstring
&
fontsPath
)
void
OoxConverter
::
set_fonts_directory
(
const
std
::
wstring
&
fontsPath
)
{
{
if
(
odf_context
()
==
NULL
)
return
;
odf_context
()
->
set_fonts_directory
(
fontsPath
);
odf_context
()
->
set_fonts_directory
(
fontsPath
);
}
}
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.cpp
View file @
18393505
...
@@ -60,6 +60,17 @@ namespace Oox2Odf
...
@@ -60,6 +60,17 @@ namespace Oox2Odf
{
{
PptxConverter
::
PptxConverter
(
const
std
::
wstring
&
path
,
const
ProgressCallback
*
CallBack
)
PptxConverter
::
PptxConverter
(
const
std
::
wstring
&
path
,
const
ProgressCallback
*
CallBack
)
{
{
current_clrMap
=
NULL
;
current_slide
=
NULL
;
current_theme
=
NULL
;
current_tableStyles
=
NULL
;
presentation
=
NULL
;
output_document
=
NULL
;
odp_context
=
NULL
;
pCallBack
=
CallBack
;
const
OOX
::
CPath
oox_path
(
std
::
wstring
(
path
.
c_str
()));
const
OOX
::
CPath
oox_path
(
std
::
wstring
(
path
.
c_str
()));
pptx_document
=
new
PPTX
::
Folder
();
pptx_document
=
new
PPTX
::
Folder
();
...
@@ -82,13 +93,6 @@ PptxConverter::PptxConverter(const std::wstring & path, const ProgressCallback*
...
@@ -82,13 +93,6 @@ PptxConverter::PptxConverter(const std::wstring & path, const ProgressCallback*
output_document
=
new
odf_writer
::
package
::
odf_document
(
L"presentation"
);
output_document
=
new
odf_writer
::
package
::
odf_document
(
L"presentation"
);
odp_context
=
new
odf_writer
::
odp_conversion_context
(
output_document
);
odp_context
=
new
odf_writer
::
odp_conversion_context
(
output_document
);
current_clrMap
=
NULL
;
current_slide
=
NULL
;
current_theme
=
NULL
;
current_tableStyles
=
NULL
;
pCallBack
=
CallBack
;
if
(
UpdateProgress
(
290000
))
return
;
if
(
UpdateProgress
(
290000
))
return
;
}
}
PptxConverter
::~
PptxConverter
()
PptxConverter
::~
PptxConverter
()
...
@@ -339,7 +343,7 @@ void PptxConverter::convert_slides()
...
@@ -339,7 +343,7 @@ void PptxConverter::convert_slides()
current_slide
=
slide
->
Master
.
operator
->
();
current_slide
=
slide
->
Master
.
operator
->
();
if
(
bShowLayoutMasterSp
&&
bShowMasterSp
)
if
(
bShowLayoutMasterSp
&&
bShowMasterSp
)
convert_slide
(
&
slide
->
Master
->
cSld
,
current_txStyles
,
false
);
convert_slide
(
&
slide
->
Master
->
cSld
,
current_txStyles
,
false
,
true
);
else
else
convert
(
slide
->
Master
->
cSld
.
bg
.
GetPointer
());
convert
(
slide
->
Master
->
cSld
.
bg
.
GetPointer
());
...
@@ -347,7 +351,7 @@ void PptxConverter::convert_slides()
...
@@ -347,7 +351,7 @@ void PptxConverter::convert_slides()
current_clrMap
=
slide
->
Layout
->
clrMapOvr
->
overrideClrMapping
.
GetPointer
();
current_clrMap
=
slide
->
Layout
->
clrMapOvr
->
overrideClrMapping
.
GetPointer
();
current_slide
=
slide
->
Layout
.
operator
->
();
current_slide
=
slide
->
Layout
.
operator
->
();
convert_slide
(
&
slide
->
Layout
->
cSld
,
current_txStyles
,
true
);
convert_slide
(
&
slide
->
Layout
->
cSld
,
current_txStyles
,
true
,
bShowLayoutMasterSp
);
//add note master
//add note master
odp_context
->
end_master_slide
();
odp_context
->
end_master_slide
();
...
@@ -387,7 +391,7 @@ void PptxConverter::convert_slides()
...
@@ -387,7 +391,7 @@ void PptxConverter::convert_slides()
odp_context
->
current_slide
().
set_master_page
(
master_style_name
);
odp_context
->
current_slide
().
set_master_page
(
master_style_name
);
odp_context
->
current_slide
().
set_layout_page
(
layout_style_name
);
odp_context
->
current_slide
().
set_layout_page
(
layout_style_name
);
convert_slide
(
slide
->
cSld
.
GetPointer
(),
current_txStyles
);
convert_slide
(
slide
->
cSld
.
GetPointer
(),
current_txStyles
,
true
,
bShowMasterSp
);
convert
(
slide
->
comments
.
operator
->
());
convert
(
slide
->
comments
.
operator
->
());
convert
(
slide
->
Note
.
operator
->
());
convert
(
slide
->
Note
.
operator
->
());
...
@@ -943,7 +947,7 @@ void PptxConverter::convert(PPTX::Logic::Bg *oox_background)
...
@@ -943,7 +947,7 @@ void PptxConverter::convert(PPTX::Logic::Bg *oox_background)
odp_context
->
end_drawings
();
odp_context
->
end_drawings
();
}
}
void
PptxConverter
::
convert_slide
(
PPTX
::
Logic
::
CSld
*
oox_slide
,
PPTX
::
Logic
::
TxStyles
*
txStyles
,
bool
bPlaceholders
)
void
PptxConverter
::
convert_slide
(
PPTX
::
Logic
::
CSld
*
oox_slide
,
PPTX
::
Logic
::
TxStyles
*
txStyles
,
bool
bPlaceholders
,
bool
bFillUp
)
{
{
if
(
oox_slide
==
NULL
)
return
;
if
(
oox_slide
==
NULL
)
return
;
...
@@ -966,14 +970,15 @@ void PptxConverter::convert_slide(PPTX::Logic::CSld *oox_slide, PPTX::Logic::TxS
...
@@ -966,14 +970,15 @@ void PptxConverter::convert_slide(PPTX::Logic::CSld *oox_slide, PPTX::Logic::TxS
{
{
if
(
pShape
->
nvSpPr
.
nvPr
.
ph
.
is_init
())
if
(
pShape
->
nvSpPr
.
nvPr
.
ph
.
is_init
())
{
{
if
(
bFillUp
)
pShape
->
FillLevelUp
();
pShape
->
FillLevelUp
();
if
(
pShape
->
nvSpPr
.
nvPr
.
ph
->
type
.
IsInit
())
if
(
pShape
->
nvSpPr
.
nvPr
.
ph
->
type
.
IsInit
())
{
{
int
ph_type
=
pShape
->
nvSpPr
.
nvPr
.
ph
->
type
->
GetBYTECode
();
int
ph_type
=
pShape
->
nvSpPr
.
nvPr
.
ph
->
type
->
GetBYTECode
();
if
(
!
bMaster
&&
(
ph_type
==
5
||
ph_type
==
6
||
ph_type
==
7
||
ph_type
==
12
))
//
if (!bMaster && (ph_type == 5 || ph_type == 6 || ph_type == 7 || ph_type == 12))
continue
;
//
continue;
odf_context
()
->
drawing_context
()
->
set_placeholder_type
(
ph_type
);
odf_context
()
->
drawing_context
()
->
set_placeholder_type
(
ph_type
);
}
}
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/PptxConverter.h
View file @
18393505
...
@@ -106,7 +106,7 @@ namespace Oox2Odf
...
@@ -106,7 +106,7 @@ namespace Oox2Odf
void
convert
(
OOX
::
WritingElement
*
oox_unknown
);
void
convert
(
OOX
::
WritingElement
*
oox_unknown
);
void
convert_slide
(
PPTX
::
Logic
::
CSld
*
oox_slide
,
PPTX
::
Logic
::
TxStyles
*
txStyles
,
bool
bPlaceholders
=
true
);
void
convert_slide
(
PPTX
::
Logic
::
CSld
*
oox_slide
,
PPTX
::
Logic
::
TxStyles
*
txStyles
,
bool
bPlaceholders
,
bool
bFillUp
);
void
convert_layout
(
PPTX
::
Logic
::
CSld
*
oox_slide
);
void
convert_layout
(
PPTX
::
Logic
::
CSld
*
oox_slide
);
void
convert
(
PPTX
::
Comments
*
oox_comments
);
void
convert
(
PPTX
::
Comments
*
oox_comments
);
void
convert
(
PPTX
::
NotesSlide
*
oox_note
);
void
convert
(
PPTX
::
NotesSlide
*
oox_note
);
...
...
ASCOfficePPTXFile/PPTXFormat/SlideLayout.h
View file @
18393505
...
@@ -160,7 +160,8 @@ namespace PPTX
...
@@ -160,7 +160,8 @@ namespace PPTX
if
(
pShape
->
nvSpPr
.
nvPr
.
ph
->
idx
.
IsInit
())
if
(
pShape
->
nvSpPr
.
nvPr
.
ph
->
idx
.
IsInit
())
{
{
//not found in layout !! 100818_건강보험과_보건의료_김용익_최종.pptx
//not found in layout !! 100818_건강보험과_보건의료_김용익_최종.pptx
if
(
Master
.
IsInit
())
bool
bShapeMaster
=
showMasterSp
.
get_value_or
(
true
);
if
(
Master
.
IsInit
()
&&
bShapeMaster
)
{
{
Master
->
GetLevelUp
(
pShape
);
Master
->
GetLevelUp
(
pShape
);
}
}
...
...
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