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
63655a97
Commit
63655a97
authored
Feb 11, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
..
parent
fdf032d9
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
359 additions
and
303 deletions
+359
-303
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertVml.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertVml.cpp
+2
-2
ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.cpp
+3
-3
ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.cpp
+5
-5
ASCOfficeOdfFileW/source/Oox2OdfConverter/VmlShapeTypes2Oox.h
...fficeOdfFileW/source/Oox2OdfConverter/VmlShapeTypes2Oox.h
+26
-26
ASCOfficePPTXFile/PPTXFormat/Logic/Shape.cpp
ASCOfficePPTXFile/PPTXFormat/Logic/Shape.cpp
+8
-181
ASCOfficePPTXFile/PPTXFormat/Logic/Shape.h
ASCOfficePPTXFile/PPTXFormat/Logic/Shape.h
+224
-1
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXParagraphElementReaders.cpp
...RtfFormatLib/source/Reader/OOXParagraphElementReaders.cpp
+7
-7
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXShapeReader.cpp
...ficeRtfFile/RtfFormatLib/source/Reader/OOXShapeReader.cpp
+84
-78
No files found.
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertVml.cpp
View file @
63655a97
...
@@ -926,7 +926,7 @@ void OoxConverter::convert(OOX::Vml::CGroup *vml_group)
...
@@ -926,7 +926,7 @@ void OoxConverter::convert(OOX::Vml::CGroup *vml_group)
if
(
vml
->
m_oSpt
.
IsInit
())
if
(
vml
->
m_oSpt
.
IsInit
())
{
{
SimpleTypes
::
Vml
::
SptType
sptType
=
static_cast
<
SimpleTypes
::
Vml
::
SptType
>
(
vml
->
m_oSpt
->
GetValue
());
SimpleTypes
::
Vml
::
SptType
sptType
=
static_cast
<
SimpleTypes
::
Vml
::
SptType
>
(
vml
->
m_oSpt
->
GetValue
());
odf_context
()
->
drawing_context
()
->
start_shape
(
OOX
::
Spt2ShapeTy
pe
(
sptType
));
odf_context
()
->
drawing_context
()
->
start_shape
(
OOX
::
VmlShapeType2PrstSha
pe
(
sptType
));
bSet
=
true
;
bSet
=
true
;
}
}
else
if
((
vml
->
m_oConnectorType
.
IsInit
())
&&
(
vml
->
m_oConnectorType
->
GetValue
()
!=
SimpleTypes
::
connectortypeNone
))
else
if
((
vml
->
m_oConnectorType
.
IsInit
())
&&
(
vml
->
m_oConnectorType
->
GetValue
()
!=
SimpleTypes
::
connectortypeNone
))
...
@@ -955,7 +955,7 @@ void OoxConverter::convert(OOX::Vml::CGroup *vml_group)
...
@@ -955,7 +955,7 @@ void OoxConverter::convert(OOX::Vml::CGroup *vml_group)
OOX
::
Vml
::
CShapeType
*
vml
=
static_cast
<
OOX
::
Vml
::
CShapeType
*>
(
vml_group
->
m_arrItems
[
i
]);
OOX
::
Vml
::
CShapeType
*
vml
=
static_cast
<
OOX
::
Vml
::
CShapeType
*>
(
vml_group
->
m_arrItems
[
i
]);
SimpleTypes
::
Vml
::
SptType
sptType
=
vml
->
m_oSpt
.
IsInit
()
?
static_cast
<
SimpleTypes
::
Vml
::
SptType
>
(
vml
->
m_oSpt
->
GetValue
())
:
SimpleTypes
::
Vml
::
sptNotPrimitive
;
SimpleTypes
::
Vml
::
SptType
sptType
=
vml
->
m_oSpt
.
IsInit
()
?
static_cast
<
SimpleTypes
::
Vml
::
SptType
>
(
vml
->
m_oSpt
->
GetValue
())
:
SimpleTypes
::
Vml
::
sptNotPrimitive
;
odf_context
()
->
drawing_context
()
->
start_shape
(
OOX
::
Spt2ShapeTy
pe
(
sptType
));
odf_context
()
->
drawing_context
()
->
start_shape
(
OOX
::
VmlShapeType2PrstSha
pe
(
sptType
));
OoxConverter
::
convert
(
vml
);
OoxConverter
::
convert
(
vml
);
odf_context
()
->
drawing_context
()
->
end_shape
();
odf_context
()
->
drawing_context
()
->
end_shape
();
}
break
;
}
break
;
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.cpp
View file @
63655a97
...
@@ -657,12 +657,12 @@ void OoxConverter::convert(OOX::Drawing::CShapeProperties * oox_spPr, OOX::Dra
...
@@ -657,12 +657,12 @@ void OoxConverter::convert(OOX::Drawing::CShapeProperties * oox_spPr, OOX::Dra
odf_context
()
->
drawing_context
()
->
start_line_properties
();
odf_context
()
->
drawing_context
()
->
start_line_properties
();
{
{
if
(
oox_spPr
->
m_oLn
.
IsInit
())
if
((
oox_sp_style
)
&&
(
oox_sp_style
->
m_oLnRef
.
getType
()
==
OOX
::
et_a_lnRef
))
convert
(
oox_spPr
->
m_oLn
.
GetPointer
());
//CLineProperties
else
if
((
oox_sp_style
)
&&
(
oox_sp_style
->
m_oLnRef
.
getType
()
==
OOX
::
et_a_lnRef
))
{
{
convert
(
&
oox_sp_style
->
m_oLnRef
);
convert
(
&
oox_sp_style
->
m_oLnRef
);
}
}
if
(
oox_spPr
->
m_oLn
.
IsInit
())
convert
(
oox_spPr
->
m_oLn
.
GetPointer
());
//CLineProperties
}
}
odf_context
()
->
drawing_context
()
->
end_line_properties
();
odf_context
()
->
drawing_context
()
->
end_line_properties
();
//-----------------------------------------------------------------------------------------------------------------------------
//-----------------------------------------------------------------------------------------------------------------------------
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/DocxConverter.cpp
View file @
63655a97
...
@@ -2467,7 +2467,7 @@ void DocxConverter::convert(OOX::Logic::CPicture* oox_pic)
...
@@ -2467,7 +2467,7 @@ void DocxConverter::convert(OOX::Logic::CPicture* oox_pic)
SimpleTypes
::
Vml
::
SptType
sptType
=
oox_pic
->
m_oShapeType
->
m_oSpt
.
IsInit
()
?
static_cast
<
SimpleTypes
::
Vml
::
SptType
>
(
oox_pic
->
m_oShapeType
->
m_oSpt
->
GetValue
())
:
SimpleTypes
::
Vml
::
sptNotPrimitive
;
SimpleTypes
::
Vml
::
SptType
sptType
=
oox_pic
->
m_oShapeType
->
m_oSpt
.
IsInit
()
?
static_cast
<
SimpleTypes
::
Vml
::
SptType
>
(
oox_pic
->
m_oShapeType
->
m_oSpt
->
GetValue
())
:
SimpleTypes
::
Vml
::
sptNotPrimitive
;
odf_context
()
->
drawing_context
()
->
set_name
(
std
::
wstring
(
L"Custom"
)
+
std
::
to_wstring
(
sptType
));
odf_context
()
->
drawing_context
()
->
set_name
(
std
::
wstring
(
L"Custom"
)
+
std
::
to_wstring
(
sptType
));
odf_context
()
->
drawing_context
()
->
start_shape
(
OOX
::
Spt2ShapeTy
pe
(
sptType
));
odf_context
()
->
drawing_context
()
->
start_shape
(
OOX
::
VmlShapeType2PrstSha
pe
(
sptType
));
OoxConverter
::
convert
(
oox_pic
->
m_oShape
.
GetPointer
());
OoxConverter
::
convert
(
oox_pic
->
m_oShape
.
GetPointer
());
OoxConverter
::
convert
(
oox_pic
->
m_oShapeType
.
GetPointer
());
OoxConverter
::
convert
(
oox_pic
->
m_oShapeType
.
GetPointer
());
...
@@ -2486,7 +2486,7 @@ void DocxConverter::convert(OOX::Logic::CPicture* oox_pic)
...
@@ -2486,7 +2486,7 @@ void DocxConverter::convert(OOX::Logic::CPicture* oox_pic)
if
(
sptType
!=
SimpleTypes
::
Vml
::
SptType
::
sptNotPrimitive
)
if
(
sptType
!=
SimpleTypes
::
Vml
::
SptType
::
sptNotPrimitive
)
{
{
odf_context
()
->
drawing_context
()
->
set_name
(
std
::
wstring
(
L"Custom"
)
+
std
::
to_wstring
(
sptType
));
odf_context
()
->
drawing_context
()
->
set_name
(
std
::
wstring
(
L"Custom"
)
+
std
::
to_wstring
(
sptType
));
odf_context
()
->
drawing_context
()
->
start_shape
(
OOX
::
Spt2ShapeTy
pe
(
sptType
));
odf_context
()
->
drawing_context
()
->
start_shape
(
OOX
::
VmlShapeType2PrstSha
pe
(
sptType
));
bSet
=
true
;
bSet
=
true
;
}
}
else
if
((
oox_pic
->
m_oShape
->
m_oConnectorType
.
IsInit
())
&&
(
oox_pic
->
m_oShape
->
m_oConnectorType
->
GetValue
()
!=
SimpleTypes
::
connectortypeNone
))
else
if
((
oox_pic
->
m_oShape
->
m_oConnectorType
.
IsInit
())
&&
(
oox_pic
->
m_oShape
->
m_oConnectorType
->
GetValue
()
!=
SimpleTypes
::
connectortypeNone
))
...
@@ -2518,7 +2518,7 @@ void DocxConverter::convert(OOX::Logic::CPicture* oox_pic)
...
@@ -2518,7 +2518,7 @@ void DocxConverter::convert(OOX::Logic::CPicture* oox_pic)
if
(
!
bSet
&&
sptType
!=
SimpleTypes
::
Vml
::
SptType
::
sptNotPrimitive
)
if
(
!
bSet
&&
sptType
!=
SimpleTypes
::
Vml
::
SptType
::
sptNotPrimitive
)
{
{
odf_context
()
->
drawing_context
()
->
start_shape
(
OOX
::
Spt2ShapeTy
pe
(
sptType
));
odf_context
()
->
drawing_context
()
->
start_shape
(
OOX
::
VmlShapeType2PrstSha
pe
(
sptType
));
bSet
=
true
;
bSet
=
true
;
}
}
}
}
...
@@ -2528,7 +2528,7 @@ void DocxConverter::convert(OOX::Logic::CPicture* oox_pic)
...
@@ -2528,7 +2528,7 @@ void DocxConverter::convert(OOX::Logic::CPicture* oox_pic)
if
(
pos
>=
0
)
if
(
pos
>=
0
)
{
{
sptType
=
(
SimpleTypes
::
Vml
::
SptType
)
_wtoi
(
oox_pic
->
m_oShape
->
m_sType
->
substr
(
pos
+
9
,
oox_pic
->
m_oShape
->
m_sType
->
length
()
-
pos
-
9
).
c_str
());
sptType
=
(
SimpleTypes
::
Vml
::
SptType
)
_wtoi
(
oox_pic
->
m_oShape
->
m_sType
->
substr
(
pos
+
9
,
oox_pic
->
m_oShape
->
m_sType
->
length
()
-
pos
-
9
).
c_str
());
odf_context
()
->
drawing_context
()
->
start_shape
(
OOX
::
Spt2ShapeTy
pe
(
sptType
));
odf_context
()
->
drawing_context
()
->
start_shape
(
OOX
::
VmlShapeType2PrstSha
pe
(
sptType
));
bSet
=
true
;
bSet
=
true
;
}
}
}
}
...
@@ -2578,7 +2578,7 @@ void DocxConverter::convert(OOX::Logic::CObject* oox_obj)
...
@@ -2578,7 +2578,7 @@ void DocxConverter::convert(OOX::Logic::CObject* oox_obj)
if
(
sptType
!=
SimpleTypes
::
Vml
::
SptType
::
sptNotPrimitive
)
if
(
sptType
!=
SimpleTypes
::
Vml
::
SptType
::
sptNotPrimitive
)
{
{
odf_context
()
->
drawing_context
()
->
set_name
(
std
::
wstring
(
L"Custom"
)
+
std
::
to_wstring
(
sptType
));
odf_context
()
->
drawing_context
()
->
set_name
(
std
::
wstring
(
L"Custom"
)
+
std
::
to_wstring
(
sptType
));
odf_context
()
->
drawing_context
()
->
start_shape
(
OOX
::
Spt2ShapeTy
pe
(
sptType
));
odf_context
()
->
drawing_context
()
->
start_shape
(
OOX
::
VmlShapeType2PrstSha
pe
(
sptType
));
bSet
=
true
;
bSet
=
true
;
}
}
else
if
((
oox_obj
->
m_oShape
->
m_oConnectorType
.
IsInit
())
&&
(
oox_obj
->
m_oShape
->
m_oConnectorType
->
GetValue
()
!=
SimpleTypes
::
connectortypeNone
))
else
if
((
oox_obj
->
m_oShape
->
m_oConnectorType
.
IsInit
())
&&
(
oox_obj
->
m_oShape
->
m_oConnectorType
->
GetValue
()
!=
SimpleTypes
::
connectortypeNone
))
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/VmlShapeTypes2Oox.h
View file @
63655a97
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
namespace
OOX
namespace
OOX
{
{
int
static
Spt2ShapeTy
pe
(
SimpleTypes
::
Vml
::
SptType
type
)
static
int
VmlShapeType2PrstSha
pe
(
SimpleTypes
::
Vml
::
SptType
type
)
{
{
switch
(
type
)
switch
(
type
)
{
{
...
@@ -209,41 +209,41 @@ namespace OOX
...
@@ -209,41 +209,41 @@ namespace OOX
//case SimpleTypes::Vml::sptTextInflateTop : return SimpleTypes::shapetypeTextInflateTop ;
//case SimpleTypes::Vml::sptTextInflateTop : return SimpleTypes::shapetypeTextInflateTop ;
//case SimpleTypes::Vml::sptTextDeflateTop : return SimpleTypes::shapetypeTextDeflateTop ;
//case SimpleTypes::Vml::sptTextDeflateTop : return SimpleTypes::shapetypeTextDeflateTop ;
//case SimpleTypes::Vml::sptTextDeflateInflate : return SimpleTypes::shapetypeTextDeflateInflate ;
//case SimpleTypes::Vml::sptTextDeflateInflate : return SimpleTypes::shapetypeTextDeflateInflate ;
//case SimpleTypes::Vml::sptTextDeflateInflateDeflate :return SimpleTypes::shapetypeTextDeflateInflateDeflat ;
//case SimpleTypes::Vml::sptTextDeflateInflateDeflate :
return SimpleTypes::shapetypeTextDeflateInflateDeflat ;
//case SimpleTypes::Vml::sptTextFadeRight : return SimpleTypes::shapetypeTextFadeRight ;
//case SimpleTypes::Vml::sptTextFadeRight : return SimpleTypes::shapetypeTextFadeRight ;
//case SimpleTypes::Vml::sptTextFadeLeft : return SimpleTypes::shapetypeTextFadeLeft ;
//case SimpleTypes::Vml::sptTextFadeLeft :
return SimpleTypes::shapetypeTextFadeLeft ;
//case SimpleTypes::Vml::sptTextFadeUp : return SimpleTypes::shapetypeTextFadeUp ;
//case SimpleTypes::Vml::sptTextFadeUp : return SimpleTypes::shapetypeTextFadeUp ;
//case SimpleTypes::Vml::sptTextFadeDown : return SimpleTypes::shapetypeTextFadeDown ;
//case SimpleTypes::Vml::sptTextFadeDown :
return SimpleTypes::shapetypeTextFadeDown ;
case
SimpleTypes
:
:
Vml
::
sptTextSlantUp
:
return
SimpleTypes
::
textshapetypeTextSlantUp
+
2001
;
case
SimpleTypes
:
:
Vml
::
sptTextSlantUp
:
return
SimpleTypes
::
textshapetypeTextSlantUp
+
2001
;
case
SimpleTypes
:
:
Vml
::
sptTextSlantDown
:
return
SimpleTypes
::
textshapetypeTextSlantDown
+
2001
;
case
SimpleTypes
:
:
Vml
::
sptTextSlantDown
:
return
SimpleTypes
::
textshapetypeTextSlantDown
+
2001
;
case
SimpleTypes
:
:
Vml
::
sptTextCanUp
:
return
SimpleTypes
::
textshapetypeTextCanUp
+
2001
;
case
SimpleTypes
:
:
Vml
::
sptTextCanUp
:
return
SimpleTypes
::
textshapetypeTextCanUp
+
2001
;
case
SimpleTypes
:
:
Vml
::
sptTextCanDown
:
return
SimpleTypes
::
textshapetypeTextCanDown
+
2001
;
case
SimpleTypes
:
:
Vml
::
sptTextCanDown
:
return
SimpleTypes
::
textshapetypeTextCanDown
+
2001
;
case
SimpleTypes
:
:
Vml
::
sptFlowChartAlternateProcess
:
return
SimpleTypes
::
shapetypeFlowChartAlternateProcess
;
case
SimpleTypes
:
:
Vml
::
sptFlowChartAlternateProcess
:
return
SimpleTypes
::
shapetypeFlowChartAlternateProcess
;
case
SimpleTypes
:
:
Vml
::
sptFlowChartOffpageConnector
:
return
SimpleTypes
::
shapetypeFlowChartOffpageConnector
;
case
SimpleTypes
:
:
Vml
::
sptFlowChartOffpageConnector
:
return
SimpleTypes
::
shapetypeFlowChartOffpageConnector
;
case
SimpleTypes
:
:
Vml
::
sptCallout90
:
return
SimpleTypes
::
shapetypeCallout1
;
case
SimpleTypes
:
:
Vml
::
sptCallout90
:
return
SimpleTypes
::
shapetypeCallout1
;
case
SimpleTypes
:
:
Vml
::
sptAccentCallout90
:
return
SimpleTypes
::
shapetypeAccentCallout1
;
case
SimpleTypes
:
:
Vml
::
sptAccentCallout90
:
return
SimpleTypes
::
shapetypeAccentCallout1
;
case
SimpleTypes
:
:
Vml
::
sptBorderCallout90
:
return
SimpleTypes
::
shapetypeBorderCallout1
;
case
SimpleTypes
:
:
Vml
::
sptBorderCallout90
:
return
SimpleTypes
::
shapetypeBorderCallout1
;
case
SimpleTypes
:
:
Vml
::
sptAccentBorderCallout90
:
return
SimpleTypes
::
shapetypeAccentBorderCallout1
;
case
SimpleTypes
:
:
Vml
::
sptAccentBorderCallout90
:
return
SimpleTypes
::
shapetypeAccentBorderCallout1
;
case
SimpleTypes
:
:
Vml
::
sptLeftRightUpArrow
:
return
SimpleTypes
::
shapetypeLeftRightUpArrow
;
case
SimpleTypes
:
:
Vml
::
sptLeftRightUpArrow
:
return
SimpleTypes
::
shapetypeLeftRightUpArrow
;
case
SimpleTypes
:
:
Vml
::
sptSun
:
return
SimpleTypes
::
shapetypeSun
;
case
SimpleTypes
:
:
Vml
::
sptSun
:
return
SimpleTypes
::
shapetypeSun
;
case
SimpleTypes
:
:
Vml
::
sptMoon
:
return
SimpleTypes
::
shapetypeMoon
;
case
SimpleTypes
:
:
Vml
::
sptMoon
:
return
SimpleTypes
::
shapetypeMoon
;
case
SimpleTypes
:
:
Vml
::
sptBracketPair
:
return
SimpleTypes
::
shapetypeBracketPair
;
case
SimpleTypes
:
:
Vml
::
sptBracketPair
:
return
SimpleTypes
::
shapetypeBracketPair
;
case
SimpleTypes
:
:
Vml
::
sptBracePair
:
return
SimpleTypes
::
shapetypeBracePair
;
case
SimpleTypes
:
:
Vml
::
sptBracePair
:
return
SimpleTypes
::
shapetypeBracePair
;
case
SimpleTypes
:
:
Vml
::
sptSeal4
:
return
SimpleTypes
::
shapetypeStar4
;
case
SimpleTypes
:
:
Vml
::
sptSeal4
:
return
SimpleTypes
::
shapetypeStar4
;
case
SimpleTypes
:
:
Vml
::
sptDoubleWave
:
return
SimpleTypes
::
shapetypeDoubleWave
;
case
SimpleTypes
:
:
Vml
::
sptDoubleWave
:
return
SimpleTypes
::
shapetypeDoubleWave
;
case
SimpleTypes
:
:
Vml
::
sptActionButtonBlank
:
return
SimpleTypes
::
shapetypeActionButtonBlank
;
case
SimpleTypes
:
:
Vml
::
sptActionButtonBlank
:
return
SimpleTypes
::
shapetypeActionButtonBlank
;
case
SimpleTypes
:
:
Vml
::
sptActionButtonHome
:
return
SimpleTypes
::
shapetypeActionButtonHome
;
case
SimpleTypes
:
:
Vml
::
sptActionButtonHome
:
return
SimpleTypes
::
shapetypeActionButtonHome
;
case
SimpleTypes
:
:
Vml
::
sptActionButtonHelp
:
return
SimpleTypes
::
shapetypeActionButtonHelp
;
case
SimpleTypes
:
:
Vml
::
sptActionButtonHelp
:
return
SimpleTypes
::
shapetypeActionButtonHelp
;
case
SimpleTypes
:
:
Vml
::
sptActionButtonInformation
:
return
SimpleTypes
::
shapetypeActionButtonInformation
;
case
SimpleTypes
:
:
Vml
::
sptActionButtonInformation
:
return
SimpleTypes
::
shapetypeActionButtonInformation
;
case
SimpleTypes
:
:
Vml
::
sptActionButtonForwardNext
:
return
SimpleTypes
::
shapetypeActionButtonForwardNext
;
case
SimpleTypes
:
:
Vml
::
sptActionButtonForwardNext
:
return
SimpleTypes
::
shapetypeActionButtonForwardNext
;
case
SimpleTypes
:
:
Vml
::
sptActionButtonBackPrevious
:
return
SimpleTypes
::
shapetypeActionButtonBackPrevious
;
case
SimpleTypes
:
:
Vml
::
sptActionButtonBackPrevious
:
return
SimpleTypes
::
shapetypeActionButtonBackPrevious
;
case
SimpleTypes
:
:
Vml
::
sptActionButtonEnd
:
return
SimpleTypes
::
shapetypeActionButtonEnd
;
case
SimpleTypes
:
:
Vml
::
sptActionButtonEnd
:
return
SimpleTypes
::
shapetypeActionButtonEnd
;
case
SimpleTypes
:
:
Vml
::
sptActionButtonBeginning
:
return
SimpleTypes
::
shapetypeActionButtonBeginning
;
case
SimpleTypes
:
:
Vml
::
sptActionButtonBeginning
:
return
SimpleTypes
::
shapetypeActionButtonBeginning
;
case
SimpleTypes
:
:
Vml
::
sptActionButtonReturn
:
return
SimpleTypes
::
shapetypeActionButtonReturn
;
case
SimpleTypes
:
:
Vml
::
sptActionButtonReturn
:
return
SimpleTypes
::
shapetypeActionButtonReturn
;
case
SimpleTypes
:
:
Vml
::
sptActionButtonDocument
:
return
SimpleTypes
::
shapetypeActionButtonDocument
;
case
SimpleTypes
:
:
Vml
::
sptActionButtonDocument
:
return
SimpleTypes
::
shapetypeActionButtonDocument
;
case
SimpleTypes
:
:
Vml
::
sptActionButtonSound
:
return
SimpleTypes
::
shapetypeActionButtonSound
;
case
SimpleTypes
:
:
Vml
::
sptActionButtonSound
:
return
SimpleTypes
::
shapetypeActionButtonSound
;
case
SimpleTypes
:
:
Vml
::
sptActionButtonMovie
:
return
SimpleTypes
::
shapetypeActionButtonMovie
;
case
SimpleTypes
:
:
Vml
::
sptActionButtonMovie
:
return
SimpleTypes
::
shapetypeActionButtonMovie
;
//case SimpleTypes::Vml::sptHostControl : return SimpleTypes::shapetype ;
//case SimpleTypes::Vml::sptHostControl : return SimpleTypes::shapetype ;
case
SimpleTypes
:
:
Vml
::
sptTextBox
:
return
2000
;
case
SimpleTypes
:
:
Vml
::
sptTextBox
:
return
2000
;
default:
default:
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Shape.cpp
View file @
63655a97
...
@@ -37,182 +37,8 @@
...
@@ -37,182 +37,8 @@
#include "../Slide.h"
#include "../Slide.h"
#include "SpTree.h"
#include "SpTree.h"
#include "../../../ASCOfficeOdfFileW/source/Oox2OdfConverter/VmlShapeTypes2Oox.h"
namespace
PPTX
namespace
PPTX
{
{
SimpleTypes
::
Vml
::
SptType
static
Spt2ShapeType
(
SimpleTypes
::
EShapeType
type
)
{
switch
(
type
)
{
case
SimpleTypes
:
:
shapetypeRect
:
return
SimpleTypes
::
Vml
::
sptRectangle
;
case
SimpleTypes
:
:
shapetypeRoundRect
:
return
SimpleTypes
::
Vml
::
sptRoundRectangle
;
case
SimpleTypes
:
:
shapetypeEllipse
:
return
SimpleTypes
::
Vml
::
sptEllipse
;
case
SimpleTypes
:
:
shapetypeDiamond
:
return
SimpleTypes
::
Vml
::
sptDiamond
;
case
SimpleTypes
:
:
shapetypeTriangle
:
return
SimpleTypes
::
Vml
::
sptIsocelesTriangle
;
case
SimpleTypes
:
:
shapetypeRtTriangle
:
return
SimpleTypes
::
Vml
::
sptRightTriangle
;
case
SimpleTypes
:
:
shapetypeParallelogram
:
return
SimpleTypes
::
Vml
::
sptParallelogram
;
case
SimpleTypes
:
:
shapetypeTrapezoid
:
return
SimpleTypes
::
Vml
::
sptTrapezoid
;
case
SimpleTypes
:
:
shapetypeHexagon
:
return
SimpleTypes
::
Vml
::
sptHexagon
;
case
SimpleTypes
:
:
shapetypeOctagon
:
return
SimpleTypes
::
Vml
::
sptOctagon
;
case
SimpleTypes
:
:
shapetypePlus
:
return
SimpleTypes
::
Vml
::
sptPlus
;
case
SimpleTypes
:
:
shapetypeStar5
:
return
SimpleTypes
::
Vml
::
sptStar
;
case
SimpleTypes
:
:
shapetypeRightArrow
:
return
SimpleTypes
::
Vml
::
sptArrow
;
case
SimpleTypes
:
:
shapetypeThickArrow
:
return
SimpleTypes
::
Vml
::
sptThickArrow
;
case
SimpleTypes
:
:
shapetypeHomePlate
:
return
SimpleTypes
::
Vml
::
sptHomePlate
;
case
SimpleTypes
:
:
shapetypeCube
:
return
SimpleTypes
::
Vml
::
sptCube
;
case
SimpleTypes
:
:
shapetypeBallon
:
return
SimpleTypes
::
Vml
::
sptBalloon
;
// case SimpleTypes::shapetypeIrregularSeal1: return SimpleTypes::Vml::sptSeal ;
case
SimpleTypes
:
:
shapetypeArc
:
return
SimpleTypes
::
Vml
::
sptArc
;
case
SimpleTypes
:
:
shapetypeLine
:
return
SimpleTypes
::
Vml
::
sptLine
;
case
SimpleTypes
:
:
shapetypePlaque
:
return
SimpleTypes
::
Vml
::
sptPlaque
;
case
SimpleTypes
:
:
shapetypeCan
:
return
SimpleTypes
::
Vml
::
sptCan
;
case
SimpleTypes
:
:
shapetypeDonut
:
return
SimpleTypes
::
Vml
::
sptDonut
;
// case SimpleTypes::shapetypeTextSimple : return SimpleTypes::Vml::sptTextSimple ;
// case SimpleTypes::shapetypeTextOctagon : return SimpleTypes::Vml::sptTextOctagon ;
// case SimpleTypes::shapetypeTextHexagon : return SimpleTypes::Vml::sptTextHexagon ;
// case SimpleTypes::shapetypeTextCurve : return SimpleTypes::Vml::sptTextCurve ;
// case SimpleTypes::shapetypeTextWave : return SimpleTypes::Vml::sptTextWave ;
// case SimpleTypes::shapetypeTextRing : return SimpleTypes::Vml::sptTextRing ;
// case SimpleTypes::shapetypeTextOnCurve : return SimpleTypes::Vml::sptTextOnCurve ;
// case SimpleTypes::shapetypeTextOnRing : return SimpleTypes::Vml::sptTextOnRing ;
case
SimpleTypes
:
:
shapetypeStraightConnector1
:
return
SimpleTypes
::
Vml
::
sptStraightConnector1
;
case
SimpleTypes
:
:
shapetypeBentConnector2
:
return
SimpleTypes
::
Vml
::
sptBentConnector2
;
case
SimpleTypes
:
:
shapetypeBentConnector3
:
return
SimpleTypes
::
Vml
::
sptBentConnector3
;
case
SimpleTypes
:
:
shapetypeBentConnector4
:
return
SimpleTypes
::
Vml
::
sptBentConnector4
;
case
SimpleTypes
:
:
shapetypeBentConnector5
:
return
SimpleTypes
::
Vml
::
sptBentConnector5
;
case
SimpleTypes
:
:
shapetypeCurvedConnector2
:
return
SimpleTypes
::
Vml
::
sptCurvedConnector2
;
case
SimpleTypes
:
:
shapetypeCurvedConnector3
:
return
SimpleTypes
::
Vml
::
sptCurvedConnector3
;
case
SimpleTypes
:
:
shapetypeCurvedConnector4
:
return
SimpleTypes
::
Vml
::
sptCurvedConnector4
;
case
SimpleTypes
:
:
shapetypeCurvedConnector5
:
return
SimpleTypes
::
Vml
::
sptCurvedConnector5
;
case
SimpleTypes
:
:
shapetypeCallout1
:
return
SimpleTypes
::
Vml
::
sptCallout1
;
case
SimpleTypes
:
:
shapetypeCallout2
:
return
SimpleTypes
::
Vml
::
sptCallout2
;
case
SimpleTypes
:
:
shapetypeCallout3
:
return
SimpleTypes
::
Vml
::
sptCallout3
;
case
SimpleTypes
:
:
shapetypeAccentCallout1
:
return
SimpleTypes
::
Vml
::
sptAccentCallout1
;
case
SimpleTypes
:
:
shapetypeAccentCallout2
:
return
SimpleTypes
::
Vml
::
sptAccentCallout2
;
case
SimpleTypes
:
:
shapetypeAccentCallout3
:
return
SimpleTypes
::
Vml
::
sptAccentCallout3
;
case
SimpleTypes
:
:
shapetypeAccentBorderCallout1
:
return
SimpleTypes
::
Vml
::
sptAccentBorderCallout1
;
case
SimpleTypes
:
:
shapetypeAccentBorderCallout2
:
return
SimpleTypes
::
Vml
::
sptAccentBorderCallout2
;
case
SimpleTypes
:
:
shapetypeAccentBorderCallout3
:
return
SimpleTypes
::
Vml
::
sptAccentBorderCallout3
;
case
SimpleTypes
:
:
shapetypeRibbon
:
return
SimpleTypes
::
Vml
::
sptRibbon
;
case
SimpleTypes
:
:
shapetypeRibbon2
:
return
SimpleTypes
::
Vml
::
sptRibbon2
;
case
SimpleTypes
:
:
shapetypeChevron
:
return
SimpleTypes
::
Vml
::
sptChevron
;
case
SimpleTypes
:
:
shapetypePentagon
:
return
SimpleTypes
::
Vml
::
sptPentagon
;
case
SimpleTypes
:
:
shapetypeNoSmoking
:
return
SimpleTypes
::
Vml
::
sptNoSmoking
;
case
SimpleTypes
:
:
shapetypeStar8
:
return
SimpleTypes
::
Vml
::
sptSeal8
;
case
SimpleTypes
:
:
shapetypeStar16
:
return
SimpleTypes
::
Vml
::
sptSeal16
;
case
SimpleTypes
:
:
shapetypeStar32
:
return
SimpleTypes
::
Vml
::
sptSeal32
;
case
SimpleTypes
:
:
shapetypeWedgeRectCallout
:
return
SimpleTypes
::
Vml
::
sptWedgeRectCallout
;
case
SimpleTypes
:
:
shapetypeWedgeRoundRectCallout
:
return
SimpleTypes
::
Vml
::
sptWedgeRRectCallout
;
case
SimpleTypes
:
:
shapetypeWedgeEllipseCallout
:
return
SimpleTypes
::
Vml
::
sptWedgeEllipseCallout
;
case
SimpleTypes
:
:
shapetypeWave
:
return
SimpleTypes
::
Vml
::
sptWave
;
case
SimpleTypes
:
:
shapetypeFoldedCorner
:
return
SimpleTypes
::
Vml
::
sptFoldedCorner
;
case
SimpleTypes
:
:
shapetypeLeftArrow
:
return
SimpleTypes
::
Vml
::
sptLeftArrow
;
case
SimpleTypes
:
:
shapetypeDownArrow
:
return
SimpleTypes
::
Vml
::
sptDownArrow
;
case
SimpleTypes
:
:
shapetypeUpArrow
:
return
SimpleTypes
::
Vml
::
sptUpArrow
;
case
SimpleTypes
:
:
shapetypeLeftRightArrow
:
return
SimpleTypes
::
Vml
::
sptLeftRightArrow
;
case
SimpleTypes
:
:
shapetypeUpDownArrow
:
return
SimpleTypes
::
Vml
::
sptUpDownArrow
;
case
SimpleTypes
:
:
shapetypeIrregularSeal1
:
return
SimpleTypes
::
Vml
::
sptIrregularSeal1
;
case
SimpleTypes
:
:
shapetypeIrregularSeal2
:
return
SimpleTypes
::
Vml
::
sptIrregularSeal2
;
case
SimpleTypes
:
:
shapetypeLightningBolt
:
return
SimpleTypes
::
Vml
::
sptLightningBolt
;
case
SimpleTypes
:
:
shapetypeHeart
:
return
SimpleTypes
::
Vml
::
sptHeart
;
case
SimpleTypes
:
:
shapetypeQuadArrow
:
return
SimpleTypes
::
Vml
::
sptQuadArrow
;
case
SimpleTypes
:
:
shapetypeLeftArrowCallout
:
return
SimpleTypes
::
Vml
::
sptLeftArrowCallout
;
case
SimpleTypes
:
:
shapetypeRightArrowCallout
:
return
SimpleTypes
::
Vml
::
sptRightArrowCallout
;
case
SimpleTypes
:
:
shapetypeUpArrowCallout
:
return
SimpleTypes
::
Vml
::
sptUpArrowCallout
;
case
SimpleTypes
:
:
shapetypeDownArrowCallout
:
return
SimpleTypes
::
Vml
::
sptDownArrowCallout
;
case
SimpleTypes
:
:
shapetypeLeftRightArrowCallout
:
return
SimpleTypes
::
Vml
::
sptLeftRightArrowCallout
;
case
SimpleTypes
:
:
shapetypeUpDownArrowCallout
:
return
SimpleTypes
::
Vml
::
sptUpDownArrowCallout
;
case
SimpleTypes
:
:
shapetypeQuadArrowCallout
:
return
SimpleTypes
::
Vml
::
sptQuadArrowCallout
;
case
SimpleTypes
:
:
shapetypeBevel
:
return
SimpleTypes
::
Vml
::
sptBevel
;
case
SimpleTypes
:
:
shapetypeLeftBracket
:
return
SimpleTypes
::
Vml
::
sptLeftBracket
;
case
SimpleTypes
:
:
shapetypeRightBracket
:
return
SimpleTypes
::
Vml
::
sptRightBracket
;
case
SimpleTypes
:
:
shapetypeLeftBrace
:
return
SimpleTypes
::
Vml
::
sptLeftBrace
;
case
SimpleTypes
:
:
shapetypeRightBrace
:
return
SimpleTypes
::
Vml
::
sptRightBrace
;
case
SimpleTypes
:
:
shapetypeLeftUpArrow
:
return
SimpleTypes
::
Vml
::
sptLeftUpArrow
;
case
SimpleTypes
:
:
shapetypeBentUpArrow
:
return
SimpleTypes
::
Vml
::
sptBentUpArrow
;
case
SimpleTypes
:
:
shapetypeBentArrow
:
return
SimpleTypes
::
Vml
::
sptBentArrow
;
case
SimpleTypes
:
:
shapetypeStar24
:
return
SimpleTypes
::
Vml
::
sptSeal24
;
case
SimpleTypes
:
:
shapetypeStripedRightArrow
:
return
SimpleTypes
::
Vml
::
sptStripedRightArrow
;
case
SimpleTypes
:
:
shapetypeNotchedRightArrow
:
return
SimpleTypes
::
Vml
::
sptNotchedRightArrow
;
case
SimpleTypes
:
:
shapetypeBlockArc
:
return
SimpleTypes
::
Vml
::
sptBlockArc
;
case
SimpleTypes
:
:
shapetypeSmileyFace
:
return
SimpleTypes
::
Vml
::
sptSmileyFace
;
case
SimpleTypes
:
:
shapetypeVerticalScroll
:
return
SimpleTypes
::
Vml
::
sptVerticalScroll
;
case
SimpleTypes
:
:
shapetypeHorizontalScroll
:
return
SimpleTypes
::
Vml
::
sptHorizontalScroll
;
case
SimpleTypes
:
:
shapetypeCircularArrow
:
return
SimpleTypes
::
Vml
::
sptCircularArrow
;
// case SimpleTypes::shapetypeNotchedCircularArrow : return SimpleTypes::Vml::sptNotchedCircularArrow ;
case
SimpleTypes
:
:
shapetypeUturnArrow
:
return
SimpleTypes
::
Vml
::
sptUturnArrow
;
case
SimpleTypes
:
:
shapetypeCurvedRightArrow
:
return
SimpleTypes
::
Vml
::
sptCurvedRightArrow
;
case
SimpleTypes
:
:
shapetypeCurvedLeftArrow
:
return
SimpleTypes
::
Vml
::
sptCurvedLeftArrow
;
case
SimpleTypes
:
:
shapetypeCurvedUpArrow
:
return
SimpleTypes
::
Vml
::
sptCurvedUpArrow
;
case
SimpleTypes
:
:
shapetypeCurvedDownArrow
:
return
SimpleTypes
::
Vml
::
sptCurvedDownArrow
;
case
SimpleTypes
:
:
shapetypeCloudCallout
:
return
SimpleTypes
::
Vml
::
sptCloudCallout
;
case
SimpleTypes
:
:
shapetypeEllipseRibbon
:
return
SimpleTypes
::
Vml
::
sptEllipseRibbon
;
case
SimpleTypes
:
:
shapetypeEllipseRibbon2
:
return
SimpleTypes
::
Vml
::
sptEllipseRibbon2
;
case
SimpleTypes
:
:
shapetypeFlowChartProcess
:
return
SimpleTypes
::
Vml
::
sptFlowChartProcess
;
case
SimpleTypes
:
:
shapetypeFlowChartDecision
:
return
SimpleTypes
::
Vml
::
sptFlowChartDecision
;
case
SimpleTypes
:
:
shapetypeFlowChartInputOutput
:
return
SimpleTypes
::
Vml
::
sptFlowChartInputOutput
;
case
SimpleTypes
:
:
shapetypeFlowChartInternalStorage
:
return
SimpleTypes
::
Vml
::
sptFlowChartInternalStorage
;
case
SimpleTypes
:
:
shapetypeFlowChartDocument
:
return
SimpleTypes
::
Vml
::
sptFlowChartDocument
;
case
SimpleTypes
:
:
shapetypeFlowChartMultidocument
:
return
SimpleTypes
::
Vml
::
sptFlowChartMultidocument
;
case
SimpleTypes
:
:
shapetypeFlowChartTerminator
:
return
SimpleTypes
::
Vml
::
sptFlowChartTerminator
;
case
SimpleTypes
:
:
shapetypeFlowChartPreparation
:
return
SimpleTypes
::
Vml
::
sptFlowChartPreparation
;
case
SimpleTypes
:
:
shapetypeFlowChartManualInput
:
return
SimpleTypes
::
Vml
::
sptFlowChartManualInput
;
case
SimpleTypes
:
:
shapetypeFlowChartManualOperation
:
return
SimpleTypes
::
Vml
::
sptFlowChartManualOperation
;
case
SimpleTypes
:
:
shapetypeFlowChartConnector
:
return
SimpleTypes
::
Vml
::
sptFlowChartConnector
;
case
SimpleTypes
:
:
shapetypeFlowChartPunchedCard
:
return
SimpleTypes
::
Vml
::
sptFlowChartPunchedCard
;
case
SimpleTypes
:
:
shapetypeFlowChartPunchedTape
:
return
SimpleTypes
::
Vml
::
sptFlowChartPunchedTape
;
case
SimpleTypes
:
:
shapetypeFlowChartSummingJunction
:
return
SimpleTypes
::
Vml
::
sptFlowChartSummingJunction
;
case
SimpleTypes
:
:
shapetypeFlowChartOr
:
return
SimpleTypes
::
Vml
::
sptFlowChartOr
;
case
SimpleTypes
:
:
shapetypeFlowChartCollate
:
return
SimpleTypes
::
Vml
::
sptFlowChartCollate
;
case
SimpleTypes
:
:
shapetypeFlowChartSort
:
return
SimpleTypes
::
Vml
::
sptFlowChartSort
;
case
SimpleTypes
:
:
shapetypeFlowChartExtract
:
return
SimpleTypes
::
Vml
::
sptFlowChartExtract
;
case
SimpleTypes
:
:
shapetypeFlowChartMerge
:
return
SimpleTypes
::
Vml
::
sptFlowChartMerge
;
//case SimpleTypes::shapetypeChartOfflineStorage : return SimpleTypes::Vml::sptFlowChartOfflineStorage ;
case
SimpleTypes
:
:
shapetypeFlowChartOnlineStorage
:
return
SimpleTypes
::
Vml
::
sptFlowChartOnlineStorage
;
case
SimpleTypes
:
:
shapetypeFlowChartMagneticTape
:
return
SimpleTypes
::
Vml
::
sptFlowChartMagneticTape
;
case
SimpleTypes
:
:
shapetypeFlowChartMagneticDisk
:
return
SimpleTypes
::
Vml
::
sptFlowChartMagneticDisk
;
case
SimpleTypes
:
:
shapetypeFlowChartMagneticDrum
:
return
SimpleTypes
::
Vml
::
sptFlowChartMagneticDrum
;
case
SimpleTypes
:
:
shapetypeFlowChartDisplay
:
return
SimpleTypes
::
Vml
::
sptFlowChartDisplay
;
case
SimpleTypes
:
:
shapetypeFlowChartDelay
:
return
SimpleTypes
::
Vml
::
sptFlowChartDelay
;
// case SimpleTypes::shapetypeTextWave3 : return SimpleTypes::Vml::sptTextWave3 ;
case
SimpleTypes
:
:
shapetypeTextInflateBottom
:
return
SimpleTypes
::
Vml
::
sptTextInflateBottom
;
case
SimpleTypes
:
:
shapetypeTextDeflateBottom
:
return
SimpleTypes
::
Vml
::
sptTextDeflateBottom
;
case
SimpleTypes
:
:
shapetypeTextInflateTop
:
return
SimpleTypes
::
Vml
::
sptTextInflateTop
;
case
SimpleTypes
:
:
shapetypeTextDeflateTop
:
return
SimpleTypes
::
Vml
::
sptTextDeflateTop
;
case
SimpleTypes
:
:
shapetypeTextDeflateInflate
:
return
SimpleTypes
::
Vml
::
sptTextDeflateInflate
;
case
SimpleTypes
:
:
shapetypeTextFadeRight
:
return
SimpleTypes
::
Vml
::
sptTextFadeRight
;
case
SimpleTypes
:
:
shapetypeTextFadeLeft
:
return
SimpleTypes
::
Vml
::
sptTextFadeLeft
;
case
SimpleTypes
:
:
shapetypeTextFadeUp
:
return
SimpleTypes
::
Vml
::
sptTextFadeUp
;
case
SimpleTypes
:
:
shapetypeTextFadeDown
:
return
SimpleTypes
::
Vml
::
sptTextFadeDown
;
case
SimpleTypes
:
:
shapetypeBorderCallout1
:
return
SimpleTypes
::
Vml
::
sptBorderCallout1
;
case
SimpleTypes
:
:
shapetypeBorderCallout2
:
return
SimpleTypes
::
Vml
::
sptBorderCallout2
;
case
SimpleTypes
:
:
shapetypeBorderCallout3
:
return
SimpleTypes
::
Vml
::
sptBorderCallout3
;
case
SimpleTypes
:
:
shapetypeLeftRightUpArrow
:
return
SimpleTypes
::
Vml
::
sptLeftRightUpArrow
;
case
SimpleTypes
:
:
shapetypeSun
:
return
SimpleTypes
::
Vml
::
sptSun
;
case
SimpleTypes
:
:
shapetypeMoon
:
return
SimpleTypes
::
Vml
::
sptMoon
;
case
SimpleTypes
:
:
shapetypeBracketPair
:
return
SimpleTypes
::
Vml
::
sptBracketPair
;
case
SimpleTypes
:
:
shapetypeBracePair
:
return
SimpleTypes
::
Vml
::
sptBracePair
;
case
SimpleTypes
:
:
shapetypeStar4
:
return
SimpleTypes
::
Vml
::
sptSeal4
;
case
SimpleTypes
:
:
shapetypeDoubleWave
:
return
SimpleTypes
::
Vml
::
sptDoubleWave
;
case
SimpleTypes
:
:
shapetypeActionButtonBlank
:
return
SimpleTypes
::
Vml
::
sptActionButtonBlank
;
case
SimpleTypes
:
:
shapetypeActionButtonHome
:
return
SimpleTypes
::
Vml
::
sptActionButtonHome
;
case
SimpleTypes
:
:
shapetypeActionButtonHelp
:
return
SimpleTypes
::
Vml
::
sptActionButtonHelp
;
case
SimpleTypes
:
:
shapetypeActionButtonInformation
:
return
SimpleTypes
::
Vml
::
sptActionButtonInformation
;
case
SimpleTypes
:
:
shapetypeActionButtonForwardNext
:
return
SimpleTypes
::
Vml
::
sptActionButtonForwardNext
;
case
SimpleTypes
:
:
shapetypeActionButtonBackPrevious
:
return
SimpleTypes
::
Vml
::
sptActionButtonBackPrevious
;
case
SimpleTypes
:
:
shapetypeActionButtonEnd
:
return
SimpleTypes
::
Vml
::
sptActionButtonEnd
;
case
SimpleTypes
:
:
shapetypeActionButtonBeginning
:
return
SimpleTypes
::
Vml
::
sptActionButtonBeginning
;
case
SimpleTypes
:
:
shapetypeActionButtonReturn
:
return
SimpleTypes
::
Vml
::
sptActionButtonReturn
;
case
SimpleTypes
:
:
shapetypeActionButtonDocument
:
return
SimpleTypes
::
Vml
::
sptActionButtonDocument
;
case
SimpleTypes
:
:
shapetypeActionButtonSound
:
return
SimpleTypes
::
Vml
::
sptActionButtonSound
;
case
SimpleTypes
:
:
shapetypeActionButtonMovie
:
return
SimpleTypes
::
Vml
::
sptActionButtonMovie
;
default:
return
SimpleTypes
::
Vml
::
sptNotPrimitive
;
}
}
namespace
Logic
namespace
Logic
{
{
Shape
::
Shape
()
Shape
::
Shape
()
...
@@ -583,7 +409,7 @@ namespace PPTX
...
@@ -583,7 +409,7 @@ namespace PPTX
const
PPTX
::
Logic
::
PrstGeom
&
lpGeom
=
spPr
.
Geometry
.
as
<
PPTX
::
Logic
::
PrstGeom
>
();
const
PPTX
::
Logic
::
PrstGeom
&
lpGeom
=
spPr
.
Geometry
.
as
<
PPTX
::
Logic
::
PrstGeom
>
();
SimpleTypes
::
CShapeType
<>
ooxPrst
=
SimpleTypes
::
CShapeType
<>
(
lpGeom
.
prst
.
get
());
SimpleTypes
::
CShapeType
<>
ooxPrst
=
SimpleTypes
::
CShapeType
<>
(
lpGeom
.
prst
.
get
());
vmlPrst
=
Spt2
ShapeType
(
ooxPrst
.
GetValue
());
vmlPrst
=
OOX
::
PrstGeom2Vml
ShapeType
(
ooxPrst
.
GetValue
());
}
}
if
(
spPr
.
xfrm
.
is_init
())
if
(
spPr
.
xfrm
.
is_init
())
...
@@ -694,12 +520,13 @@ namespace PPTX
...
@@ -694,12 +520,13 @@ namespace PPTX
if
(
!
bOle
)
if
(
!
bOle
)
{
{
oStylesWriter
.
ClearNoAttack
();
//oStylesWriter.ClearNoAttack();
oStylesWriter
.
m_oWriter
.
AddSize
(
30
);
//oStylesWriter.m_oWriter.AddSize(30);
oStylesWriter
.
m_oWriter
.
AddIntNoCheck
(
dW
/
100
);
//oStylesWriter.m_oWriter.AddIntNoCheck(dW / 100);
oStylesWriter
.
m_oWriter
.
AddCharNoCheck
(
WCHAR
(
','
));
//oStylesWriter.m_oWriter.AddCharNoCheck(WCHAR(','));
oStylesWriter
.
m_oWriter
.
AddIntNoCheck
(
dH
/
100
);
//oStylesWriter.m_oWriter.AddIntNoCheck(dH / 100);
pWriter
->
WriteAttribute
(
L"coordsize"
,
oStylesWriter
.
GetXmlString
());
//pWriter->WriteAttribute(L"coordsize", oStylesWriter.GetXmlString());
pWriter
->
WriteAttribute
(
L"coordsize"
,
L"100000,100000"
);
pWriter
->
WriteAttribute
(
L"path"
,
strPath
);
pWriter
->
WriteAttribute
(
L"path"
,
strPath
);
}
}
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Shape.h
View file @
63655a97
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
#ifndef PPTX_LOGIC_SHAPE_INCLUDE_H_
#ifndef PPTX_LOGIC_SHAPE_INCLUDE_H_
#define PPTX_LOGIC_SHAPE_INCLUDE_H_
#define PPTX_LOGIC_SHAPE_INCLUDE_H_
#include ".
/.
./WrapperWritingElement.h"
#include "../WrapperWritingElement.h"
#include "NvSpPr.h"
#include "NvSpPr.h"
#include "SpPr.h"
#include "SpPr.h"
#include "ShapeStyle.h"
#include "ShapeStyle.h"
...
@@ -44,7 +44,230 @@
...
@@ -44,7 +44,230 @@
#include "Ln.h"
#include "Ln.h"
#include "../../../ASCOfficeDocxFile2/DocWrapper/DocxSerializer.h"
#include "../../../ASCOfficeDocxFile2/DocWrapper/DocxSerializer.h"
#include "../../../Common/DocxFormat/Source/Common/SimpleTypes_Vml.h"
namespace
OOX
{
static
SimpleTypes
::
Vml
::
SptType
PrstGeom2VmlShapeType
(
SimpleTypes
::
EShapeType
type
)
{
switch
(
type
)
{
case
SimpleTypes
:
:
shapetypeRect
:
return
SimpleTypes
::
Vml
::
sptRectangle
;
case
SimpleTypes
:
:
shapetypeRoundRect
:
return
SimpleTypes
::
Vml
::
sptRoundRectangle
;
case
SimpleTypes
:
:
shapetypeEllipse
:
return
SimpleTypes
::
Vml
::
sptEllipse
;
case
SimpleTypes
:
:
shapetypeDiamond
:
return
SimpleTypes
::
Vml
::
sptDiamond
;
case
SimpleTypes
:
:
shapetypeTriangle
:
return
SimpleTypes
::
Vml
::
sptIsocelesTriangle
;
case
SimpleTypes
:
:
shapetypeRtTriangle
:
return
SimpleTypes
::
Vml
::
sptRightTriangle
;
case
SimpleTypes
:
:
shapetypeParallelogram
:
return
SimpleTypes
::
Vml
::
sptParallelogram
;
case
SimpleTypes
:
:
shapetypeTrapezoid
:
return
SimpleTypes
::
Vml
::
sptTrapezoid
;
case
SimpleTypes
:
:
shapetypeHexagon
:
return
SimpleTypes
::
Vml
::
sptHexagon
;
case
SimpleTypes
:
:
shapetypeOctagon
:
return
SimpleTypes
::
Vml
::
sptOctagon
;
case
SimpleTypes
:
:
shapetypePlus
:
return
SimpleTypes
::
Vml
::
sptPlus
;
case
SimpleTypes
:
:
shapetypeStar5
:
return
SimpleTypes
::
Vml
::
sptStar
;
case
SimpleTypes
:
:
shapetypeRightArrow
:
return
SimpleTypes
::
Vml
::
sptArrow
;
case
SimpleTypes
:
:
shapetypeThickArrow
:
return
SimpleTypes
::
Vml
::
sptThickArrow
;
case
SimpleTypes
:
:
shapetypeHomePlate
:
return
SimpleTypes
::
Vml
::
sptHomePlate
;
case
SimpleTypes
:
:
shapetypeCube
:
return
SimpleTypes
::
Vml
::
sptCube
;
case
SimpleTypes
:
:
shapetypeBallon
:
return
SimpleTypes
::
Vml
::
sptBalloon
;
// case SimpleTypes::shapetypeIrregularSeal1: return SimpleTypes::Vml::sptSeal ;
case
SimpleTypes
:
:
shapetypeArc
:
return
SimpleTypes
::
Vml
::
sptArc
;
case
SimpleTypes
:
:
shapetypeLine
:
return
SimpleTypes
::
Vml
::
sptLine
;
case
SimpleTypes
:
:
shapetypePlaque
:
return
SimpleTypes
::
Vml
::
sptPlaque
;
case
SimpleTypes
:
:
shapetypeCan
:
return
SimpleTypes
::
Vml
::
sptCan
;
case
SimpleTypes
:
:
shapetypeDonut
:
return
SimpleTypes
::
Vml
::
sptDonut
;
// case SimpleTypes::shapetypeTextSimple : return SimpleTypes::Vml::sptTextSimple ;
// case SimpleTypes::shapetypeTextOctagon : return SimpleTypes::Vml::sptTextOctagon ;
// case SimpleTypes::shapetypeTextHexagon : return SimpleTypes::Vml::sptTextHexagon ;
// case SimpleTypes::shapetypeTextCurve : return SimpleTypes::Vml::sptTextCurve ;
// case SimpleTypes::shapetypeTextWave : return SimpleTypes::Vml::sptTextWave ;
// case SimpleTypes::shapetypeTextRing : return SimpleTypes::Vml::sptTextRing ;
// case SimpleTypes::shapetypeTextOnCurve : return SimpleTypes::Vml::sptTextOnCurve ;
// case SimpleTypes::shapetypeTextOnRing : return SimpleTypes::Vml::sptTextOnRing ;
case
SimpleTypes
:
:
shapetypeStraightConnector1
:
return
SimpleTypes
::
Vml
::
sptStraightConnector1
;
case
SimpleTypes
:
:
shapetypeBentConnector2
:
return
SimpleTypes
::
Vml
::
sptBentConnector2
;
case
SimpleTypes
:
:
shapetypeBentConnector3
:
return
SimpleTypes
::
Vml
::
sptBentConnector3
;
case
SimpleTypes
:
:
shapetypeBentConnector4
:
return
SimpleTypes
::
Vml
::
sptBentConnector4
;
case
SimpleTypes
:
:
shapetypeBentConnector5
:
return
SimpleTypes
::
Vml
::
sptBentConnector5
;
case
SimpleTypes
:
:
shapetypeCurvedConnector2
:
return
SimpleTypes
::
Vml
::
sptCurvedConnector2
;
case
SimpleTypes
:
:
shapetypeCurvedConnector3
:
return
SimpleTypes
::
Vml
::
sptCurvedConnector3
;
case
SimpleTypes
:
:
shapetypeCurvedConnector4
:
return
SimpleTypes
::
Vml
::
sptCurvedConnector4
;
case
SimpleTypes
:
:
shapetypeCurvedConnector5
:
return
SimpleTypes
::
Vml
::
sptCurvedConnector5
;
case
SimpleTypes
:
:
shapetypeCallout1
:
return
SimpleTypes
::
Vml
::
sptCallout1
;
case
SimpleTypes
:
:
shapetypeCallout2
:
return
SimpleTypes
::
Vml
::
sptCallout2
;
case
SimpleTypes
:
:
shapetypeCallout3
:
return
SimpleTypes
::
Vml
::
sptCallout3
;
case
SimpleTypes
:
:
shapetypeAccentCallout1
:
return
SimpleTypes
::
Vml
::
sptAccentCallout1
;
case
SimpleTypes
:
:
shapetypeAccentCallout2
:
return
SimpleTypes
::
Vml
::
sptAccentCallout2
;
case
SimpleTypes
:
:
shapetypeAccentCallout3
:
return
SimpleTypes
::
Vml
::
sptAccentCallout3
;
case
SimpleTypes
:
:
shapetypeAccentBorderCallout1
:
return
SimpleTypes
::
Vml
::
sptAccentBorderCallout1
;
case
SimpleTypes
:
:
shapetypeAccentBorderCallout2
:
return
SimpleTypes
::
Vml
::
sptAccentBorderCallout2
;
case
SimpleTypes
:
:
shapetypeAccentBorderCallout3
:
return
SimpleTypes
::
Vml
::
sptAccentBorderCallout3
;
case
SimpleTypes
:
:
shapetypeRibbon
:
return
SimpleTypes
::
Vml
::
sptRibbon
;
case
SimpleTypes
:
:
shapetypeRibbon2
:
return
SimpleTypes
::
Vml
::
sptRibbon2
;
case
SimpleTypes
:
:
shapetypeChevron
:
return
SimpleTypes
::
Vml
::
sptChevron
;
case
SimpleTypes
:
:
shapetypePentagon
:
return
SimpleTypes
::
Vml
::
sptPentagon
;
case
SimpleTypes
:
:
shapetypeNoSmoking
:
return
SimpleTypes
::
Vml
::
sptNoSmoking
;
case
SimpleTypes
:
:
shapetypeStar8
:
return
SimpleTypes
::
Vml
::
sptSeal8
;
case
SimpleTypes
:
:
shapetypeStar16
:
return
SimpleTypes
::
Vml
::
sptSeal16
;
case
SimpleTypes
:
:
shapetypeStar32
:
return
SimpleTypes
::
Vml
::
sptSeal32
;
case
SimpleTypes
:
:
shapetypeWedgeRectCallout
:
return
SimpleTypes
::
Vml
::
sptWedgeRectCallout
;
case
SimpleTypes
:
:
shapetypeWedgeRoundRectCallout
:
return
SimpleTypes
::
Vml
::
sptWedgeRRectCallout
;
case
SimpleTypes
:
:
shapetypeWedgeEllipseCallout
:
return
SimpleTypes
::
Vml
::
sptWedgeEllipseCallout
;
case
SimpleTypes
:
:
shapetypeWave
:
return
SimpleTypes
::
Vml
::
sptWave
;
case
SimpleTypes
:
:
shapetypeFoldedCorner
:
return
SimpleTypes
::
Vml
::
sptFoldedCorner
;
case
SimpleTypes
:
:
shapetypeLeftArrow
:
return
SimpleTypes
::
Vml
::
sptLeftArrow
;
case
SimpleTypes
:
:
shapetypeDownArrow
:
return
SimpleTypes
::
Vml
::
sptDownArrow
;
case
SimpleTypes
:
:
shapetypeUpArrow
:
return
SimpleTypes
::
Vml
::
sptUpArrow
;
case
SimpleTypes
:
:
shapetypeLeftRightArrow
:
return
SimpleTypes
::
Vml
::
sptLeftRightArrow
;
case
SimpleTypes
:
:
shapetypeUpDownArrow
:
return
SimpleTypes
::
Vml
::
sptUpDownArrow
;
case
SimpleTypes
:
:
shapetypeIrregularSeal1
:
return
SimpleTypes
::
Vml
::
sptIrregularSeal1
;
case
SimpleTypes
:
:
shapetypeIrregularSeal2
:
return
SimpleTypes
::
Vml
::
sptIrregularSeal2
;
case
SimpleTypes
:
:
shapetypeLightningBolt
:
return
SimpleTypes
::
Vml
::
sptLightningBolt
;
case
SimpleTypes
:
:
shapetypeHeart
:
return
SimpleTypes
::
Vml
::
sptHeart
;
case
SimpleTypes
:
:
shapetypeQuadArrow
:
return
SimpleTypes
::
Vml
::
sptQuadArrow
;
case
SimpleTypes
:
:
shapetypeLeftArrowCallout
:
return
SimpleTypes
::
Vml
::
sptLeftArrowCallout
;
case
SimpleTypes
:
:
shapetypeRightArrowCallout
:
return
SimpleTypes
::
Vml
::
sptRightArrowCallout
;
case
SimpleTypes
:
:
shapetypeUpArrowCallout
:
return
SimpleTypes
::
Vml
::
sptUpArrowCallout
;
case
SimpleTypes
:
:
shapetypeDownArrowCallout
:
return
SimpleTypes
::
Vml
::
sptDownArrowCallout
;
case
SimpleTypes
:
:
shapetypeLeftRightArrowCallout
:
return
SimpleTypes
::
Vml
::
sptLeftRightArrowCallout
;
case
SimpleTypes
:
:
shapetypeUpDownArrowCallout
:
return
SimpleTypes
::
Vml
::
sptUpDownArrowCallout
;
case
SimpleTypes
:
:
shapetypeQuadArrowCallout
:
return
SimpleTypes
::
Vml
::
sptQuadArrowCallout
;
case
SimpleTypes
:
:
shapetypeBevel
:
return
SimpleTypes
::
Vml
::
sptBevel
;
case
SimpleTypes
:
:
shapetypeLeftBracket
:
return
SimpleTypes
::
Vml
::
sptLeftBracket
;
case
SimpleTypes
:
:
shapetypeRightBracket
:
return
SimpleTypes
::
Vml
::
sptRightBracket
;
case
SimpleTypes
:
:
shapetypeLeftBrace
:
return
SimpleTypes
::
Vml
::
sptLeftBrace
;
case
SimpleTypes
:
:
shapetypeRightBrace
:
return
SimpleTypes
::
Vml
::
sptRightBrace
;
case
SimpleTypes
:
:
shapetypeLeftUpArrow
:
return
SimpleTypes
::
Vml
::
sptLeftUpArrow
;
case
SimpleTypes
:
:
shapetypeBentUpArrow
:
return
SimpleTypes
::
Vml
::
sptBentUpArrow
;
case
SimpleTypes
:
:
shapetypeBentArrow
:
return
SimpleTypes
::
Vml
::
sptBentArrow
;
case
SimpleTypes
:
:
shapetypeStar24
:
return
SimpleTypes
::
Vml
::
sptSeal24
;
case
SimpleTypes
:
:
shapetypeStripedRightArrow
:
return
SimpleTypes
::
Vml
::
sptStripedRightArrow
;
case
SimpleTypes
:
:
shapetypeNotchedRightArrow
:
return
SimpleTypes
::
Vml
::
sptNotchedRightArrow
;
case
SimpleTypes
:
:
shapetypeBlockArc
:
return
SimpleTypes
::
Vml
::
sptBlockArc
;
case
SimpleTypes
:
:
shapetypeSmileyFace
:
return
SimpleTypes
::
Vml
::
sptSmileyFace
;
case
SimpleTypes
:
:
shapetypeVerticalScroll
:
return
SimpleTypes
::
Vml
::
sptVerticalScroll
;
case
SimpleTypes
:
:
shapetypeHorizontalScroll
:
return
SimpleTypes
::
Vml
::
sptHorizontalScroll
;
case
SimpleTypes
:
:
shapetypeCircularArrow
:
return
SimpleTypes
::
Vml
::
sptCircularArrow
;
// case SimpleTypes::shapetypeNotchedCircularArrow : return SimpleTypes::Vml::sptNotchedCircularArrow ;
case
SimpleTypes
:
:
shapetypeUturnArrow
:
return
SimpleTypes
::
Vml
::
sptUturnArrow
;
case
SimpleTypes
:
:
shapetypeCurvedRightArrow
:
return
SimpleTypes
::
Vml
::
sptCurvedRightArrow
;
case
SimpleTypes
:
:
shapetypeCurvedLeftArrow
:
return
SimpleTypes
::
Vml
::
sptCurvedLeftArrow
;
case
SimpleTypes
:
:
shapetypeCurvedUpArrow
:
return
SimpleTypes
::
Vml
::
sptCurvedUpArrow
;
case
SimpleTypes
:
:
shapetypeCurvedDownArrow
:
return
SimpleTypes
::
Vml
::
sptCurvedDownArrow
;
case
SimpleTypes
:
:
shapetypeCloudCallout
:
return
SimpleTypes
::
Vml
::
sptCloudCallout
;
case
SimpleTypes
:
:
shapetypeEllipseRibbon
:
return
SimpleTypes
::
Vml
::
sptEllipseRibbon
;
case
SimpleTypes
:
:
shapetypeEllipseRibbon2
:
return
SimpleTypes
::
Vml
::
sptEllipseRibbon2
;
case
SimpleTypes
:
:
shapetypeFlowChartProcess
:
return
SimpleTypes
::
Vml
::
sptFlowChartProcess
;
case
SimpleTypes
:
:
shapetypeFlowChartDecision
:
return
SimpleTypes
::
Vml
::
sptFlowChartDecision
;
case
SimpleTypes
:
:
shapetypeFlowChartInputOutput
:
return
SimpleTypes
::
Vml
::
sptFlowChartInputOutput
;
case
SimpleTypes
:
:
shapetypeFlowChartInternalStorage
:
return
SimpleTypes
::
Vml
::
sptFlowChartInternalStorage
;
case
SimpleTypes
:
:
shapetypeFlowChartDocument
:
return
SimpleTypes
::
Vml
::
sptFlowChartDocument
;
case
SimpleTypes
:
:
shapetypeFlowChartMultidocument
:
return
SimpleTypes
::
Vml
::
sptFlowChartMultidocument
;
case
SimpleTypes
:
:
shapetypeFlowChartTerminator
:
return
SimpleTypes
::
Vml
::
sptFlowChartTerminator
;
case
SimpleTypes
:
:
shapetypeFlowChartPreparation
:
return
SimpleTypes
::
Vml
::
sptFlowChartPreparation
;
case
SimpleTypes
:
:
shapetypeFlowChartManualInput
:
return
SimpleTypes
::
Vml
::
sptFlowChartManualInput
;
case
SimpleTypes
:
:
shapetypeFlowChartManualOperation
:
return
SimpleTypes
::
Vml
::
sptFlowChartManualOperation
;
case
SimpleTypes
:
:
shapetypeFlowChartConnector
:
return
SimpleTypes
::
Vml
::
sptFlowChartConnector
;
case
SimpleTypes
:
:
shapetypeFlowChartPunchedCard
:
return
SimpleTypes
::
Vml
::
sptFlowChartPunchedCard
;
case
SimpleTypes
:
:
shapetypeFlowChartPunchedTape
:
return
SimpleTypes
::
Vml
::
sptFlowChartPunchedTape
;
case
SimpleTypes
:
:
shapetypeFlowChartSummingJunction
:
return
SimpleTypes
::
Vml
::
sptFlowChartSummingJunction
;
case
SimpleTypes
:
:
shapetypeFlowChartOr
:
return
SimpleTypes
::
Vml
::
sptFlowChartOr
;
case
SimpleTypes
:
:
shapetypeFlowChartCollate
:
return
SimpleTypes
::
Vml
::
sptFlowChartCollate
;
case
SimpleTypes
:
:
shapetypeFlowChartSort
:
return
SimpleTypes
::
Vml
::
sptFlowChartSort
;
case
SimpleTypes
:
:
shapetypeFlowChartExtract
:
return
SimpleTypes
::
Vml
::
sptFlowChartExtract
;
case
SimpleTypes
:
:
shapetypeFlowChartMerge
:
return
SimpleTypes
::
Vml
::
sptFlowChartMerge
;
//case SimpleTypes::shapetypeChartOfflineStorage : return SimpleTypes::Vml::sptFlowChartOfflineStorage ;
case
SimpleTypes
:
:
shapetypeFlowChartOnlineStorage
:
return
SimpleTypes
::
Vml
::
sptFlowChartOnlineStorage
;
case
SimpleTypes
:
:
shapetypeFlowChartMagneticTape
:
return
SimpleTypes
::
Vml
::
sptFlowChartMagneticTape
;
case
SimpleTypes
:
:
shapetypeFlowChartMagneticDisk
:
return
SimpleTypes
::
Vml
::
sptFlowChartMagneticDisk
;
case
SimpleTypes
:
:
shapetypeFlowChartMagneticDrum
:
return
SimpleTypes
::
Vml
::
sptFlowChartMagneticDrum
;
case
SimpleTypes
:
:
shapetypeFlowChartDisplay
:
return
SimpleTypes
::
Vml
::
sptFlowChartDisplay
;
case
SimpleTypes
:
:
shapetypeFlowChartDelay
:
return
SimpleTypes
::
Vml
::
sptFlowChartDelay
;
// case SimpleTypes::shapetypeTextWave3 : return SimpleTypes::Vml::sptTextWave3 ;
case
SimpleTypes
:
:
shapetypeTextInflateBottom
:
return
SimpleTypes
::
Vml
::
sptTextInflateBottom
;
case
SimpleTypes
:
:
shapetypeTextDeflateBottom
:
return
SimpleTypes
::
Vml
::
sptTextDeflateBottom
;
case
SimpleTypes
:
:
shapetypeTextInflateTop
:
return
SimpleTypes
::
Vml
::
sptTextInflateTop
;
case
SimpleTypes
:
:
shapetypeTextDeflateTop
:
return
SimpleTypes
::
Vml
::
sptTextDeflateTop
;
case
SimpleTypes
:
:
shapetypeTextDeflateInflate
:
return
SimpleTypes
::
Vml
::
sptTextDeflateInflate
;
case
SimpleTypes
:
:
shapetypeTextFadeRight
:
return
SimpleTypes
::
Vml
::
sptTextFadeRight
;
case
SimpleTypes
:
:
shapetypeTextFadeLeft
:
return
SimpleTypes
::
Vml
::
sptTextFadeLeft
;
case
SimpleTypes
:
:
shapetypeTextFadeUp
:
return
SimpleTypes
::
Vml
::
sptTextFadeUp
;
case
SimpleTypes
:
:
shapetypeTextFadeDown
:
return
SimpleTypes
::
Vml
::
sptTextFadeDown
;
case
SimpleTypes
:
:
shapetypeBorderCallout1
:
return
SimpleTypes
::
Vml
::
sptBorderCallout1
;
case
SimpleTypes
:
:
shapetypeBorderCallout2
:
return
SimpleTypes
::
Vml
::
sptBorderCallout2
;
case
SimpleTypes
:
:
shapetypeBorderCallout3
:
return
SimpleTypes
::
Vml
::
sptBorderCallout3
;
case
SimpleTypes
:
:
shapetypeLeftRightUpArrow
:
return
SimpleTypes
::
Vml
::
sptLeftRightUpArrow
;
case
SimpleTypes
:
:
shapetypeSun
:
return
SimpleTypes
::
Vml
::
sptSun
;
case
SimpleTypes
:
:
shapetypeMoon
:
return
SimpleTypes
::
Vml
::
sptMoon
;
case
SimpleTypes
:
:
shapetypeBracketPair
:
return
SimpleTypes
::
Vml
::
sptBracketPair
;
case
SimpleTypes
:
:
shapetypeBracePair
:
return
SimpleTypes
::
Vml
::
sptBracePair
;
case
SimpleTypes
:
:
shapetypeStar4
:
return
SimpleTypes
::
Vml
::
sptSeal4
;
case
SimpleTypes
:
:
shapetypeDoubleWave
:
return
SimpleTypes
::
Vml
::
sptDoubleWave
;
case
SimpleTypes
:
:
shapetypeActionButtonBlank
:
return
SimpleTypes
::
Vml
::
sptActionButtonBlank
;
case
SimpleTypes
:
:
shapetypeActionButtonHome
:
return
SimpleTypes
::
Vml
::
sptActionButtonHome
;
case
SimpleTypes
:
:
shapetypeActionButtonHelp
:
return
SimpleTypes
::
Vml
::
sptActionButtonHelp
;
case
SimpleTypes
:
:
shapetypeActionButtonInformation
:
return
SimpleTypes
::
Vml
::
sptActionButtonInformation
;
case
SimpleTypes
:
:
shapetypeActionButtonForwardNext
:
return
SimpleTypes
::
Vml
::
sptActionButtonForwardNext
;
case
SimpleTypes
:
:
shapetypeActionButtonBackPrevious
:
return
SimpleTypes
::
Vml
::
sptActionButtonBackPrevious
;
case
SimpleTypes
:
:
shapetypeActionButtonEnd
:
return
SimpleTypes
::
Vml
::
sptActionButtonEnd
;
case
SimpleTypes
:
:
shapetypeActionButtonBeginning
:
return
SimpleTypes
::
Vml
::
sptActionButtonBeginning
;
case
SimpleTypes
:
:
shapetypeActionButtonReturn
:
return
SimpleTypes
::
Vml
::
sptActionButtonReturn
;
case
SimpleTypes
:
:
shapetypeActionButtonDocument
:
return
SimpleTypes
::
Vml
::
sptActionButtonDocument
;
case
SimpleTypes
:
:
shapetypeActionButtonSound
:
return
SimpleTypes
::
Vml
::
sptActionButtonSound
;
case
SimpleTypes
:
:
shapetypeActionButtonMovie
:
return
SimpleTypes
::
Vml
::
sptActionButtonMovie
;
default:
return
SimpleTypes
::
Vml
::
sptNotPrimitive
;
}
}
static
SimpleTypes
::
Vml
::
SptType
PrstTx2VmlShapeType
(
SimpleTypes
::
ETextShapeType
type
)
{
switch
(
type
)
{
// case SimpleTypes::textshapetypeTextArchDown: return SimpleTypes::Vml::sptTextArchDown;
case
SimpleTypes
:
:
textshapetypeTextArchDownPour
:
return
SimpleTypes
::
Vml
::
sptTextArchDownPour
;
// case SimpleTypes::textshapetypeTextArchUp: return SimpleTypes::Vml::sptTextArchUp ;
case
SimpleTypes
:
:
textshapetypeTextArchUpPour
:
return
SimpleTypes
::
Vml
::
sptTextArchUpPour
;
// case SimpleTypes::textshapetypeTextButton: return SimpleTypes::Vml::sptTextButton ;
case
SimpleTypes
:
:
textshapetypeTextButtonPour
:
return
SimpleTypes
::
Vml
::
sptTextButtonPour
;
case
SimpleTypes
:
:
textshapetypeTextCanDown
:
return
SimpleTypes
::
Vml
::
sptTextCanDown
;
case
SimpleTypes
:
:
textshapetypeTextCanUp
:
return
SimpleTypes
::
Vml
::
sptTextCanUp
;
case
SimpleTypes
:
:
textshapetypeTextCascadeDown
:
return
SimpleTypes
::
Vml
::
sptTextCascadeDown
;
case
SimpleTypes
:
:
textshapetypeTextCascadeUp
:
return
SimpleTypes
::
Vml
::
sptTextCascadeUp
;
case
SimpleTypes
:
:
textshapetypeTextChevron
:
return
SimpleTypes
::
Vml
::
sptTextChevron
;
case
SimpleTypes
:
:
textshapetypeTextChevronInverted
:
return
SimpleTypes
::
Vml
::
sptTextChevronInverted
;
// case SimpleTypes::textshapetypeTextCircle: return SimpleTypes::Vml::sptTextCircle ;
case
SimpleTypes
:
:
textshapetypeTextCirclePour
:
return
SimpleTypes
::
Vml
::
sptTextCirclePour
;
case
SimpleTypes
:
:
textshapetypeTextCurveDown
:
return
SimpleTypes
::
Vml
::
sptTextCurveDown
;
case
SimpleTypes
:
:
textshapetypeTextCurveUp
:
return
SimpleTypes
::
Vml
::
sptTextCurveUp
;
case
SimpleTypes
:
:
textshapetypeTextDeflate
:
return
SimpleTypes
::
Vml
::
sptTextDeflate
;
case
SimpleTypes
:
:
textshapetypeTextDeflateBottom
:
return
SimpleTypes
::
Vml
::
sptTextDeflateBottom
;
case
SimpleTypes
:
:
textshapetypeTextDeflateInflate
:
return
SimpleTypes
::
Vml
::
sptTextDeflateInflate
;
// case SimpleTypes::textshapetypeTextDeflateInflateDeflate: return SimpleTypes::Vml::sptDeflateInflateDeflate;
case
SimpleTypes
:
:
textshapetypeTextDeflateTop
:
return
SimpleTypes
::
Vml
::
sptTextDeflateTop
;
// case SimpleTypes::textshapetypeTextDoubleWave1: return SimpleTypes::Vml::sptTextDoubleWave ;
case
SimpleTypes
:
:
textshapetypeTextFadeDown
:
return
SimpleTypes
::
Vml
::
sptTextFadeDown
;
case
SimpleTypes
:
:
textshapetypeTextFadeLeft
:
return
SimpleTypes
::
Vml
::
sptTextFadeLeft
;
case
SimpleTypes
:
:
textshapetypeTextFadeRight
:
return
SimpleTypes
::
Vml
::
sptTextFadeRight
;
case
SimpleTypes
:
:
textshapetypeTextFadeUp
:
return
SimpleTypes
::
Vml
::
sptTextFadeUp
;
case
SimpleTypes
:
:
textshapetypeTextInflate
:
return
SimpleTypes
::
Vml
::
sptTextPlainText
;
case
SimpleTypes
:
:
textshapetypeTextInflateBottom
:
return
SimpleTypes
::
Vml
::
sptTextPlainText
;
case
SimpleTypes
:
:
textshapetypeTextInflateTop
:
return
SimpleTypes
::
Vml
::
sptTextInflateTop
;
case
SimpleTypes
:
:
textshapetypeTextPlain
:
return
SimpleTypes
::
Vml
::
sptTextPlainText
;
case
SimpleTypes
:
:
textshapetypeTextRingInside
:
return
SimpleTypes
::
Vml
::
sptTextRingInside
;
case
SimpleTypes
:
:
textshapetypeTextRingOutside
:
return
SimpleTypes
::
Vml
::
sptTextRingOutside
;
case
SimpleTypes
:
:
textshapetypeTextSlantDown
:
return
SimpleTypes
::
Vml
::
sptTextSlantDown
;
case
SimpleTypes
:
:
textshapetypeTextSlantUp
:
return
SimpleTypes
::
Vml
::
sptTextSlantUp
;
case
SimpleTypes
:
:
textshapetypeTextStop
:
return
SimpleTypes
::
Vml
::
sptTextStop
;
case
SimpleTypes
:
:
textshapetypeTextTriangle
:
return
SimpleTypes
::
Vml
::
sptTextTriangle
;
case
SimpleTypes
:
:
textshapetypeTextTriangleInverted
:
return
SimpleTypes
::
Vml
::
sptTextTriangleInverted
;
case
SimpleTypes
:
:
textshapetypeTextWave1
:
return
SimpleTypes
::
Vml
::
sptTextWave1
;
case
SimpleTypes
:
:
textshapetypeTextWave2
:
return
SimpleTypes
::
Vml
::
sptTextWave2
;
case
SimpleTypes
:
:
textshapetypeTextWave4
:
return
SimpleTypes
::
Vml
::
sptTextWave4
;
default:
return
SimpleTypes
::
Vml
::
sptNotPrimitive
;
}
}
}
namespace
PPTX
namespace
PPTX
{
{
namespace
Logic
namespace
Logic
...
...
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXParagraphElementReaders.cpp
View file @
63655a97
...
@@ -874,21 +874,21 @@ bool OOXRunReader::Parse( ReaderParameter oParam , RtfParagraph& oOutputParagrap
...
@@ -874,21 +874,21 @@ bool OOXRunReader::Parse( ReaderParameter oParam , RtfParagraph& oOutputParagrap
oOutputParagraph
.
AddItem
(
pNewChar
);
oOutputParagraph
.
AddItem
(
pNewChar
);
}
break
;
}
break
;
case
OOX
:
:
et_mc_alternateContent
:
case
OOX
:
:
et_mc_alternateContent
:
{
//выбираем всегда более старую версию
{
OOX
::
Logic
::
CAlternateContent
*
ooxAlt
=
dynamic_cast
<
OOX
::
Logic
::
CAlternateContent
*
>
(
ooxItem
);
OOX
::
Logic
::
CAlternateContent
*
ooxAlt
=
dynamic_cast
<
OOX
::
Logic
::
CAlternateContent
*
>
(
ooxItem
);
if
(
!
ooxAlt
->
m_arrChoiceItems
.
empty
())
if
(
!
ooxAlt
->
m_arrChoiceItems
.
empty
())
{
{
for
(
size_t
i
=
0
;
i
<
ooxAlt
->
m_arr
Fallback
Items
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
ooxAlt
->
m_arr
Choice
Items
.
size
();
i
++
)
{
{
Parse
(
oParam
,
oOutputParagraph
,
poStyle
,
oNewProperty
,
ooxAlt
->
m_arr
Fallback
Items
[
i
]);
Parse
(
oParam
,
oOutputParagraph
,
poStyle
,
oNewProperty
,
ooxAlt
->
m_arr
Choice
Items
[
i
]);
}
}
}
}
else
else
{
{
for
(
size_t
i
=
0
;
i
<
ooxAlt
->
m_arr
Choice
Items
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
ooxAlt
->
m_arr
Fallback
Items
.
size
();
i
++
)
{
{
Parse
(
oParam
,
oOutputParagraph
,
poStyle
,
oNewProperty
,
ooxAlt
->
m_arr
Choice
Items
[
i
]);
Parse
(
oParam
,
oOutputParagraph
,
poStyle
,
oNewProperty
,
ooxAlt
->
m_arr
Fallback
Items
[
i
]);
}
}
}
}
}
break
;
}
break
;
case
OOX
:
:
et_w_sym
:
case
OOX
:
:
et_w_sym
:
...
...
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXShapeReader.cpp
View file @
63655a97
...
@@ -33,8 +33,7 @@
...
@@ -33,8 +33,7 @@
#include "OOXTextItemReader.h"
#include "OOXTextItemReader.h"
#include "../../../ASCOfficePPTXFile/Editor/Drawing/Elements.h"
#include "../../../ASCOfficePPTXFile/Editor/Drawing/Elements.h"
//#include "../../../ASCOfficePPTXFile/Editor/Drawing/Shapes/BaseShape/Common.h"
#include "../../../ASCOfficePPTXFile/PPTXFormat/Logic/Shape.h"
#include "../../../Common/DocxFormat/Source/Common/SimpleTypes_Vml.h"
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string.hpp>
...
@@ -42,56 +41,6 @@
...
@@ -42,56 +41,6 @@
#define RGB(r,g,b) ((_UINT32)(((BYTE)(r)|((_UINT16)((BYTE)(g))<<8))|(((_UINT32)(BYTE)(b))<<16)))
#define RGB(r,g,b) ((_UINT32)(((BYTE)(r)|((_UINT16)((BYTE)(g))<<8))|(((_UINT32)(BYTE)(b))<<16)))
#endif
#endif
SimpleTypes
::
Vml
::
SptType
static
PrstTx2ShapeType
(
SimpleTypes
::
ETextShapeType
type
)
{
switch
(
type
)
{
// case SimpleTypes::textshapetypeTextArchDown: return SimpleTypes::Vml::sptTextArchDown;
case
SimpleTypes
:
:
textshapetypeTextArchDownPour
:
return
SimpleTypes
::
Vml
::
sptTextArchDownPour
;
// case SimpleTypes::textshapetypeTextArchUp: return SimpleTypes::Vml::sptTextArchUp ;
case
SimpleTypes
:
:
textshapetypeTextArchUpPour
:
return
SimpleTypes
::
Vml
::
sptTextArchUpPour
;
// case SimpleTypes::textshapetypeTextButton: return SimpleTypes::Vml::sptTextButton ;
case
SimpleTypes
:
:
textshapetypeTextButtonPour
:
return
SimpleTypes
::
Vml
::
sptTextButtonPour
;
case
SimpleTypes
:
:
textshapetypeTextCanDown
:
return
SimpleTypes
::
Vml
::
sptTextCanDown
;
case
SimpleTypes
:
:
textshapetypeTextCanUp
:
return
SimpleTypes
::
Vml
::
sptTextCanUp
;
case
SimpleTypes
:
:
textshapetypeTextCascadeDown
:
return
SimpleTypes
::
Vml
::
sptTextCascadeDown
;
case
SimpleTypes
:
:
textshapetypeTextCascadeUp
:
return
SimpleTypes
::
Vml
::
sptTextCascadeUp
;
case
SimpleTypes
:
:
textshapetypeTextChevron
:
return
SimpleTypes
::
Vml
::
sptTextChevron
;
case
SimpleTypes
:
:
textshapetypeTextChevronInverted
:
return
SimpleTypes
::
Vml
::
sptTextChevronInverted
;
// case SimpleTypes::textshapetypeTextCircle: return SimpleTypes::Vml::sptTextCircle ;
case
SimpleTypes
:
:
textshapetypeTextCirclePour
:
return
SimpleTypes
::
Vml
::
sptTextCirclePour
;
case
SimpleTypes
:
:
textshapetypeTextCurveDown
:
return
SimpleTypes
::
Vml
::
sptTextCurveDown
;
case
SimpleTypes
:
:
textshapetypeTextCurveUp
:
return
SimpleTypes
::
Vml
::
sptTextCurveUp
;
case
SimpleTypes
:
:
textshapetypeTextDeflate
:
return
SimpleTypes
::
Vml
::
sptTextDeflate
;
case
SimpleTypes
:
:
textshapetypeTextDeflateBottom
:
return
SimpleTypes
::
Vml
::
sptTextDeflateBottom
;
case
SimpleTypes
:
:
textshapetypeTextDeflateInflate
:
return
SimpleTypes
::
Vml
::
sptTextDeflateInflate
;
// case SimpleTypes::textshapetypeTextDeflateInflateDeflate: return SimpleTypes::Vml::sptDeflateInflateDeflate;
case
SimpleTypes
:
:
textshapetypeTextDeflateTop
:
return
SimpleTypes
::
Vml
::
sptTextDeflateTop
;
// case SimpleTypes::textshapetypeTextDoubleWave1: return SimpleTypes::Vml::sptTextDoubleWave ;
case
SimpleTypes
:
:
textshapetypeTextFadeDown
:
return
SimpleTypes
::
Vml
::
sptTextFadeDown
;
case
SimpleTypes
:
:
textshapetypeTextFadeLeft
:
return
SimpleTypes
::
Vml
::
sptTextFadeLeft
;
case
SimpleTypes
:
:
textshapetypeTextFadeRight
:
return
SimpleTypes
::
Vml
::
sptTextFadeRight
;
case
SimpleTypes
:
:
textshapetypeTextFadeUp
:
return
SimpleTypes
::
Vml
::
sptTextFadeUp
;
case
SimpleTypes
:
:
textshapetypeTextInflate
:
return
SimpleTypes
::
Vml
::
sptTextPlainText
;
case
SimpleTypes
:
:
textshapetypeTextInflateBottom
:
return
SimpleTypes
::
Vml
::
sptTextPlainText
;
case
SimpleTypes
:
:
textshapetypeTextInflateTop
:
return
SimpleTypes
::
Vml
::
sptTextInflateTop
;
case
SimpleTypes
:
:
textshapetypeTextPlain
:
return
SimpleTypes
::
Vml
::
sptTextPlainText
;
case
SimpleTypes
:
:
textshapetypeTextRingInside
:
return
SimpleTypes
::
Vml
::
sptTextRingInside
;
case
SimpleTypes
:
:
textshapetypeTextRingOutside
:
return
SimpleTypes
::
Vml
::
sptTextRingOutside
;
case
SimpleTypes
:
:
textshapetypeTextSlantDown
:
return
SimpleTypes
::
Vml
::
sptTextSlantDown
;
case
SimpleTypes
:
:
textshapetypeTextSlantUp
:
return
SimpleTypes
::
Vml
::
sptTextSlantUp
;
case
SimpleTypes
:
:
textshapetypeTextStop
:
return
SimpleTypes
::
Vml
::
sptTextStop
;
case
SimpleTypes
:
:
textshapetypeTextTriangle
:
return
SimpleTypes
::
Vml
::
sptTextTriangle
;
case
SimpleTypes
:
:
textshapetypeTextTriangleInverted
:
return
SimpleTypes
::
Vml
::
sptTextTriangleInverted
;
case
SimpleTypes
:
:
textshapetypeTextWave1
:
return
SimpleTypes
::
Vml
::
sptTextWave1
;
case
SimpleTypes
:
:
textshapetypeTextWave2
:
return
SimpleTypes
::
Vml
::
sptTextWave2
;
case
SimpleTypes
:
:
textshapetypeTextWave4
:
return
SimpleTypes
::
Vml
::
sptTextWave4
;
default:
return
SimpleTypes
::
Vml
::
sptNotPrimitive
;
}
}
bool
ParseVmlStyle
(
RtfShapePtr
pShape
,
SimpleTypes
::
Vml
::
CCssProperty
*
prop
)
bool
ParseVmlStyle
(
RtfShapePtr
pShape
,
SimpleTypes
::
Vml
::
CCssProperty
*
prop
)
{
{
if
(
pShape
==
NULL
)
return
false
;
if
(
pShape
==
NULL
)
return
false
;
...
@@ -1087,7 +1036,7 @@ bool OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput)
...
@@ -1087,7 +1036,7 @@ bool OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput)
{
{
pOutput
->
m_bGtext
=
1
;
pOutput
->
m_bGtext
=
1
;
if
(
m_ooxShape
->
m_oTxBodyProperties
->
m_oPrstTxWrap
.
IsInit
())
if
(
m_ooxShape
->
m_oTxBodyProperties
->
m_oPrstTxWrap
.
IsInit
())
pOutput
->
m_nShapeType
=
PrstTx2
ShapeType
(
m_ooxShape
->
m_oTxBodyProperties
->
m_oPrstTxWrap
->
m_oPrst
.
GetValue
());
pOutput
->
m_nShapeType
=
OOX
::
PrstTx2Vml
ShapeType
(
m_ooxShape
->
m_oTxBodyProperties
->
m_oPrstTxWrap
->
m_oPrst
.
GetValue
());
else
else
pOutput
->
m_nShapeType
=
SimpleTypes
::
Vml
::
sptTextPlainText
;
pOutput
->
m_nShapeType
=
SimpleTypes
::
Vml
::
sptTextPlainText
;
...
@@ -1104,30 +1053,56 @@ bool OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput)
...
@@ -1104,30 +1053,56 @@ bool OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput)
OOX
::
Drawing
::
CPresetGeometry2D
*
geometry
=
m_ooxShape
->
m_oSpPr
->
m_oPrstGeom
.
GetPointer
();
OOX
::
Drawing
::
CPresetGeometry2D
*
geometry
=
m_ooxShape
->
m_oSpPr
->
m_oPrstGeom
.
GetPointer
();
SimpleTypes
::
EShapeType
type
=
geometry
->
m_oPrst
.
GetValue
();
SimpleTypes
::
EShapeType
type
=
geometry
->
m_oPrst
.
GetValue
();
switch
(
type
)
pOutput
->
m_nShapeType
=
OOX
::
PrstGeom2VmlShapeType
(
type
);
{
case
SimpleTypes
:
:
shapetypeRect
:
pOutput
->
m_nShapeType
=
NSOfficeDrawing
::
sptRectangle
;
break
;
if
(
pOutput
->
m_nShapeType
==
SimpleTypes
::
Vml
::
sptNotPrimitive
)
case
SimpleTypes
:
:
shapetypeEllipse
:
pOutput
->
m_nShapeType
=
NSOfficeDrawing
::
sptEllipse
;
break
;
case
SimpleTypes
:
:
shapetypeRoundRect
:
pOutput
->
m_nShapeType
=
NSOfficeDrawing
::
sptRoundRectangle
;
break
;
case
SimpleTypes
:
:
shapetypeLine
:
pOutput
->
m_nShapeType
=
NSOfficeDrawing
::
sptLine
;
break
;
case
SimpleTypes
:
:
shapetypeArc
:
pOutput
->
m_nShapeType
=
NSOfficeDrawing
::
sptArc
;
break
;
default:
break
;
}
if
(
pOutput
->
m_nShapeType
==
PROP_DEF
)
{
{
pOutput
->
m_nShapeType
=
0
;
//custom
pOutput
->
m_nShapeType
=
0
;
//custom
NSPresentationEditor
::
CShapeElement
*
pShapeElement
=
NULL
;
NSPresentationEditor
::
CShapeElement
*
pShapeElement
=
NULL
;
if
(
type
!=
OOXMLShapes
::
sptNil
)
if
(
type
!=
OOXMLShapes
::
sptNil
)
{
pShapeElement
=
new
NSPresentationEditor
::
CShapeElement
(
NSBaseShape
::
pptx
,
(
int
)
type
);
pShapeElement
=
new
NSPresentationEditor
::
CShapeElement
(
NSBaseShape
::
pptx
,
(
int
)
type
);
//std::wstring strAdjustValues = lpGeom.GetODString();
if
(
pShapeElement
)
//lpShapeElement->m_oShape.m_pShape->LoadAdjustValuesList(strAdjustValues);
{
delete
pShapeElement
;
}
}
}
}
}
}
if
(
m_ooxShape
->
m_oSpPr
->
m_oXfrm
.
IsInit
())
{
double
rot
=
m_ooxShape
->
m_oSpPr
->
m_oXfrm
->
m_oRot
.
GetAngle
();
if
(
rot
>
0.01
)
pOutput
->
m_nRotation
=
rot
*
65535
;
if
(
m_ooxShape
->
m_oSpPr
->
m_oXfrm
->
m_oFlipH
.
ToBool
())
pOutput
->
m_bFlipH
=
1
;
if
(
m_ooxShape
->
m_oSpPr
->
m_oXfrm
->
m_oFlipV
.
ToBool
())
pOutput
->
m_bFlipV
=
1
;
if
(
pOutput
->
m_bInGroup
)
{
if
(
m_ooxShape
->
m_oSpPr
->
m_oXfrm
->
m_oOff
.
IsInit
())
{
pOutput
->
m_nRelLeft
=
m_ooxShape
->
m_oSpPr
->
m_oXfrm
->
m_oOff
->
m_oX
.
ToEmu
();
pOutput
->
m_nRelTop
=
m_ooxShape
->
m_oSpPr
->
m_oXfrm
->
m_oOff
->
m_oY
.
ToEmu
();
}
else
{
pOutput
->
m_nRelLeft
=
0
;
pOutput
->
m_nRelTop
=
0
;
}
if
(
m_ooxShape
->
m_oSpPr
->
m_oXfrm
->
m_oExt
.
IsInit
())
{
pOutput
->
m_nRelRight
=
pOutput
->
m_nRelLeft
+
m_ooxShape
->
m_oSpPr
->
m_oXfrm
->
m_oExt
->
m_oCx
.
GetValue
();
pOutput
->
m_nRelBottom
=
pOutput
->
m_nRelTop
+
m_ooxShape
->
m_oSpPr
->
m_oXfrm
->
m_oExt
->
m_oCy
.
GetValue
();
}
else
{
pOutput
->
m_nRelRight
=
0
;
pOutput
->
m_nRelBottom
=
0
;
}
pOutput
->
m_nRelRotation
=
pOutput
->
m_nRotation
;
}
}
OOX
::
Drawing
::
CShapeStyle
*
oox_sp_style
=
m_ooxShape
->
m_oShapeStyle
.
GetPointer
();
OOX
::
Drawing
::
CShapeStyle
*
oox_sp_style
=
m_ooxShape
->
m_oShapeStyle
.
GetPointer
();
bool
use_fill_from_style
=
false
;
bool
use_fill_from_style
=
false
;
...
@@ -1137,7 +1112,7 @@ bool OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput)
...
@@ -1137,7 +1112,7 @@ bool OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput)
case
OOX
:
:
Drawing
::
filltypeBlip
:
Parse
(
oParam
,
pOutput
,
m_ooxShape
->
m_oSpPr
->
m_oBlipFill
.
GetPointer
());
break
;
case
OOX
:
:
Drawing
::
filltypeBlip
:
Parse
(
oParam
,
pOutput
,
m_ooxShape
->
m_oSpPr
->
m_oBlipFill
.
GetPointer
());
break
;
case
OOX
:
:
Drawing
::
filltypeGradient
:
Parse
(
oParam
,
pOutput
,
m_ooxShape
->
m_oSpPr
->
m_oGradFill
.
GetPointer
());
break
;
case
OOX
:
:
Drawing
::
filltypeGradient
:
Parse
(
oParam
,
pOutput
,
m_ooxShape
->
m_oSpPr
->
m_oGradFill
.
GetPointer
());
break
;
case
OOX
:
:
Drawing
::
filltypePattern
:
Parse
(
oParam
,
pOutput
,
m_ooxShape
->
m_oSpPr
->
m_oPattFill
.
GetPointer
());
break
;
case
OOX
:
:
Drawing
::
filltypePattern
:
Parse
(
oParam
,
pOutput
,
m_ooxShape
->
m_oSpPr
->
m_oPattFill
.
GetPointer
());
break
;
case
OOX
:
:
Drawing
::
filltypeSolid
:
Parse
(
oParam
,
pOutput
),
m_ooxShape
->
m_oSpPr
->
m_oSolidFill
.
GetPointer
(
);
break
;
case
OOX
:
:
Drawing
::
filltypeSolid
:
Parse
(
oParam
,
pOutput
,
m_ooxShape
->
m_oSpPr
->
m_oSolidFill
.
GetPointer
()
);
break
;
case
OOX
:
:
Drawing
::
filltypeGroup
:
case
OOX
:
:
Drawing
::
filltypeGroup
:
case
OOX
:
:
Drawing
::
filltypeNo
:
case
OOX
:
:
Drawing
::
filltypeNo
:
pOutput
->
m_bFilled
=
false
;
break
;
pOutput
->
m_bFilled
=
false
;
break
;
...
@@ -1149,13 +1124,13 @@ bool OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput)
...
@@ -1149,13 +1124,13 @@ bool OOXShapeReader::Parse( ReaderParameter oParam, RtfShapePtr& pOutput)
Parse
(
oParam
,
pOutput
,
&
oox_sp_style
->
m_oFillRef
);
Parse
(
oParam
,
pOutput
,
&
oox_sp_style
->
m_oFillRef
);
}
}
if
(
m_ooxShape
->
m_oSpPr
->
m_oLn
.
IsInit
(
))
if
(
(
oox_sp_style
)
&&
(
oox_sp_style
->
m_oLnRef
.
getType
()
==
OOX
::
et_a_lnRef
))
{
{
Parse
(
oParam
,
pOutput
,
m_ooxShape
->
m_oSpPr
->
m_oLn
.
GetPointer
());
Parse
(
oParam
,
pOutput
,
&
oox_sp_style
->
m_oLnRef
);
}
}
else
if
((
oox_sp_style
)
&&
(
oox_sp_style
->
m_oLnRef
.
getType
()
==
OOX
::
et_a_lnRef
))
if
(
m_ooxShape
->
m_oSpPr
->
m_oLn
.
IsInit
(
))
{
{
Parse
(
oParam
,
pOutput
,
&
oox_sp_style
->
m_oLnRef
);
Parse
(
oParam
,
pOutput
,
m_ooxShape
->
m_oSpPr
->
m_oLn
.
GetPointer
());
}
}
if
(
m_ooxShape
->
m_oCNvConnSpPr
.
IsInit
())
if
(
m_ooxShape
->
m_oCNvConnSpPr
.
IsInit
())
...
@@ -1495,15 +1470,46 @@ bool OOXShapeGroupReader::Parse( ReaderParameter oParam , RtfShapePtr& pOutput)
...
@@ -1495,15 +1470,46 @@ bool OOXShapeGroupReader::Parse( ReaderParameter oParam , RtfShapePtr& pOutput)
if
(
m_ooxGroup
->
m_oGroupSpPr
.
IsInit
()
&&
m_ooxGroup
->
m_oGroupSpPr
->
m_oXfrm
.
IsInit
())
if
(
m_ooxGroup
->
m_oGroupSpPr
.
IsInit
()
&&
m_ooxGroup
->
m_oGroupSpPr
->
m_oXfrm
.
IsInit
())
{
{
if
(
m_ooxGroup
->
m_oGroupSpPr
->
m_oXfrm
->
m_oOff
.
IsInit
()
)
double
rot
=
m_ooxGroup
->
m_oGroupSpPr
->
m_oXfrm
->
m_oRot
.
GetAngle
();
if
(
rot
>
0.01
)
pOutput
->
m_nRotation
=
rot
*
65535
;
if
(
m_ooxGroup
->
m_oGroupSpPr
->
m_oXfrm
->
m_oFlipH
.
ToBool
())
pOutput
->
m_bFlipH
=
1
;
if
(
m_ooxGroup
->
m_oGroupSpPr
->
m_oXfrm
->
m_oFlipV
.
ToBool
())
pOutput
->
m_bFlipV
=
1
;
if
(
m_ooxGroup
->
m_oGroupSpPr
->
m_oXfrm
->
m_oChOff
.
IsInit
()
)
{
{
pOutput
->
m_nGroupLeft
=
(
int
)
m_ooxGroup
->
m_oGroupSpPr
->
m_oXfrm
->
m_o
Off
->
m_oX
.
ToPoints
();
pOutput
->
m_nGroupLeft
=
(
int
)
m_ooxGroup
->
m_oGroupSpPr
->
m_oXfrm
->
m_o
ChOff
->
m_oX
.
GetValue
();
pOutput
->
m_nGroupTop
=
(
int
)
m_ooxGroup
->
m_oGroupSpPr
->
m_oXfrm
->
m_o
Off
->
m_oY
.
ToPoints
();
pOutput
->
m_nGroupTop
=
(
int
)
m_ooxGroup
->
m_oGroupSpPr
->
m_oXfrm
->
m_o
ChOff
->
m_oY
.
GetValue
();
}
}
if
(
m_ooxGroup
->
m_oGroupSpPr
->
m_oXfrm
->
m_oExt
.
IsInit
())
if
(
m_ooxGroup
->
m_oGroupSpPr
->
m_oXfrm
->
m_o
Ch
Ext
.
IsInit
())
{
{
pOutput
->
m_nGroupRight
=
(
pOutput
->
m_nGroupLeft
!=
PROP_DEF
?
pOutput
->
m_nGroupLeft
:
0
)
+
(
int
)
m_ooxGroup
->
m_oGroupSpPr
->
m_oXfrm
->
m_oExt
->
m_oCx
.
ToPoints
();
pOutput
->
m_nGroupRight
=
(
pOutput
->
m_nGroupLeft
!=
PROP_DEF
?
pOutput
->
m_nGroupLeft
:
0
)
+
(
int
)
m_ooxGroup
->
m_oGroupSpPr
->
m_oXfrm
->
m_oChExt
->
m_oCx
.
GetValue
();
pOutput
->
m_nGroupBottom
=
(
pOutput
->
m_nGroupTop
!=
PROP_DEF
?
pOutput
->
m_nGroupTop
:
0
)
+
(
int
)
m_ooxGroup
->
m_oGroupSpPr
->
m_oXfrm
->
m_oExt
->
m_oCy
.
ToPoints
();
pOutput
->
m_nGroupBottom
=
(
pOutput
->
m_nGroupTop
!=
PROP_DEF
?
pOutput
->
m_nGroupTop
:
0
)
+
(
int
)
m_ooxGroup
->
m_oGroupSpPr
->
m_oXfrm
->
m_oChExt
->
m_oCy
.
GetValue
();
}
if
(
pOutput
->
m_bInGroup
)
{
if
(
m_ooxGroup
->
m_oGroupSpPr
->
m_oXfrm
->
m_oOff
.
IsInit
())
{
pOutput
->
m_nRelLeft
=
m_ooxGroup
->
m_oGroupSpPr
->
m_oXfrm
->
m_oOff
->
m_oX
.
ToEmu
();
pOutput
->
m_nRelTop
=
m_ooxGroup
->
m_oGroupSpPr
->
m_oXfrm
->
m_oOff
->
m_oY
.
ToEmu
();
}
else
{
pOutput
->
m_nRelLeft
=
0
;
pOutput
->
m_nRelTop
=
0
;
}
if
(
m_ooxGroup
->
m_oGroupSpPr
->
m_oXfrm
->
m_oExt
.
IsInit
())
{
pOutput
->
m_nRelRight
=
pOutput
->
m_nRelLeft
+
m_ooxGroup
->
m_oGroupSpPr
->
m_oXfrm
->
m_oExt
->
m_oCx
.
GetValue
();
pOutput
->
m_nRelBottom
=
pOutput
->
m_nRelTop
+
m_ooxGroup
->
m_oGroupSpPr
->
m_oXfrm
->
m_oExt
->
m_oCy
.
GetValue
();
}
else
{
pOutput
->
m_nRelRight
=
0
;
pOutput
->
m_nRelBottom
=
0
;
}
pOutput
->
m_nRelRotation
=
pOutput
->
m_nRotation
;
}
}
}
}
...
...
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