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
62d48608
Commit
62d48608
authored
Feb 16, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pptx - extending reading xml
parent
21666ee3
Changes
101
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
101 changed files
with
2703 additions
and
301 deletions
+2703
-301
ASCOfficePPTXFile/PPTXFormat/Logic/Backdrop.h
ASCOfficePPTXFile/PPTXFormat/Logic/Backdrop.h
+53
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Bevel.h
ASCOfficePPTXFile/PPTXFormat/Logic/Bevel.h
+20
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuAutoNum.h
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuAutoNum.h
+19
-4
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuBlip.h
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuBlip.h
+24
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuChar.h
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuChar.h
+18
-3
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuClr.h
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuClr.h
+26
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuClrTx.h
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuClrTx.h
+24
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuFontTx.h
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuFontTx.h
+26
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuNone.h
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuNone.h
+9
-3
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuSzPct.h
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuSzPct.h
+26
-6
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuSzPts.h
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuSzPts.h
+24
-6
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuSzTx.h
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuSzTx.h
+9
-3
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/Bullet.h
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/Bullet.h
+26
-4
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BulletColor.h
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BulletColor.h
+22
-4
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BulletSize.h
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BulletSize.h
+25
-4
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BulletTypeface.h
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BulletTypeface.h
+20
-4
ASCOfficePPTXFile/PPTXFormat/Logic/Camera.h
ASCOfficePPTXFile/PPTXFormat/Logic/Camera.h
+34
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Colors/ColorModifier.h
ASCOfficePPTXFile/PPTXFormat/Logic/Colors/ColorModifier.h
+34
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Colors/PrstClr.h
ASCOfficePPTXFile/PPTXFormat/Logic/Colors/PrstClr.h
+29
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Colors/SchemeClr.cpp
ASCOfficePPTXFile/PPTXFormat/Logic/Colors/SchemeClr.cpp
+17
-0
ASCOfficePPTXFile/PPTXFormat/Logic/Colors/SchemeClr.h
ASCOfficePPTXFile/PPTXFormat/Logic/Colors/SchemeClr.h
+14
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Colors/SrgbClr.h
ASCOfficePPTXFile/PPTXFormat/Logic/Colors/SrgbClr.h
+40
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Colors/SysClr.h
ASCOfficePPTXFile/PPTXFormat/Logic/Colors/SysClr.h
+28
-1
ASCOfficePPTXFile/PPTXFormat/Logic/EffectDag.cpp
ASCOfficePPTXFile/PPTXFormat/Logic/EffectDag.cpp
+17
-0
ASCOfficePPTXFile/PPTXFormat/Logic/EffectDag.h
ASCOfficePPTXFile/PPTXFormat/Logic/EffectDag.h
+17
-6
ASCOfficePPTXFile/PPTXFormat/Logic/EffectLst.cpp
ASCOfficePPTXFile/PPTXFormat/Logic/EffectLst.cpp
+30
-2
ASCOfficePPTXFile/PPTXFormat/Logic/EffectLst.h
ASCOfficePPTXFile/PPTXFormat/Logic/EffectLst.h
+24
-14
ASCOfficePPTXFile/PPTXFormat/Logic/EffectProperties.h
ASCOfficePPTXFile/PPTXFormat/Logic/EffectProperties.h
+19
-2
ASCOfficePPTXFile/PPTXFormat/Logic/EffectStyle.cpp
ASCOfficePPTXFile/PPTXFormat/Logic/EffectStyle.cpp
+17
-0
ASCOfficePPTXFile/PPTXFormat/Logic/EffectStyle.h
ASCOfficePPTXFile/PPTXFormat/Logic/EffectStyle.h
+7
-3
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/AlphaBiLevel.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/AlphaBiLevel.h
+18
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/AlphaCeiling.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/AlphaCeiling.h
+9
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/AlphaFloor.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/AlphaFloor.h
+9
-4
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/AlphaInv.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/AlphaInv.h
+19
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/AlphaMod.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/AlphaMod.h
+23
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/AlphaModFix.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/AlphaModFix.h
+18
-4
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/AlphaOutset.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/AlphaOutset.h
+16
-3
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/AlphaRepl.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/AlphaRepl.h
+18
-3
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/BiLevel.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/BiLevel.h
+18
-3
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/Blend.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/Blend.h
+27
-3
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/Blur.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/Blur.h
+17
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/ClrChange.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/ClrChange.h
+30
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/ClrRepl.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/ClrRepl.h
+19
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/Duotone.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/Duotone.h
+21
-3
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/EffectElement.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/EffectElement.h
+16
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/FillEffect.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/FillEffect.h
+19
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/FillOverlay.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/FillOverlay.h
+28
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/Glow.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/Glow.h
+30
-4
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/Grayscl.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/Grayscl.h
+9
-3
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/HslEffect.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/HslEffect.h
+20
-3
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/InnerShdw.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/InnerShdw.h
+32
-3
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/LumEffect.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/LumEffect.h
+17
-3
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/OuterShdw.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/OuterShdw.h
+37
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/PrstShdw.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/PrstShdw.h
+33
-3
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/Reflection.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/Reflection.h
+31
-3
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/RelOff.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/RelOff.h
+17
-3
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/SoftEdge.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/SoftEdge.h
+16
-3
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/TintEffect.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/TintEffect.h
+19
-3
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/XfrmEffect.h
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/XfrmEffect.h
+23
-3
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/Blip.cpp
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/Blip.cpp
+20
-0
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/Blip.h
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/Blip.h
+15
-3
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/BlipFill.h
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/BlipFill.h
+45
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/GradFill.h
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/GradFill.h
+42
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/NoFill.h
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/NoFill.h
+30
-6
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/PattFill.h
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/PattFill.h
+30
-4
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/SolidFill.h
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/SolidFill.h
+22
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/Stretch.h
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/Stretch.h
+15
-3
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/Tile.h
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/Tile.h
+21
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Gs.h
ASCOfficePPTXFile/PPTXFormat/Logic/Gs.h
+28
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Hyperlink.h
ASCOfficePPTXFile/PPTXFormat/Logic/Hyperlink.h
+38
-2
ASCOfficePPTXFile/PPTXFormat/Logic/LightRig.h
ASCOfficePPTXFile/PPTXFormat/Logic/LightRig.h
+34
-4
ASCOfficePPTXFile/PPTXFormat/Logic/Lin.h
ASCOfficePPTXFile/PPTXFormat/Logic/Lin.h
+19
-2
ASCOfficePPTXFile/PPTXFormat/Logic/LineEnd.h
ASCOfficePPTXFile/PPTXFormat/Logic/LineEnd.h
+19
-2
ASCOfficePPTXFile/PPTXFormat/Logic/LineJoin.h
ASCOfficePPTXFile/PPTXFormat/Logic/LineJoin.h
+38
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Ln.h
ASCOfficePPTXFile/PPTXFormat/Logic/Ln.h
+66
-4
ASCOfficePPTXFile/PPTXFormat/Logic/Media/WavAudioFile.h
ASCOfficePPTXFile/PPTXFormat/Logic/Media/WavAudioFile.h
+18
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Paragraph.h
ASCOfficePPTXFile/PPTXFormat/Logic/Paragraph.h
+64
-3
ASCOfficePPTXFile/PPTXFormat/Logic/Path.h
ASCOfficePPTXFile/PPTXFormat/Logic/Path.h
+29
-2
ASCOfficePPTXFile/PPTXFormat/Logic/PrstDash.h
ASCOfficePPTXFile/PPTXFormat/Logic/PrstDash.h
+16
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Rect.h
ASCOfficePPTXFile/PPTXFormat/Logic/Rect.h
+19
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Rot.h
ASCOfficePPTXFile/PPTXFormat/Logic/Rot.h
+25
-2
ASCOfficePPTXFile/PPTXFormat/Logic/RunElem.h
ASCOfficePPTXFile/PPTXFormat/Logic/RunElem.h
+27
-3
ASCOfficePPTXFile/PPTXFormat/Logic/RunProperties.h
ASCOfficePPTXFile/PPTXFormat/Logic/RunProperties.h
+123
-6
ASCOfficePPTXFile/PPTXFormat/Logic/Runs/Br.h
ASCOfficePPTXFile/PPTXFormat/Logic/Runs/Br.h
+17
-4
ASCOfficePPTXFile/PPTXFormat/Logic/Runs/Fld.h
ASCOfficePPTXFile/PPTXFormat/Logic/Runs/Fld.h
+41
-4
ASCOfficePPTXFile/PPTXFormat/Logic/Runs/MathParaWrapper.cpp
ASCOfficePPTXFile/PPTXFormat/Logic/Runs/MathParaWrapper.cpp
+13
-0
ASCOfficePPTXFile/PPTXFormat/Logic/Runs/MathParaWrapper.h
ASCOfficePPTXFile/PPTXFormat/Logic/Runs/MathParaWrapper.h
+3
-1
ASCOfficePPTXFile/PPTXFormat/Logic/Runs/Run.h
ASCOfficePPTXFile/PPTXFormat/Logic/Runs/Run.h
+24
-3
ASCOfficePPTXFile/PPTXFormat/Logic/Scene3d.h
ASCOfficePPTXFile/PPTXFormat/Logic/Scene3d.h
+28
-8
ASCOfficePPTXFile/PPTXFormat/Logic/Sp3d.h
ASCOfficePPTXFile/PPTXFormat/Logic/Sp3d.h
+38
-3
ASCOfficePPTXFile/PPTXFormat/Logic/Tab.h
ASCOfficePPTXFile/PPTXFormat/Logic/Tab.h
+24
-2
ASCOfficePPTXFile/PPTXFormat/Logic/TextFit.h
ASCOfficePPTXFile/PPTXFormat/Logic/TextFit.h
+23
-3
ASCOfficePPTXFile/PPTXFormat/Logic/TextFont.h
ASCOfficePPTXFile/PPTXFormat/Logic/TextFont.h
+100
-12
ASCOfficePPTXFile/PPTXFormat/Logic/TextParagraphPr.h
ASCOfficePPTXFile/PPTXFormat/Logic/TextParagraphPr.h
+55
-3
ASCOfficePPTXFile/PPTXFormat/Logic/TextSpacing.h
ASCOfficePPTXFile/PPTXFormat/Logic/TextSpacing.h
+38
-2
ASCOfficePPTXFile/PPTXFormat/Logic/UniColor.cpp
ASCOfficePPTXFile/PPTXFormat/Logic/UniColor.cpp
+26
-2
ASCOfficePPTXFile/PPTXFormat/Logic/UniColor.h
ASCOfficePPTXFile/PPTXFormat/Logic/UniColor.h
+4
-1
ASCOfficePPTXFile/PPTXFormat/Logic/UniEffect.cpp
ASCOfficePPTXFile/PPTXFormat/Logic/UniEffect.cpp
+102
-1
ASCOfficePPTXFile/PPTXFormat/Logic/UniEffect.h
ASCOfficePPTXFile/PPTXFormat/Logic/UniEffect.h
+8
-1
ASCOfficePPTXFile/PPTXFormat/Logic/UniFill.h
ASCOfficePPTXFile/PPTXFormat/Logic/UniFill.h
+44
-2
ASCOfficePPTXFile/PPTXFormat/WrapperWritingElement.h
ASCOfficePPTXFile/PPTXFormat/WrapperWritingElement.h
+5
-15
No files found.
ASCOfficePPTXFile/PPTXFormat/Logic/Backdrop.h
View file @
62d48608
...
@@ -43,9 +43,60 @@ namespace PPTX
...
@@ -43,9 +43,60 @@ namespace PPTX
class
Backdrop
:
public
WrapperWritingElement
class
Backdrop
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
Backdrop
)
WritingElement_AdditionConstructors
(
Backdrop
)
PPTX_LOGIC_BASE2
(
Backdrop
)
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_backdrop
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
nullable_int
x
,
y
,
z
;
if
(
strName
==
L"a:anchor"
)
{
ReadAttributes
(
oReader
,
x
,
y
,
z
);
anchorX
=
x
.
get_value_or
(
0
);
anchorY
=
y
.
get_value_or
(
0
);
anchorZ
=
z
.
get_value_or
(
0
);
}
else
if
(
strName
==
L"a:norm"
)
{
ReadAttributes
(
oReader
,
x
,
y
,
z
);
normX
=
x
.
get_value_or
(
0
);
normY
=
y
.
get_value_or
(
0
);
normZ
=
z
.
get_value_or
(
0
);
}
else
if
(
strName
==
L"a:up"
)
{
ReadAttributes
(
oReader
,
x
,
y
,
z
);
upX
=
x
.
get_value_or
(
0
);
upY
=
y
.
get_value_or
(
0
);
upZ
=
z
.
get_value_or
(
0
);
}
}
FillParentPointersForChilds
();
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
,
nullable_int
&
x
,
nullable_int
&
y
,
nullable_int
&
z
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"x"
),
x
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"y"
),
y
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"z"
),
z
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"dx"
),
x
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"dy"
),
y
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"dz"
),
z
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
XmlUtils
::
CXmlNode
oNodeA
=
node
.
ReadNode
(
_T
(
"a:anchor"
));
XmlUtils
::
CXmlNode
oNodeA
=
node
.
ReadNode
(
_T
(
"a:anchor"
));
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Bevel.h
View file @
62d48608
...
@@ -44,9 +44,27 @@ namespace PPTX
...
@@ -44,9 +44,27 @@ namespace PPTX
class
Bevel
:
public
WrapperWritingElement
class
Bevel
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
Bevel
)
WritingElement_AdditionConstructors
(
Bevel
)
PPTX_LOGIC_BASE2
(
Bevel
)
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_bevel
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
m_name
=
XmlUtils
::
GetNameNoNS
(
oReader
.
GetName
());
ReadAttributes
(
oReader
);
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"w"
),
w
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"h"
),
h
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"prst"
),
prst
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
m_name
=
XmlUtils
::
GetNameNoNS
(
node
.
GetName
());
m_name
=
XmlUtils
::
GetNameNoNS
(
node
.
GetName
());
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuAutoNum.h
View file @
62d48608
...
@@ -43,7 +43,8 @@ namespace PPTX
...
@@ -43,7 +43,8 @@ namespace PPTX
class
BuAutoNum
:
public
WrapperWritingElement
class
BuAutoNum
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
BuAutoNum
)
WritingElement_AdditionConstructors
(
BuAutoNum
)
PPTX_LOGIC_BASE2
(
BuAutoNum
)
BuAutoNum
&
operator
=
(
const
BuAutoNum
&
oSrc
)
BuAutoNum
&
operator
=
(
const
BuAutoNum
&
oSrc
)
{
{
...
@@ -55,8 +56,14 @@ namespace PPTX
...
@@ -55,8 +56,14 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
public:
{
ReadAttributes
(
oReader
);
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_buChar
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
node
.
ReadAttributeBase
(
L"type"
,
type
);
node
.
ReadAttributeBase
(
L"type"
,
type
);
...
@@ -64,7 +71,15 @@ namespace PPTX
...
@@ -64,7 +71,15 @@ namespace PPTX
Normalize
();
Normalize
();
}
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
L"startAt"
,
startAt
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
L"type"
,
type
)
WritingElement_ReadAttributes_End
(
oReader
)
Normalize
();
}
virtual
std
::
wstring
toXML
()
const
virtual
std
::
wstring
toXML
()
const
{
{
XmlUtils
::
CAttribute
oAttr
;
XmlUtils
::
CAttribute
oAttr
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuBlip.h
View file @
62d48608
...
@@ -43,7 +43,8 @@ namespace PPTX
...
@@ -43,7 +43,8 @@ namespace PPTX
class
BuBlip
:
public
WrapperWritingElement
class
BuBlip
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
BuBlip
)
WritingElement_AdditionConstructors
(
BuBlip
)
PPTX_LOGIC_BASE2
(
BuBlip
)
BuBlip
&
operator
=
(
const
BuBlip
&
oSrc
)
BuBlip
&
operator
=
(
const
BuBlip
&
oSrc
)
{
{
...
@@ -54,7 +55,28 @@ namespace PPTX
...
@@ -54,7 +55,28 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
XmlUtils
::
GetNameNoNS
(
oReader
.
GetName
());
if
(
strName
==
L"blip"
)
{
blip
=
oReader
;
break
;
}
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_buBlip
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
blip
=
node
.
ReadNodeNoNS
(
_T
(
"blip"
));
blip
=
node
.
ReadNodeNoNS
(
_T
(
"blip"
));
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuChar.h
View file @
62d48608
...
@@ -42,7 +42,8 @@ namespace PPTX
...
@@ -42,7 +42,8 @@ namespace PPTX
class
BuChar
:
public
WrapperWritingElement
class
BuChar
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
BuChar
)
WritingElement_AdditionConstructors
(
BuChar
)
PPTX_LOGIC_BASE2
(
BuChar
)
BuChar
&
operator
=
(
const
BuChar
&
oSrc
)
BuChar
&
operator
=
(
const
BuChar
&
oSrc
)
{
{
...
@@ -52,13 +53,27 @@ namespace PPTX
...
@@ -52,13 +53,27 @@ namespace PPTX
Char
=
oSrc
.
Char
;
Char
=
oSrc
.
Char
;
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_buAutoNum
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
public:
if
(
oReader
.
IsEmptyNode
()
)
return
;
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_ReadSingle
(
oReader
,
L"char"
,
Char
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
Char
=
node
.
GetAttribute
(
_T
(
"char"
));
Char
=
node
.
GetAttribute
(
_T
(
"char"
));
}
}
virtual
std
::
wstring
toXML
()
const
virtual
std
::
wstring
toXML
()
const
{
{
XmlUtils
::
CAttribute
oAttr
;
XmlUtils
::
CAttribute
oAttr
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuClr.h
View file @
62d48608
...
@@ -43,7 +43,32 @@ namespace PPTX
...
@@ -43,7 +43,32 @@ namespace PPTX
class
BuClr
:
public
WrapperWritingElement
class
BuClr
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
BuClr
)
WritingElement_AdditionConstructors
(
BuClr
)
PPTX_LOGIC_BASE2
(
BuClr
)
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
sName
=
oReader
.
GetName
();
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_buClr
;
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_End
(
oReader
)
}
BuClr
&
operator
=
(
const
BuClr
&
oSrc
)
BuClr
&
operator
=
(
const
BuClr
&
oSrc
)
{
{
...
@@ -59,7 +84,6 @@ namespace PPTX
...
@@ -59,7 +84,6 @@ namespace PPTX
virtual
DWORD
GetBGRA
()
const
{
return
Color
.
GetBGRA
();};
virtual
DWORD
GetBGRA
()
const
{
return
Color
.
GetBGRA
();};
virtual
DWORD
GetABGR
()
const
{
return
Color
.
GetABGR
();};
virtual
DWORD
GetABGR
()
const
{
return
Color
.
GetABGR
();};
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
Color
.
GetColorFrom
(
node
);
Color
.
GetColorFrom
(
node
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuClrTx.h
View file @
62d48608
...
@@ -42,7 +42,8 @@ namespace PPTX
...
@@ -42,7 +42,8 @@ namespace PPTX
class
BuClrTx
:
public
WrapperWritingElement
class
BuClrTx
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
BuClrTx
)
WritingElement_AdditionConstructors
(
BuClrTx
)
PPTX_LOGIC_BASE2
(
BuClrTx
)
BuClrTx
&
operator
=
(
const
BuClrTx
&
oSrc
)
BuClrTx
&
operator
=
(
const
BuClrTx
&
oSrc
)
{
{
...
@@ -51,8 +52,29 @@ namespace PPTX
...
@@ -51,8 +52,29 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_buClrTx
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
public:
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
sName
=
oReader
.
GetName
();
}
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
}
}
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuFontTx.h
View file @
62d48608
...
@@ -42,7 +42,8 @@ namespace PPTX
...
@@ -42,7 +42,8 @@ namespace PPTX
class
BuFontTx
:
public
WrapperWritingElement
class
BuFontTx
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
BuFontTx
)
WritingElement_AdditionConstructors
(
BuFontTx
)
PPTX_LOGIC_BASE2
(
BuFontTx
)
BuFontTx
&
operator
=
(
const
BuFontTx
&
oSrc
)
BuFontTx
&
operator
=
(
const
BuFontTx
&
oSrc
)
{
{
...
@@ -50,8 +51,31 @@ namespace PPTX
...
@@ -50,8 +51,31 @@ namespace PPTX
parentElement
=
oSrc
.
parentElement
;
parentElement
=
oSrc
.
parentElement
;
return
*
this
;
return
*
this
;
}
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
sName
=
oReader
.
GetName
();
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_buFontTx
;
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_End
(
oReader
)
}
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
}
}
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuNone.h
View file @
62d48608
...
@@ -42,7 +42,8 @@ namespace PPTX
...
@@ -42,7 +42,8 @@ namespace PPTX
class
BuNone
:
public
WrapperWritingElement
class
BuNone
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
BuNone
)
WritingElement_AdditionConstructors
(
BuNone
)
PPTX_LOGIC_BASE2
(
BuNone
)
BuNone
&
operator
=
(
const
BuNone
&
oSrc
)
BuNone
&
operator
=
(
const
BuNone
&
oSrc
)
{
{
...
@@ -51,8 +52,13 @@ namespace PPTX
...
@@ -51,8 +52,13 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
public:
{
return
OOX
::
et_a_buNone
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
}
}
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuSzPct.h
View file @
62d48608
...
@@ -42,7 +42,8 @@ namespace PPTX
...
@@ -42,7 +42,8 @@ namespace PPTX
class
BuSzPct
:
public
WrapperWritingElement
class
BuSzPct
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
BuSzPct
)
WritingElement_AdditionConstructors
(
BuSzPct
)
PPTX_LOGIC_BASE2
(
BuSzPct
)
BuSzPct
&
operator
=
(
const
BuSzPct
&
oSrc
)
BuSzPct
&
operator
=
(
const
BuSzPct
&
oSrc
)
{
{
...
@@ -52,8 +53,22 @@ namespace PPTX
...
@@ -52,8 +53,22 @@ namespace PPTX
val
=
oSrc
.
val
;
val
=
oSrc
.
val
;
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_buSzPct
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_ReadSingle
(
oReader
,
_T
(
"val"
),
val
)
WritingElement_ReadAttributes_End
(
oReader
)
public:
Normalize
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
val
=
node
.
ReadAttributeInt
(
_T
(
"val"
));
val
=
node
.
ReadAttributeInt
(
_T
(
"val"
));
...
@@ -79,19 +94,24 @@ namespace PPTX
...
@@ -79,19 +94,24 @@ namespace PPTX
pWriter
->
StartRecord
(
BULLET_TYPE_SIZE_PCT
);
pWriter
->
StartRecord
(
BULLET_TYPE_SIZE_PCT
);
pWriter
->
WriteBYTE
(
NSBinPptxRW
::
g_nodeAttributeStart
);
pWriter
->
WriteBYTE
(
NSBinPptxRW
::
g_nodeAttributeStart
);
pWriter
->
WriteInt1
(
0
,
val
);
pWriter
->
WriteInt1
(
0
,
val
.
get_value_or
(
0
)
);
pWriter
->
WriteBYTE
(
NSBinPptxRW
::
g_nodeAttributeEnd
);
pWriter
->
WriteBYTE
(
NSBinPptxRW
::
g_nodeAttributeEnd
);
pWriter
->
EndRecord
();
pWriter
->
EndRecord
();
}
}
public:
public:
int
val
;
nullable_
int
val
;
protected:
protected:
virtual
void
FillParentPointersForChilds
(){};
virtual
void
FillParentPointersForChilds
(){};
AVSINLINE
void
Normalize
()
AVSINLINE
void
Normalize
()
{
{
normalize_value
(
val
,
25000
,
400000
);
if
(
val
.
IsInit
())
{
int
tmp
=
*
val
;
normalize_value
(
tmp
,
25000
,
400000
);
val
=
tmp
;
}
}
}
};
};
}
// namespace Logic
}
// namespace Logic
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuSzPts.h
View file @
62d48608
...
@@ -42,7 +42,8 @@ namespace PPTX
...
@@ -42,7 +42,8 @@ namespace PPTX
class
BuSzPts
:
public
WrapperWritingElement
class
BuSzPts
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
BuSzPts
)
WritingElement_AdditionConstructors
(
BuSzPts
)
PPTX_LOGIC_BASE2
(
BuSzPts
)
BuSzPts
&
operator
=
(
const
BuSzPts
&
oSrc
)
BuSzPts
&
operator
=
(
const
BuSzPts
&
oSrc
)
{
{
...
@@ -52,8 +53,20 @@ namespace PPTX
...
@@ -52,8 +53,20 @@ namespace PPTX
val
=
oSrc
.
val
;
val
=
oSrc
.
val
;
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
public:
{
return
OOX
::
et_a_buSzPts
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_ReadSingle
(
oReader
,
_T
(
"val"
),
val
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
val
=
node
.
ReadAttributeInt
(
_T
(
"val"
));
val
=
node
.
ReadAttributeInt
(
_T
(
"val"
));
...
@@ -79,18 +92,23 @@ namespace PPTX
...
@@ -79,18 +92,23 @@ namespace PPTX
pWriter
->
StartRecord
(
BULLET_TYPE_SIZE_PTS
);
pWriter
->
StartRecord
(
BULLET_TYPE_SIZE_PTS
);
pWriter
->
WriteBYTE
(
NSBinPptxRW
::
g_nodeAttributeStart
);
pWriter
->
WriteBYTE
(
NSBinPptxRW
::
g_nodeAttributeStart
);
pWriter
->
WriteInt1
(
0
,
val
);
pWriter
->
WriteInt1
(
0
,
val
.
get_value_or
(
0
)
);
pWriter
->
WriteBYTE
(
NSBinPptxRW
::
g_nodeAttributeEnd
);
pWriter
->
WriteBYTE
(
NSBinPptxRW
::
g_nodeAttributeEnd
);
pWriter
->
EndRecord
();
pWriter
->
EndRecord
();
}
}
public:
public:
int
val
;
nullable_
int
val
;
protected:
protected:
virtual
void
FillParentPointersForChilds
(){};
virtual
void
FillParentPointersForChilds
(){};
AVSINLINE
void
Normalize
()
AVSINLINE
void
Normalize
()
{
{
normalize_value
(
val
,
100
,
400000
);
if
(
val
.
IsInit
())
{
int
tmp
=
*
val
;
normalize_value
(
tmp
,
100
,
400000
);
val
=
tmp
;
}
}
}
};
};
}
// namespace Logic
}
// namespace Logic
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BuSzTx.h
View file @
62d48608
...
@@ -42,7 +42,8 @@ namespace PPTX
...
@@ -42,7 +42,8 @@ namespace PPTX
class
BuSzTx
:
public
WrapperWritingElement
class
BuSzTx
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
BuSzTx
)
WritingElement_AdditionConstructors
(
BuSzTx
)
PPTX_LOGIC_BASE2
(
BuSzTx
)
BuSzTx
&
operator
=
(
const
BuSzTx
&
oSrc
)
BuSzTx
&
operator
=
(
const
BuSzTx
&
oSrc
)
{
{
...
@@ -51,8 +52,13 @@ namespace PPTX
...
@@ -51,8 +52,13 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
public:
{
return
OOX
::
et_a_buSzTx
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
}
}
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/Bullet.h
View file @
62d48608
...
@@ -46,7 +46,8 @@ namespace PPTX
...
@@ -46,7 +46,8 @@ namespace PPTX
class
Bullet
:
public
WrapperWritingElement
class
Bullet
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
Bullet
)
WritingElement_AdditionConstructors
(
Bullet
)
PPTX_LOGIC_BASE2
(
Bullet
)
Bullet
&
operator
=
(
const
Bullet
&
oSrc
)
Bullet
&
operator
=
(
const
Bullet
&
oSrc
)
{
{
...
@@ -57,8 +58,27 @@ namespace PPTX
...
@@ -57,8 +58,27 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
{
if
(
m_Bullet
.
IsInit
())
return
m_Bullet
->
getType
();
return
OOX
::
et_Unknown
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
std
::
wstring
strName
=
XmlUtils
::
GetNameNoNS
(
oReader
.
GetName
());
public:
if
(
strName
==
_T
(
"buNone"
))
m_Bullet
.
reset
(
new
Logic
::
BuNone
(
oReader
));
else
if
(
strName
==
_T
(
"buChar"
))
m_Bullet
.
reset
(
new
Logic
::
BuChar
(
oReader
));
else
if
(
strName
==
_T
(
"buAutoNum"
))
m_Bullet
.
reset
(
new
Logic
::
BuAutoNum
(
oReader
));
else
if
(
strName
==
_T
(
"buBlip"
))
m_Bullet
.
reset
(
new
Logic
::
BuBlip
(
oReader
));
else
m_Bullet
.
reset
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
std
::
wstring
strName
=
XmlUtils
::
GetNameNoNS
(
node
.
GetName
());
std
::
wstring
strName
=
XmlUtils
::
GetNameNoNS
(
node
.
GetName
());
...
@@ -71,7 +91,8 @@ namespace PPTX
...
@@ -71,7 +91,8 @@ namespace PPTX
m_Bullet
.
reset
(
new
Logic
::
BuAutoNum
(
node
));
m_Bullet
.
reset
(
new
Logic
::
BuAutoNum
(
node
));
else
if
(
strName
==
_T
(
"buBlip"
))
else
if
(
strName
==
_T
(
"buBlip"
))
m_Bullet
.
reset
(
new
Logic
::
BuBlip
(
node
));
m_Bullet
.
reset
(
new
Logic
::
BuBlip
(
node
));
else
m_Bullet
.
reset
();
else
m_Bullet
.
reset
();
}
}
virtual
void
ReadBulletFrom
(
XmlUtils
::
CXmlNode
&
element
)
virtual
void
ReadBulletFrom
(
XmlUtils
::
CXmlNode
&
element
)
...
@@ -85,7 +106,8 @@ namespace PPTX
...
@@ -85,7 +106,8 @@ namespace PPTX
m_Bullet
.
reset
(
new
Logic
::
BuAutoNum
(
oNode
));
m_Bullet
.
reset
(
new
Logic
::
BuAutoNum
(
oNode
));
else
if
(
element
.
GetNode
(
_T
(
"a:buBlip"
),
oNode
))
else
if
(
element
.
GetNode
(
_T
(
"a:buBlip"
),
oNode
))
m_Bullet
.
reset
(
new
Logic
::
BuBlip
(
oNode
));
m_Bullet
.
reset
(
new
Logic
::
BuBlip
(
oNode
));
else
m_Bullet
.
reset
();
else
m_Bullet
.
reset
();
}
}
virtual
bool
is_init
()
const
{
return
(
m_Bullet
.
IsInit
());};
virtual
bool
is_init
()
const
{
return
(
m_Bullet
.
IsInit
());};
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BulletColor.h
View file @
62d48608
...
@@ -44,7 +44,8 @@ namespace PPTX
...
@@ -44,7 +44,8 @@ namespace PPTX
class
BulletColor
:
public
WrapperWritingElement
class
BulletColor
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
BulletColor
)
WritingElement_AdditionConstructors
(
BulletColor
)
PPTX_LOGIC_BASE2
(
BulletColor
)
BulletColor
&
operator
=
(
const
BulletColor
&
oColor
)
BulletColor
&
operator
=
(
const
BulletColor
&
oColor
)
{
{
...
@@ -55,8 +56,23 @@ namespace PPTX
...
@@ -55,8 +56,23 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
{
if
(
m_Color
.
IsInit
())
return
m_Color
->
getType
();
return
OOX
::
et_Unknown
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
public:
if
(
strName
==
_T
(
"a:buClrTx"
))
m_Color
.
reset
(
new
Logic
::
BuClrTx
(
oReader
));
else
if
(
strName
==
_T
(
"a:buClr"
))
m_Color
.
reset
(
new
Logic
::
BuClr
(
oReader
));
else
m_Color
.
reset
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
std
::
wstring
strName
=
node
.
GetName
();
std
::
wstring
strName
=
node
.
GetName
();
...
@@ -65,7 +81,8 @@ namespace PPTX
...
@@ -65,7 +81,8 @@ namespace PPTX
m_Color
.
reset
(
new
Logic
::
BuClrTx
(
node
));
m_Color
.
reset
(
new
Logic
::
BuClrTx
(
node
));
else
if
(
strName
==
_T
(
"a:buClr"
))
else
if
(
strName
==
_T
(
"a:buClr"
))
m_Color
.
reset
(
new
Logic
::
BuClr
(
node
));
m_Color
.
reset
(
new
Logic
::
BuClr
(
node
));
else
m_Color
.
reset
();
else
m_Color
.
reset
();
}
}
void
ReadBulletColorFrom
(
XmlUtils
::
CXmlNode
&
element
)
void
ReadBulletColorFrom
(
XmlUtils
::
CXmlNode
&
element
)
...
@@ -75,7 +92,8 @@ namespace PPTX
...
@@ -75,7 +92,8 @@ namespace PPTX
m_Color
.
reset
(
new
Logic
::
BuClrTx
(
oNode
));
m_Color
.
reset
(
new
Logic
::
BuClrTx
(
oNode
));
else
if
(
element
.
GetNode
(
_T
(
"a:buClr"
),
oNode
))
else
if
(
element
.
GetNode
(
_T
(
"a:buClr"
),
oNode
))
m_Color
.
reset
(
new
Logic
::
BuClr
(
oNode
));
m_Color
.
reset
(
new
Logic
::
BuClr
(
oNode
));
else
m_Color
.
reset
();
else
m_Color
.
reset
();
}
}
virtual
void
toPPTY
(
NSBinPptxRW
::
CBinaryFileWriter
*
pWriter
)
const
virtual
void
toPPTY
(
NSBinPptxRW
::
CBinaryFileWriter
*
pWriter
)
const
{
{
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BulletSize.h
View file @
62d48608
...
@@ -45,7 +45,8 @@ namespace PPTX
...
@@ -45,7 +45,8 @@ namespace PPTX
class
BulletSize
:
public
WrapperWritingElement
class
BulletSize
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
BulletSize
)
WritingElement_AdditionConstructors
(
BulletSize
)
PPTX_LOGIC_BASE2
(
BulletSize
)
BulletSize
&
operator
=
(
const
BulletSize
&
oSrc
)
BulletSize
&
operator
=
(
const
BulletSize
&
oSrc
)
{
{
...
@@ -56,8 +57,26 @@ namespace PPTX
...
@@ -56,8 +57,26 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
{
if
(
m_Size
.
IsInit
())
return
m_Size
->
getType
();
return
OOX
::
et_Unknown
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
if
(
strName
==
_T
(
"a:buSzTx"
))
m_Size
.
reset
(
new
Logic
::
BuSzTx
(
oReader
));
else
if
(
strName
==
_T
(
"a:buSzPct"
))
m_Size
.
reset
(
new
Logic
::
BuSzPct
(
oReader
));
else
if
(
strName
==
_T
(
"a:buSzPts"
))
m_Size
.
reset
(
new
Logic
::
BuSzPts
(
oReader
));
else
m_Size
.
reset
();
}
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
std
::
wstring
strName
=
node
.
GetName
();
std
::
wstring
strName
=
node
.
GetName
();
...
@@ -68,7 +87,8 @@ namespace PPTX
...
@@ -68,7 +87,8 @@ namespace PPTX
m_Size
.
reset
(
new
Logic
::
BuSzPct
(
node
));
m_Size
.
reset
(
new
Logic
::
BuSzPct
(
node
));
else
if
(
strName
==
_T
(
"a:buSzPts"
))
else
if
(
strName
==
_T
(
"a:buSzPts"
))
m_Size
.
reset
(
new
Logic
::
BuSzPts
(
node
));
m_Size
.
reset
(
new
Logic
::
BuSzPts
(
node
));
else
m_Size
.
reset
();
else
m_Size
.
reset
();
}
}
virtual
void
ReadBulletSizeFrom
(
XmlUtils
::
CXmlNode
&
element
)
virtual
void
ReadBulletSizeFrom
(
XmlUtils
::
CXmlNode
&
element
)
...
@@ -80,7 +100,8 @@ namespace PPTX
...
@@ -80,7 +100,8 @@ namespace PPTX
m_Size
.
reset
(
new
Logic
::
BuSzPct
(
oNode
));
m_Size
.
reset
(
new
Logic
::
BuSzPct
(
oNode
));
else
if
(
element
.
GetNode
(
_T
(
"a:buSzPts"
),
oNode
))
else
if
(
element
.
GetNode
(
_T
(
"a:buSzPts"
),
oNode
))
m_Size
.
reset
(
new
Logic
::
BuSzPts
(
oNode
));
m_Size
.
reset
(
new
Logic
::
BuSzPts
(
oNode
));
else
m_Size
.
reset
();
else
m_Size
.
reset
();
}
}
virtual
bool
is_init
()
const
{
return
(
m_Size
.
IsInit
());};
virtual
bool
is_init
()
const
{
return
(
m_Size
.
IsInit
());};
virtual
bool
has_spec_size
()
const
{
return
((
is_init
())
&&
(
!
is
<
BuSzTx
>
()));};
virtual
bool
has_spec_size
()
const
{
return
((
is_init
())
&&
(
!
is
<
BuSzTx
>
()));};
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Bullets/BulletTypeface.h
View file @
62d48608
...
@@ -44,7 +44,8 @@ namespace PPTX
...
@@ -44,7 +44,8 @@ namespace PPTX
class
BulletTypeface
:
public
WrapperWritingElement
class
BulletTypeface
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
BulletTypeface
)
WritingElement_AdditionConstructors
(
BulletTypeface
)
PPTX_LOGIC_BASE2
(
BulletTypeface
)
BulletTypeface
&
operator
=
(
const
BulletTypeface
&
oSrc
)
BulletTypeface
&
operator
=
(
const
BulletTypeface
&
oSrc
)
{
{
...
@@ -55,8 +56,22 @@ namespace PPTX
...
@@ -55,8 +56,22 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
public:
{
if
(
m_Typeface
.
IsInit
())
return
m_Typeface
->
getType
();
return
OOX
::
et_Unknown
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
if
(
strName
==
_T
(
"a:buFontTx"
))
m_Typeface
.
reset
(
new
Logic
::
BuFontTx
(
oReader
));
else
if
(
strName
==
_T
(
"a:buFont"
))
m_Typeface
.
reset
(
new
Logic
::
TextFont
(
oReader
));
else
m_Typeface
.
reset
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
std
::
wstring
strName
=
node
.
GetName
();
std
::
wstring
strName
=
node
.
GetName
();
...
@@ -65,7 +80,8 @@ namespace PPTX
...
@@ -65,7 +80,8 @@ namespace PPTX
m_Typeface
.
reset
(
new
Logic
::
BuFontTx
(
node
));
m_Typeface
.
reset
(
new
Logic
::
BuFontTx
(
node
));
else
if
(
strName
==
_T
(
"a:buFont"
))
else
if
(
strName
==
_T
(
"a:buFont"
))
m_Typeface
.
reset
(
new
Logic
::
TextFont
(
node
));
m_Typeface
.
reset
(
new
Logic
::
TextFont
(
node
));
else
m_Typeface
.
reset
();
else
m_Typeface
.
reset
();
}
}
virtual
void
ReadBulletTypefaceFrom
(
XmlUtils
::
CXmlNode
&
element
)
virtual
void
ReadBulletTypefaceFrom
(
XmlUtils
::
CXmlNode
&
element
)
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Camera.h
View file @
62d48608
...
@@ -45,9 +45,41 @@ namespace PPTX
...
@@ -45,9 +45,41 @@ namespace PPTX
class
Camera
:
public
WrapperWritingElement
class
Camera
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
Camera
)
WritingElement_AdditionConstructors
(
Camera
)
PPTX_LOGIC_BASE2
(
Camera
)
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_camera
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
if
(
strName
==
L"a:rot"
)
{
rot
=
oReader
;
break
;
}
}
FillParentPointersForChilds
();
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"prst"
),
prst
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"fov"
),
fov
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"zoom"
),
zoom
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
prst
=
node
.
GetAttribute
(
_T
(
"prst"
));
prst
=
node
.
GetAttribute
(
_T
(
"prst"
));
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Colors/ColorModifier.h
View file @
62d48608
...
@@ -42,8 +42,40 @@ namespace PPTX
...
@@ -42,8 +42,40 @@ namespace PPTX
class
ColorModifier
:
public
WrapperWritingElement
class
ColorModifier
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
ColorModifier
)
WritingElement_AdditionConstructors
(
ColorModifier
)
public:
PPTX_LOGIC_BASE2
(
ColorModifier
)
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_prstClr
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
name
=
oReader
.
GetName
();
ReadAttributes
(
oReader
);
if
(
XmlUtils
::
GetNameNoNS
(
name
)
==
_T
(
"alpha"
))
{
ReadAttributes2
(
oReader
);
}
}
void
ReadAttributes2
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
nullable_string
sTmp
;
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_ReadSingle
(
oReader
,
_T
(
"val"
),
sTmp
)
WritingElement_ReadAttributes_End
(
oReader
)
if
(
val
.
is_init
()
&&
sTmp
.
is_init
()
&&
sTmp
->
find
(
wchar_t
(
'%'
))
!=
-
1
)
*
val
=
(
*
val
)
*
1000
;
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_ReadSingle
(
oReader
,
_T
(
"val"
),
val
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
name
=
node
.
GetName
();
name
=
node
.
GetName
();
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Colors/PrstClr.h
View file @
62d48608
...
@@ -43,9 +43,36 @@ namespace PPTX
...
@@ -43,9 +43,36 @@ namespace PPTX
class
PrstClr
:
public
ColorBase
class
PrstClr
:
public
ColorBase
{
{
public:
public:
PPTX_LOGIC_BASE
(
PrstClr
)
WritingElement_AdditionConstructors
(
PrstClr
)
PPTX_LOGIC_BASE2
(
PrstClr
)
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_prstClr
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
ColorModifier
m
;
Modifiers
.
push_back
(
m
);
Modifiers
.
back
().
fromXML
(
oReader
);
}
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_ReadSingle
(
oReader
,
_T
(
"val"
),
val
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
val
=
node
.
GetAttribute
(
_T
(
"val"
));
val
=
node
.
GetAttribute
(
_T
(
"val"
));
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Colors/SchemeClr.cpp
View file @
62d48608
...
@@ -49,6 +49,23 @@ namespace PPTX
...
@@ -49,6 +49,23 @@ namespace PPTX
Modifiers
.
clear
();
Modifiers
.
clear
();
node
.
LoadArray
(
_T
(
"*"
),
Modifiers
);
node
.
LoadArray
(
_T
(
"*"
),
Modifiers
);
}
}
void
SchemeClr
::
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
ColorModifier
m
;
Modifiers
.
push_back
(
m
);
Modifiers
.
back
().
fromXML
(
oReader
);
}
}
std
::
wstring
SchemeClr
::
toXML
()
const
std
::
wstring
SchemeClr
::
toXML
()
const
{
{
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Colors/SchemeClr.h
View file @
62d48608
...
@@ -44,12 +44,24 @@ namespace PPTX
...
@@ -44,12 +44,24 @@ namespace PPTX
class
SchemeClr
:
public
ColorBase
class
SchemeClr
:
public
ColorBase
{
{
public:
public:
PPTX_LOGIC_BASE
(
SchemeClr
)
WritingElement_AdditionConstructors
(
SchemeClr
)
PPTX_LOGIC_BASE2
(
SchemeClr
)
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
);
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
);
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
);
virtual
std
::
wstring
toXML
()
const
;
virtual
std
::
wstring
toXML
()
const
;
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_schemeClr
;
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"val"
),
val
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
toXmlWriter
(
NSBinPptxRW
::
CXmlWriter
*
pWriter
)
const
virtual
void
toXmlWriter
(
NSBinPptxRW
::
CXmlWriter
*
pWriter
)
const
{
{
std
::
wstring
sNodeNamespace
;
std
::
wstring
sNodeNamespace
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Colors/SrgbClr.h
View file @
62d48608
...
@@ -43,9 +43,47 @@ namespace PPTX
...
@@ -43,9 +43,47 @@ namespace PPTX
class
SrgbClr
:
public
ColorBase
class
SrgbClr
:
public
ColorBase
{
{
public:
public:
PPTX_LOGIC_BASE
(
SrgbClr
)
WritingElement_AdditionConstructors
(
SrgbClr
)
PPTX_LOGIC_BASE2
(
SrgbClr
)
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_srgbClr
;
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
std
::
wstring
val
;
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"val"
),
val
)
WritingElement_ReadAttributes_End
(
oReader
)
if
(
6
==
val
.
length
())
{
red
=
HexString2Int
(
val
.
substr
(
0
,
2
));
green
=
HexString2Int
(
val
.
substr
(
2
,
2
));
blue
=
HexString2Int
(
val
.
substr
(
4
,
2
));
}
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
ColorModifier
m
;
Modifiers
.
push_back
(
m
);
Modifiers
.
back
().
fromXML
(
oReader
);
}
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
std
::
wstring
val
=
node
.
GetAttribute
(
_T
(
"val"
));
std
::
wstring
val
=
node
.
GetAttribute
(
_T
(
"val"
));
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Colors/SysClr.h
View file @
62d48608
...
@@ -44,7 +44,8 @@ namespace PPTX
...
@@ -44,7 +44,8 @@ namespace PPTX
class
SysClr
:
public
ColorBase
class
SysClr
:
public
ColorBase
{
{
public:
public:
PPTX_LOGIC_BASE
(
SysClr
)
WritingElement_AdditionConstructors
(
SysClr
)
PPTX_LOGIC_BASE2
(
SysClr
)
virtual
DWORD
GetRGBA
(
DWORD
RGBA
)
const
virtual
DWORD
GetRGBA
(
DWORD
RGBA
)
const
{
{
...
@@ -146,7 +147,33 @@ namespace PPTX
...
@@ -146,7 +147,33 @@ namespace PPTX
Modifiers
.
clear
();
Modifiers
.
clear
();
node
.
LoadArray
(
_T
(
"*"
),
Modifiers
);
node
.
LoadArray
(
_T
(
"*"
),
Modifiers
);
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_sysClr
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
ColorModifier
m
;
Modifiers
.
push_back
(
m
);
Modifiers
.
back
().
fromXML
(
oReader
);
}
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"val"
),
val
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
std
::
wstring
toXML
()
const
virtual
std
::
wstring
toXML
()
const
{
{
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/EffectDag.cpp
View file @
62d48608
...
@@ -35,7 +35,24 @@ namespace PPTX
...
@@ -35,7 +35,24 @@ namespace PPTX
{
{
namespace
Logic
namespace
Logic
{
{
void
EffectDag
::
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
Effects
.
clear
();
ReadAttributes
(
oReader
);
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
sName
=
oReader
.
GetName
();
UniEffect
uni
;
Effects
.
push_back
(
uni
);
Effects
.
back
().
fromXML
(
oReader
);
}
}
void
EffectDag
::
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
void
EffectDag
::
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
m_name
=
node
.
GetName
();
m_name
=
node
.
GetName
();
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/EffectDag.h
View file @
62d48608
...
@@ -45,8 +45,8 @@ namespace PPTX
...
@@ -45,8 +45,8 @@ namespace PPTX
class
EffectDag
:
public
WrapperWritingElement
class
EffectDag
:
public
WrapperWritingElement
{
{
public:
public:
WritingElement_AdditionConstructors
(
EffectDag
)
PPTX_LOGIC_BASE
(
EffectDag
)
PPTX_LOGIC_BASE
2
(
EffectDag
)
EffectDag
&
operator
=
(
const
EffectDag
&
oSrc
)
EffectDag
&
operator
=
(
const
EffectDag
&
oSrc
)
{
{
...
@@ -59,10 +59,21 @@ namespace PPTX
...
@@ -59,10 +59,21 @@ namespace PPTX
m_name
=
oSrc
.
m_name
;
m_name
=
oSrc
.
m_name
;
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_effectDag
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
);
public:
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
);
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
L"name"
,
name
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
L"type"
,
type
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
);
virtual
std
::
wstring
toXML
()
const
;
virtual
std
::
wstring
toXML
()
const
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/EffectLst.cpp
View file @
62d48608
...
@@ -35,8 +35,6 @@ namespace PPTX
...
@@ -35,8 +35,6 @@ namespace PPTX
{
{
namespace
Logic
namespace
Logic
{
{
void
EffectLst
::
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
void
EffectLst
::
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
blur
=
node
.
ReadNode
(
_T
(
"a:blur"
));
blur
=
node
.
ReadNode
(
_T
(
"a:blur"
));
...
@@ -50,7 +48,37 @@ namespace PPTX
...
@@ -50,7 +48,37 @@ namespace PPTX
FillParentPointersForChilds
();
FillParentPointersForChilds
();
}
}
void
EffectLst
::
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
if
(
strName
==
L"a:blur"
)
blur
=
oReader
;
if
(
strName
==
L"a:fillOverlay"
)
fillOverlay
=
oReader
;
if
(
strName
==
L"a:glow"
)
glow
=
oReader
;
if
(
strName
==
L"a:innerShdw"
)
innerShdw
=
oReader
;
if
(
strName
==
L"a:outerShdw"
)
outerShdw
=
oReader
;
if
(
strName
==
L"a:prstShdw"
)
prstShdw
=
oReader
;
if
(
strName
==
L"a:reflection"
)
reflection
=
oReader
;
if
(
strName
==
L"a:softEdge"
)
softEdge
=
oReader
;
}
}
std
::
wstring
EffectLst
::
toXML
()
const
std
::
wstring
EffectLst
::
toXML
()
const
{
{
std
::
wstring
str
=
_T
(
"<a:effectLst>"
);
std
::
wstring
str
=
_T
(
"<a:effectLst>"
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/EffectLst.h
View file @
62d48608
...
@@ -47,16 +47,26 @@ namespace PPTX
...
@@ -47,16 +47,26 @@ namespace PPTX
{
{
namespace
Logic
namespace
Logic
{
{
class
EffectLst
:
public
WrapperWritingElement
class
EffectLst
:
public
WrapperWritingElement
{
{
public:
public:
WritingElement_AdditionConstructors
(
EffectLst
)
PPTX_LOGIC_BASE
(
EffectLst
)
PPTX_LOGIC_BASE
2
(
EffectLst
)
EffectLst
&
operator
=
(
const
EffectLst
&
oSrc
);
EffectLst
&
operator
=
(
const
EffectLst
&
oSrc
);
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_effectLst
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
);
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
);
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
);
virtual
std
::
wstring
toXML
()
const
;
virtual
std
::
wstring
toXML
()
const
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/EffectProperties.h
View file @
62d48608
...
@@ -44,7 +44,8 @@ namespace PPTX
...
@@ -44,7 +44,8 @@ namespace PPTX
class
EffectProperties
:
public
WrapperWritingElement
class
EffectProperties
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
EffectProperties
)
WritingElement_AdditionConstructors
(
EffectProperties
)
PPTX_LOGIC_BASE2
(
EffectProperties
)
EffectProperties
&
operator
=
(
const
EffectProperties
&
oSrc
)
EffectProperties
&
operator
=
(
const
EffectProperties
&
oSrc
)
{
{
...
@@ -54,7 +55,23 @@ namespace PPTX
...
@@ -54,7 +55,23 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
public:
virtual
OOX
::
EElementType
getType
()
const
{
if
(
List
.
IsInit
())
return
List
->
getType
();
return
OOX
::
et_Unknown
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
if
(
strName
==
_T
(
"effectLst"
))
List
.
reset
(
new
Logic
::
EffectLst
(
oReader
));
else
if
(
strName
==
_T
(
"effectDag"
))
List
.
reset
(
new
Logic
::
EffectDag
(
oReader
));
else
List
.
reset
();
}
virtual
bool
is_init
()
const
{
return
(
List
.
IsInit
());};
virtual
bool
is_init
()
const
{
return
(
List
.
IsInit
());};
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/EffectStyle.cpp
View file @
62d48608
...
@@ -44,7 +44,24 @@ namespace PPTX
...
@@ -44,7 +44,24 @@ namespace PPTX
FillParentPointersForChilds
();
FillParentPointersForChilds
();
}
}
void
EffectStyle
::
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
if
(
strName
==
L"a:scene3d"
)
scene3d
=
oReader
;
else
if
(
strName
==
L"a:sp3d"
)
sp3d
=
oReader
;
else
EffectList
.
fromXML
(
oReader
);
}
FillParentPointersForChilds
();
}
std
::
wstring
EffectStyle
::
toXML
()
const
std
::
wstring
EffectStyle
::
toXML
()
const
{
{
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/EffectStyle.h
View file @
62d48608
...
@@ -46,7 +46,8 @@ namespace PPTX
...
@@ -46,7 +46,8 @@ namespace PPTX
class
EffectStyle
:
public
WrapperWritingElement
class
EffectStyle
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
EffectStyle
)
WritingElement_AdditionConstructors
(
EffectStyle
)
PPTX_LOGIC_BASE2
(
EffectStyle
)
EffectStyle
&
operator
=
(
const
EffectStyle
&
oSrc
)
EffectStyle
&
operator
=
(
const
EffectStyle
&
oSrc
)
{
{
...
@@ -58,8 +59,11 @@ namespace PPTX
...
@@ -58,8 +59,11 @@ namespace PPTX
sp3d
=
oSrc
.
sp3d
;
sp3d
=
oSrc
.
sp3d
;
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
public:
{
return
OOX
::
et_a_effectStyle
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
);
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
);
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
);
virtual
std
::
wstring
toXML
()
const
;
virtual
std
::
wstring
toXML
()
const
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/AlphaBiLevel.h
View file @
62d48608
...
@@ -43,7 +43,8 @@ namespace PPTX
...
@@ -43,7 +43,8 @@ namespace PPTX
class
AlphaBiLevel
:
public
WrapperWritingElement
class
AlphaBiLevel
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
AlphaBiLevel
)
WritingElement_AdditionConstructors
(
AlphaBiLevel
)
PPTX_LOGIC_BASE2
(
AlphaBiLevel
)
AlphaBiLevel
&
operator
=
(
const
AlphaBiLevel
&
oSrc
)
AlphaBiLevel
&
operator
=
(
const
AlphaBiLevel
&
oSrc
)
{
{
...
@@ -54,7 +55,22 @@ namespace PPTX
...
@@ -54,7 +55,22 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_alphaBiLevel
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_ReadSingle
(
oReader
,
_T
(
"thresh"
),
thresh
)
WritingElement_ReadAttributes_End
(
oReader
)
Normalize
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
node
.
ReadAttributeBase
(
L"thresh"
,
thresh
);
node
.
ReadAttributeBase
(
L"thresh"
,
thresh
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/AlphaCeiling.h
View file @
62d48608
...
@@ -43,7 +43,8 @@ namespace PPTX
...
@@ -43,7 +43,8 @@ namespace PPTX
class
AlphaCeiling
:
public
WrapperWritingElement
class
AlphaCeiling
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
AlphaCeiling
)
WritingElement_AdditionConstructors
(
AlphaCeiling
)
PPTX_LOGIC_BASE2
(
AlphaCeiling
)
AlphaCeiling
&
operator
=
(
const
AlphaCeiling
&
oSrc
)
AlphaCeiling
&
operator
=
(
const
AlphaCeiling
&
oSrc
)
{
{
...
@@ -59,7 +60,13 @@ namespace PPTX
...
@@ -59,7 +60,13 @@ namespace PPTX
pWriter
->
EndRecord
();
pWriter
->
EndRecord
();
}
}
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_alphaCeiling
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
}
}
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/AlphaFloor.h
View file @
62d48608
...
@@ -43,7 +43,8 @@ namespace PPTX
...
@@ -43,7 +43,8 @@ namespace PPTX
class
AlphaFloor
:
public
WrapperWritingElement
class
AlphaFloor
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
AlphaFloor
)
WritingElement_AdditionConstructors
(
AlphaFloor
)
PPTX_LOGIC_BASE2
(
AlphaFloor
)
AlphaFloor
&
operator
=
(
const
AlphaFloor
&
oSrc
)
AlphaFloor
&
operator
=
(
const
AlphaFloor
&
oSrc
)
{
{
...
@@ -52,12 +53,16 @@ namespace PPTX
...
@@ -52,12 +53,16 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
public:
{
return
OOX
::
et_a_alphaFloor
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
}
}
virtual
std
::
wstring
toXML
()
const
virtual
std
::
wstring
toXML
()
const
{
{
return
_T
(
"<a:alphaFloor/>"
);
return
_T
(
"<a:alphaFloor/>"
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/AlphaInv.h
View file @
62d48608
...
@@ -44,7 +44,8 @@ namespace PPTX
...
@@ -44,7 +44,8 @@ namespace PPTX
class
AlphaInv
:
public
WrapperWritingElement
class
AlphaInv
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
AlphaInv
)
WritingElement_AdditionConstructors
(
AlphaInv
)
PPTX_LOGIC_BASE2
(
AlphaInv
)
AlphaInv
&
operator
=
(
const
AlphaInv
&
oSrc
)
AlphaInv
&
operator
=
(
const
AlphaInv
&
oSrc
)
{
{
...
@@ -55,7 +56,23 @@ namespace PPTX
...
@@ -55,7 +56,23 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_alphaInv
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
Color
.
fromXML
(
oReader
);
}
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
Color
.
GetColorFrom
(
node
);
Color
.
GetColorFrom
(
node
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/AlphaMod.h
View file @
62d48608
...
@@ -44,7 +44,8 @@ namespace PPTX
...
@@ -44,7 +44,8 @@ namespace PPTX
class
AlphaMod
:
public
WrapperWritingElement
class
AlphaMod
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
AlphaMod
)
WritingElement_AdditionConstructors
(
AlphaMod
)
PPTX_LOGIC_BASE2
(
AlphaMod
)
AlphaMod
&
operator
=
(
const
AlphaMod
&
oSrc
)
AlphaMod
&
operator
=
(
const
AlphaMod
&
oSrc
)
{
{
...
@@ -54,8 +55,28 @@ namespace PPTX
...
@@ -54,8 +55,28 @@ namespace PPTX
cont
=
oSrc
.
cont
;
cont
=
oSrc
.
cont
;
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_alphaMod
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
if
(
strName
==
L"a:cont"
)
{
cont
=
oReader
;
break
;
}
}
FillParentPointersForChilds
();
}
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
cont
=
node
.
ReadNode
(
_T
(
"a:cont"
));
cont
=
node
.
ReadNode
(
_T
(
"a:cont"
));
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/AlphaModFix.h
View file @
62d48608
...
@@ -43,8 +43,8 @@ namespace PPTX
...
@@ -43,8 +43,8 @@ namespace PPTX
class
AlphaModFix
:
public
WrapperWritingElement
class
AlphaModFix
:
public
WrapperWritingElement
{
{
public:
public:
WritingElement_AdditionConstructors
(
AlphaModFix
)
PPTX_LOGIC_BASE
(
AlphaModFix
)
PPTX_LOGIC_BASE
2
(
AlphaModFix
)
AlphaModFix
&
operator
=
(
const
AlphaModFix
&
oSrc
)
AlphaModFix
&
operator
=
(
const
AlphaModFix
&
oSrc
)
{
{
...
@@ -54,8 +54,22 @@ namespace PPTX
...
@@ -54,8 +54,22 @@ namespace PPTX
amt
=
oSrc
.
amt
;
amt
=
oSrc
.
amt
;
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_alphaModFix
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"amt"
),
amt
)
WritingElement_ReadAttributes_End
(
oReader
)
public:
Normalize
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
node
.
ReadAttributeBase
(
L"amt"
,
amt
);
node
.
ReadAttributeBase
(
L"amt"
,
amt
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/AlphaOutset.h
View file @
62d48608
...
@@ -44,7 +44,8 @@ namespace PPTX
...
@@ -44,7 +44,8 @@ namespace PPTX
{
{
public:
public:
PPTX_LOGIC_BASE
(
AlphaOutset
)
WritingElement_AdditionConstructors
(
AlphaOutset
)
PPTX_LOGIC_BASE2
(
AlphaOutset
)
AlphaOutset
&
operator
=
(
const
AlphaOutset
&
oSrc
)
AlphaOutset
&
operator
=
(
const
AlphaOutset
&
oSrc
)
{
{
...
@@ -54,8 +55,20 @@ namespace PPTX
...
@@ -54,8 +55,20 @@ namespace PPTX
rad
=
oSrc
.
rad
;
rad
=
oSrc
.
rad
;
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
public:
{
return
OOX
::
et_a_alphaOutset
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"rad"
),
rad
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
node
.
ReadAttributeBase
(
L"rad"
,
rad
);
node
.
ReadAttributeBase
(
L"rad"
,
rad
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/AlphaRepl.h
View file @
62d48608
...
@@ -43,7 +43,8 @@ namespace PPTX
...
@@ -43,7 +43,8 @@ namespace PPTX
class
AlphaRepl
:
public
WrapperWritingElement
class
AlphaRepl
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
AlphaRepl
)
WritingElement_AdditionConstructors
(
AlphaRepl
)
PPTX_LOGIC_BASE2
(
AlphaRepl
)
AlphaRepl
&
operator
=
(
const
AlphaRepl
&
oSrc
)
AlphaRepl
&
operator
=
(
const
AlphaRepl
&
oSrc
)
{
{
...
@@ -53,8 +54,22 @@ namespace PPTX
...
@@ -53,8 +54,22 @@ namespace PPTX
a
=
oSrc
.
a
;
a
=
oSrc
.
a
;
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_alphaRepl
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"a"
),
a
)
WritingElement_ReadAttributes_End
(
oReader
)
public:
Normalize
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
node
.
ReadAttributeBase
(
L"a"
,
a
);
node
.
ReadAttributeBase
(
L"a"
,
a
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/BiLevel.h
View file @
62d48608
...
@@ -44,7 +44,8 @@ namespace PPTX
...
@@ -44,7 +44,8 @@ namespace PPTX
{
{
public:
public:
PPTX_LOGIC_BASE
(
BiLevel
)
WritingElement_AdditionConstructors
(
BiLevel
)
PPTX_LOGIC_BASE2
(
BiLevel
)
BiLevel
&
operator
=
(
const
BiLevel
&
oSrc
)
BiLevel
&
operator
=
(
const
BiLevel
&
oSrc
)
{
{
...
@@ -54,8 +55,22 @@ namespace PPTX
...
@@ -54,8 +55,22 @@ namespace PPTX
thresh
=
oSrc
.
thresh
;
thresh
=
oSrc
.
thresh
;
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_biLevel
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"thresh"
),
thresh
)
WritingElement_ReadAttributes_End
(
oReader
)
public:
Normalize
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
node
.
ReadAttributeBase
(
L"thresh"
,
thresh
);
node
.
ReadAttributeBase
(
L"thresh"
,
thresh
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/Blend.h
View file @
62d48608
...
@@ -45,8 +45,8 @@ namespace PPTX
...
@@ -45,8 +45,8 @@ namespace PPTX
class
Blend
:
public
WrapperWritingElement
class
Blend
:
public
WrapperWritingElement
{
{
public:
public:
WritingElement_AdditionConstructors
(
Blend
)
PPTX_LOGIC_BASE
(
Blend
)
PPTX_LOGIC_BASE
2
(
Blend
)
Blend
&
operator
=
(
const
Blend
&
oSrc
)
Blend
&
operator
=
(
const
Blend
&
oSrc
)
{
{
...
@@ -57,8 +57,32 @@ namespace PPTX
...
@@ -57,8 +57,32 @@ namespace PPTX
blend
=
oSrc
.
blend
;
blend
=
oSrc
.
blend
;
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_blend
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
if
(
oReader
.
IsEmptyNode
()
)
return
;
public:
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
if
(
strName
==
L"a:cont"
)
cont
=
oReader
;
}
FillParentPointersForChilds
();
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"blend"
),
blend
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
cont
=
node
.
ReadNode
(
_T
(
"a:cont"
));
cont
=
node
.
ReadNode
(
_T
(
"a:cont"
));
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/Blur.h
View file @
62d48608
...
@@ -43,7 +43,8 @@ namespace PPTX
...
@@ -43,7 +43,8 @@ namespace PPTX
{
{
public:
public:
PPTX_LOGIC_BASE
(
Blur
)
WritingElement_AdditionConstructors
(
Blur
)
PPTX_LOGIC_BASE2
(
Blur
)
Blur
&
operator
=
(
const
Blur
&
oSrc
)
Blur
&
operator
=
(
const
Blur
&
oSrc
)
{
{
...
@@ -55,7 +56,21 @@ namespace PPTX
...
@@ -55,7 +56,21 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_blur
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"rad"
),
rad
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"grow"
),
grow
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
node
.
ReadAttributeBase
(
L"rad"
,
rad
);
node
.
ReadAttributeBase
(
L"rad"
,
rad
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/ClrChange.h
View file @
62d48608
...
@@ -44,7 +44,8 @@ namespace PPTX
...
@@ -44,7 +44,8 @@ namespace PPTX
class
ClrChange
:
public
WrapperWritingElement
class
ClrChange
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
ClrChange
)
WritingElement_AdditionConstructors
(
ClrChange
)
PPTX_LOGIC_BASE2
(
ClrChange
)
ClrChange
&
operator
=
(
const
ClrChange
&
oSrc
)
ClrChange
&
operator
=
(
const
ClrChange
&
oSrc
)
{
{
...
@@ -56,8 +57,35 @@ namespace PPTX
...
@@ -56,8 +57,35 @@ namespace PPTX
useA
=
oSrc
.
useA
;
useA
=
oSrc
.
useA
;
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_clrChange
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
if
(
strName
==
L"a:clrTo"
)
ClrTo
.
fromXML
(
oReader
);
else
if
(
strName
==
L"a:clrFrom"
)
ClrFrom
.
fromXML
(
oReader
);
}
FillParentPointersForChilds
();
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"useA"
),
useA
)
WritingElement_ReadAttributes_End
(
oReader
)
}
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
XmlUtils
::
CXmlNode
node1
=
node
.
ReadNode
(
_T
(
"a:clrFrom"
));
XmlUtils
::
CXmlNode
node1
=
node
.
ReadNode
(
_T
(
"a:clrFrom"
));
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/ClrRepl.h
View file @
62d48608
...
@@ -45,7 +45,8 @@ namespace PPTX
...
@@ -45,7 +45,8 @@ namespace PPTX
{
{
public:
public:
PPTX_LOGIC_BASE
(
ClrRepl
)
WritingElement_AdditionConstructors
(
ClrRepl
)
PPTX_LOGIC_BASE2
(
ClrRepl
)
ClrRepl
&
operator
=
(
const
ClrRepl
&
oSrc
)
ClrRepl
&
operator
=
(
const
ClrRepl
&
oSrc
)
{
{
...
@@ -55,8 +56,24 @@ namespace PPTX
...
@@ -55,8 +56,24 @@ namespace PPTX
Color
=
oSrc
.
Color
;
Color
=
oSrc
.
Color
;
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_clrRepl
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
if
(
oReader
.
IsEmptyNode
()
)
return
;
public:
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
Color
.
fromXML
(
oReader
);
}
FillParentPointersForChilds
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
Color
.
GetColorFrom
(
node
);
Color
.
GetColorFrom
(
node
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/Duotone.h
View file @
62d48608
...
@@ -43,7 +43,8 @@ namespace PPTX
...
@@ -43,7 +43,8 @@ namespace PPTX
class
Duotone
:
public
WrapperWritingElement
class
Duotone
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
Duotone
)
WritingElement_AdditionConstructors
(
Duotone
)
PPTX_LOGIC_BASE2
(
Duotone
)
Duotone
&
operator
=
(
const
Duotone
&
oSrc
)
Duotone
&
operator
=
(
const
Duotone
&
oSrc
)
{
{
...
@@ -53,15 +54,32 @@ namespace PPTX
...
@@ -53,15 +54,32 @@ namespace PPTX
Colors
=
oSrc
.
Colors
;
Colors
=
oSrc
.
Colors
;
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_duotone
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
if
(
oReader
.
IsEmptyNode
()
)
return
;
public:
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
UniColor
col
;
Colors
.
push_back
(
col
);
Colors
.
back
().
fromXML
(
oReader
);
}
FillParentPointersForChilds
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
Colors
.
clear
();
Colors
.
clear
();
node
.
LoadArray
(
_T
(
"*"
),
Colors
);
node
.
LoadArray
(
_T
(
"*"
),
Colors
);
FillParentPointersForChilds
();
FillParentPointersForChilds
();
}
}
virtual
std
::
wstring
toXML
()
const
virtual
std
::
wstring
toXML
()
const
{
{
XmlUtils
::
CNodeValue
oValue
;
XmlUtils
::
CNodeValue
oValue
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/EffectElement.h
View file @
62d48608
...
@@ -44,7 +44,8 @@ namespace PPTX
...
@@ -44,7 +44,8 @@ namespace PPTX
{
{
public:
public:
PPTX_LOGIC_BASE
(
EffectElement
)
WritingElement_AdditionConstructors
(
EffectElement
)
PPTX_LOGIC_BASE2
(
EffectElement
)
EffectElement
&
operator
=
(
const
EffectElement
&
oSrc
)
EffectElement
&
operator
=
(
const
EffectElement
&
oSrc
)
{
{
...
@@ -54,8 +55,21 @@ namespace PPTX
...
@@ -54,8 +55,21 @@ namespace PPTX
ref
=
oSrc
.
ref
;
ref
=
oSrc
.
ref
;
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_effect
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"ref"
),
ref
)
WritingElement_ReadAttributes_End
(
oReader
)
}
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
node
.
ReadAttributeBase
(
L"ref"
,
ref
);
node
.
ReadAttributeBase
(
L"ref"
,
ref
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/FillEffect.h
View file @
62d48608
...
@@ -44,7 +44,8 @@ namespace PPTX
...
@@ -44,7 +44,8 @@ namespace PPTX
{
{
public:
public:
PPTX_LOGIC_BASE
(
FillEffect
)
WritingElement_AdditionConstructors
(
FillEffect
)
PPTX_LOGIC_BASE2
(
FillEffect
)
FillEffect
&
operator
=
(
const
FillEffect
&
oSrc
)
FillEffect
&
operator
=
(
const
FillEffect
&
oSrc
)
{
{
...
@@ -54,8 +55,24 @@ namespace PPTX
...
@@ -54,8 +55,24 @@ namespace PPTX
Fill
=
oSrc
.
Fill
;
Fill
=
oSrc
.
Fill
;
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_fill
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
if
(
oReader
.
IsEmptyNode
()
)
return
;
public:
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
Fill
.
fromXML
(
oReader
);
}
FillParentPointersForChilds
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
Fill
.
GetFillFrom
(
node
);
Fill
.
GetFillFrom
(
node
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/FillOverlay.h
View file @
62d48608
...
@@ -46,7 +46,8 @@ namespace PPTX
...
@@ -46,7 +46,8 @@ namespace PPTX
{
{
public:
public:
PPTX_LOGIC_BASE
(
FillOverlay
)
WritingElement_AdditionConstructors
(
FillOverlay
)
PPTX_LOGIC_BASE2
(
FillOverlay
)
FillOverlay
&
operator
=
(
const
FillOverlay
&
oSrc
)
FillOverlay
&
operator
=
(
const
FillOverlay
&
oSrc
)
{
{
...
@@ -58,7 +59,32 @@ namespace PPTX
...
@@ -58,7 +59,32 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_fillOverlay
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
Fill
.
fromXML
(
oReader
);
}
FillParentPointersForChilds
();
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"blend"
),
blend
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
Fill
.
GetFillFrom
(
node
);
Fill
.
GetFillFrom
(
node
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/Glow.h
View file @
62d48608
...
@@ -40,11 +40,11 @@ namespace PPTX
...
@@ -40,11 +40,11 @@ namespace PPTX
{
{
namespace
Logic
namespace
Logic
{
{
class
Glow
:
public
WrapperWritingElement
class
Glow
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
Glow
)
WritingElement_AdditionConstructors
(
Glow
)
PPTX_LOGIC_BASE2
(
Glow
)
Glow
&
operator
=
(
const
Glow
&
oSrc
)
Glow
&
operator
=
(
const
Glow
&
oSrc
)
{
{
...
@@ -55,14 +55,40 @@ namespace PPTX
...
@@ -55,14 +55,40 @@ namespace PPTX
rad
=
oSrc
.
rad
;
rad
=
oSrc
.
rad
;
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_clrRepl
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
public:
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
Color
.
fromXML
(
oReader
);
}
FillParentPointersForChilds
();
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"rad"
),
rad
)
WritingElement_ReadAttributes_End
(
oReader
)
Normalize
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
Color
.
GetColorFrom
(
node
);
Color
.
GetColorFrom
(
node
);
node
.
ReadAttributeBase
(
L"rad"
,
rad
);
node
.
ReadAttributeBase
(
L"rad"
,
rad
);
FillParentPointersForChilds
();
FillParentPointersForChilds
();
Normalize
();
Normalize
();
}
}
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/Grayscl.h
View file @
62d48608
...
@@ -43,7 +43,8 @@ namespace PPTX
...
@@ -43,7 +43,8 @@ namespace PPTX
class
Grayscl
:
public
WrapperWritingElement
class
Grayscl
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
Grayscl
)
WritingElement_AdditionConstructors
(
Grayscl
)
PPTX_LOGIC_BASE2
(
Grayscl
)
Grayscl
&
operator
=
(
const
Grayscl
&
oSrc
)
Grayscl
&
operator
=
(
const
Grayscl
&
oSrc
)
{
{
...
@@ -52,8 +53,13 @@ namespace PPTX
...
@@ -52,8 +53,13 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
public:
{
return
OOX
::
et_a_grayscl
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
}
}
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/HslEffect.h
View file @
62d48608
...
@@ -43,7 +43,8 @@ namespace PPTX
...
@@ -43,7 +43,8 @@ namespace PPTX
class
HslEffect
:
public
WrapperWritingElement
class
HslEffect
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
HslEffect
)
WritingElement_AdditionConstructors
(
HslEffect
)
PPTX_LOGIC_BASE2
(
HslEffect
)
HslEffect
&
operator
=
(
const
HslEffect
&
oSrc
)
HslEffect
&
operator
=
(
const
HslEffect
&
oSrc
)
{
{
...
@@ -55,8 +56,24 @@ namespace PPTX
...
@@ -55,8 +56,24 @@ namespace PPTX
sat
=
oSrc
.
sat
;
sat
=
oSrc
.
sat
;
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_hsl
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"hue"
),
hue
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"sat"
),
sat
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"lum"
),
lum
)
WritingElement_ReadAttributes_End
(
oReader
)
public:
Normalize
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
node
.
ReadAttributeBase
(
L"hue"
,
hue
);
node
.
ReadAttributeBase
(
L"hue"
,
hue
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/InnerShdw.h
View file @
62d48608
...
@@ -44,7 +44,8 @@ namespace PPTX
...
@@ -44,7 +44,8 @@ namespace PPTX
class
InnerShdw
:
public
WrapperWritingElement
class
InnerShdw
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
InnerShdw
)
WritingElement_AdditionConstructors
(
InnerShdw
)
PPTX_LOGIC_BASE2
(
InnerShdw
)
InnerShdw
&
operator
=
(
const
InnerShdw
&
oSrc
)
InnerShdw
&
operator
=
(
const
InnerShdw
&
oSrc
)
{
{
...
@@ -57,8 +58,36 @@ namespace PPTX
...
@@ -57,8 +58,36 @@ namespace PPTX
dist
=
oSrc
.
dist
;
dist
=
oSrc
.
dist
;
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_innerShdw
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
public:
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
Color
.
fromXML
(
oReader
);
}
FillParentPointersForChilds
();
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"blurRad"
),
blurRad
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"dir"
),
dir
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"dist"
),
dist
)
WritingElement_ReadAttributes_End
(
oReader
)
Normalize
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
Color
.
GetColorFrom
(
node
);
Color
.
GetColorFrom
(
node
);
...
@@ -66,8 +95,8 @@ namespace PPTX
...
@@ -66,8 +95,8 @@ namespace PPTX
node
.
ReadAttributeBase
(
L"dir"
,
dir
);
node
.
ReadAttributeBase
(
L"dir"
,
dir
);
node
.
ReadAttributeBase
(
L"dist"
,
dist
);
node
.
ReadAttributeBase
(
L"dist"
,
dist
);
FillParentPointersForChilds
();
Normalize
();
Normalize
();
FillParentPointersForChilds
();
}
}
virtual
std
::
wstring
toXML
()
const
virtual
std
::
wstring
toXML
()
const
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/LumEffect.h
View file @
62d48608
...
@@ -43,7 +43,8 @@ namespace PPTX
...
@@ -43,7 +43,8 @@ namespace PPTX
class
LumEffect
:
public
WrapperWritingElement
class
LumEffect
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
LumEffect
)
WritingElement_AdditionConstructors
(
LumEffect
)
PPTX_LOGIC_BASE2
(
LumEffect
)
LumEffect
&
operator
=
(
const
LumEffect
&
oSrc
)
LumEffect
&
operator
=
(
const
LumEffect
&
oSrc
)
{
{
...
@@ -54,8 +55,21 @@ namespace PPTX
...
@@ -54,8 +55,21 @@ namespace PPTX
contrast
=
oSrc
.
contrast
;
contrast
=
oSrc
.
contrast
;
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
public:
{
return
OOX
::
et_a_lum
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"bright"
),
bright
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"contrast"
),
contrast
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
node
.
ReadAttributeBase
(
L"bright"
,
bright
);
node
.
ReadAttributeBase
(
L"bright"
,
bright
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/OuterShdw.h
View file @
62d48608
...
@@ -45,7 +45,8 @@ namespace PPTX
...
@@ -45,7 +45,8 @@ namespace PPTX
class
OuterShdw
:
public
WrapperWritingElement
class
OuterShdw
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
OuterShdw
)
WritingElement_AdditionConstructors
(
OuterShdw
)
PPTX_LOGIC_BASE2
(
OuterShdw
)
OuterShdw
&
operator
=
(
const
OuterShdw
&
oSrc
)
OuterShdw
&
operator
=
(
const
OuterShdw
&
oSrc
)
{
{
...
@@ -66,8 +67,42 @@ namespace PPTX
...
@@ -66,8 +67,42 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_innerShdw
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
public:
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
Color
.
fromXML
(
oReader
);
}
FillParentPointersForChilds
();
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"blurRad"
),
blurRad
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"dir"
),
dir
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"dist"
),
dist
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"algnt"
),
algn
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"kx"
),
kx
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"ky"
),
ky
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"rotWithShape"
),
rotWithShape
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"sx"
),
sx
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"sy"
),
sy
)
WritingElement_ReadAttributes_End
(
oReader
)
Normalize
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
Color
.
GetColorFrom
(
node
);
Color
.
GetColorFrom
(
node
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/PrstShdw.h
View file @
62d48608
...
@@ -45,7 +45,8 @@ namespace PPTX
...
@@ -45,7 +45,8 @@ namespace PPTX
class
PrstShdw
:
public
WrapperWritingElement
class
PrstShdw
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
PrstShdw
)
WritingElement_AdditionConstructors
(
PrstShdw
)
PPTX_LOGIC_BASE2
(
PrstShdw
)
PrstShdw
&
operator
=
(
const
PrstShdw
&
oSrc
)
PrstShdw
&
operator
=
(
const
PrstShdw
&
oSrc
)
{
{
...
@@ -60,8 +61,37 @@ namespace PPTX
...
@@ -60,8 +61,37 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_prstShdw
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
public:
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
Color
.
fromXML
(
oReader
);
}
Normalize
();
FillParentPointersForChilds
();
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"prst"
),
prst
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"dir"
),
dir
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"dist"
),
dist
)
WritingElement_ReadAttributes_End
(
oReader
)
Normalize
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
Color
.
GetColorFrom
(
node
);
Color
.
GetColorFrom
(
node
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/Reflection.h
View file @
62d48608
...
@@ -44,7 +44,8 @@ namespace PPTX
...
@@ -44,7 +44,8 @@ namespace PPTX
class
Reflection
:
public
WrapperWritingElement
class
Reflection
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
Reflection
)
WritingElement_AdditionConstructors
(
Reflection
)
PPTX_LOGIC_BASE2
(
Reflection
)
Reflection
&
operator
=
(
const
Reflection
&
oSrc
)
Reflection
&
operator
=
(
const
Reflection
&
oSrc
)
{
{
...
@@ -68,8 +69,35 @@ namespace PPTX
...
@@ -68,8 +69,35 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_reflection
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"blurRad"
),
blurRad
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"dir"
),
dir
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"fadeDir"
),
fadeDir
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"dist"
),
dist
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"algnt"
),
algn
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"kx"
),
kx
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"ky"
),
ky
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"rotWithShape"
),
rotWithShape
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"sx"
),
sx
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"sy"
),
sy
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"stA"
),
stA
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"endA"
),
endA
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"stPos"
),
stPos
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"endPos"
),
endPos
)
WritingElement_ReadAttributes_End
(
oReader
)
public:
Normalize
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
node
.
ReadAttributeBase
(
L"algn"
,
algn
);
node
.
ReadAttributeBase
(
L"algn"
,
algn
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/RelOff.h
View file @
62d48608
...
@@ -43,7 +43,8 @@ namespace PPTX
...
@@ -43,7 +43,8 @@ namespace PPTX
class
RelOff
:
public
WrapperWritingElement
class
RelOff
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
RelOff
)
WritingElement_AdditionConstructors
(
RelOff
)
PPTX_LOGIC_BASE2
(
RelOff
)
RelOff
&
operator
=
(
const
RelOff
&
oSrc
)
RelOff
&
operator
=
(
const
RelOff
&
oSrc
)
{
{
...
@@ -54,8 +55,21 @@ namespace PPTX
...
@@ -54,8 +55,21 @@ namespace PPTX
ty
=
oSrc
.
ty
;
ty
=
oSrc
.
ty
;
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
public:
{
return
OOX
::
et_a_relOff
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"tx"
),
tx
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"ty"
),
ty
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
node
.
ReadAttributeBase
(
L"tx"
,
tx
);
node
.
ReadAttributeBase
(
L"tx"
,
tx
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/SoftEdge.h
View file @
62d48608
...
@@ -43,7 +43,8 @@ namespace PPTX
...
@@ -43,7 +43,8 @@ namespace PPTX
class
SoftEdge
:
public
WrapperWritingElement
class
SoftEdge
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
SoftEdge
)
WritingElement_AdditionConstructors
(
SoftEdge
)
PPTX_LOGIC_BASE2
(
SoftEdge
)
SoftEdge
&
operator
=
(
const
SoftEdge
&
oSrc
)
SoftEdge
&
operator
=
(
const
SoftEdge
&
oSrc
)
{
{
...
@@ -53,8 +54,20 @@ namespace PPTX
...
@@ -53,8 +54,20 @@ namespace PPTX
rad
=
oSrc
.
rad
;
rad
=
oSrc
.
rad
;
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
public:
{
return
OOX
::
et_a_softEdge
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_ReadSingle
(
oReader
,
_T
(
"rad"
),
rad
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
node
.
ReadAttributeBase
(
L"rad"
,
rad
);
node
.
ReadAttributeBase
(
L"rad"
,
rad
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/TintEffect.h
View file @
62d48608
...
@@ -43,7 +43,8 @@ namespace PPTX
...
@@ -43,7 +43,8 @@ namespace PPTX
class
TintEffect
:
public
WrapperWritingElement
class
TintEffect
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
TintEffect
)
WritingElement_AdditionConstructors
(
TintEffect
)
PPTX_LOGIC_BASE2
(
TintEffect
)
TintEffect
&
operator
=
(
const
TintEffect
&
oSrc
)
TintEffect
&
operator
=
(
const
TintEffect
&
oSrc
)
{
{
...
@@ -54,8 +55,23 @@ namespace PPTX
...
@@ -54,8 +55,23 @@ namespace PPTX
hue
=
oSrc
.
hue
;
hue
=
oSrc
.
hue
;
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_tint
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"amt"
),
amt
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"hue"
),
hue
)
WritingElement_ReadAttributes_End
(
oReader
)
public:
Normalize
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
node
.
ReadAttributeBase
(
L"amt"
,
amt
);
node
.
ReadAttributeBase
(
L"amt"
,
amt
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Effects/XfrmEffect.h
View file @
62d48608
...
@@ -43,7 +43,8 @@ namespace PPTX
...
@@ -43,7 +43,8 @@ namespace PPTX
class
XfrmEffect
:
public
WrapperWritingElement
class
XfrmEffect
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
XfrmEffect
)
WritingElement_AdditionConstructors
(
XfrmEffect
)
PPTX_LOGIC_BASE2
(
XfrmEffect
)
XfrmEffect
&
operator
=
(
const
XfrmEffect
&
oSrc
)
XfrmEffect
&
operator
=
(
const
XfrmEffect
&
oSrc
)
{
{
...
@@ -59,8 +60,27 @@ namespace PPTX
...
@@ -59,8 +60,27 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_xfrm
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"kx"
),
kx
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"ky"
),
ky
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"sx"
),
sx
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"sy"
),
sy
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"tx"
),
tx
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"ty"
),
ty
)
WritingElement_ReadAttributes_End
(
oReader
)
public:
Normalize
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
node
.
ReadAttributeBase
(
L"kx"
,
kx
);
node
.
ReadAttributeBase
(
L"kx"
,
kx
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/Blip.cpp
View file @
62d48608
...
@@ -41,6 +41,26 @@ namespace PPTX
...
@@ -41,6 +41,26 @@ namespace PPTX
{
{
namespace
Logic
namespace
Logic
{
{
void
Blip
::
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
Effects
.
clear
();
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nParentDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nParentDepth
)
)
{
std
::
wstring
sName
=
oReader
.
GetName
();
UniEffect
uni
;
Effects
.
push_back
(
uni
);
Effects
.
back
().
fromXML
(
oReader
);
}
FillParentPointersForChilds
();
}
void
Blip
::
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
void
Blip
::
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
m_namespace
=
XmlUtils
::
GetNamespace
(
node
.
GetName
());
m_namespace
=
XmlUtils
::
GetNamespace
(
node
.
GetName
());
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/Blip.h
View file @
62d48608
...
@@ -45,7 +45,8 @@ namespace PPTX
...
@@ -45,7 +45,8 @@ namespace PPTX
class
Blip
:
public
WrapperWritingElement
class
Blip
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
Blip
)
WritingElement_AdditionConstructors
(
Blip
)
PPTX_LOGIC_BASE2
(
Blip
)
Blip
&
operator
=
(
const
Blip
&
oSrc
)
Blip
&
operator
=
(
const
Blip
&
oSrc
)
{
{
...
@@ -66,8 +67,19 @@ namespace PPTX
...
@@ -66,8 +67,19 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
public:
{
return
OOX
::
et_a_blip
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
);
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"r:embed"
),
embed
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"r:link"
),
link
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"cstate"
),
cstate
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
);
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
);
virtual
std
::
wstring
toXML
()
const
;
virtual
std
::
wstring
toXML
()
const
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/BlipFill.h
View file @
62d48608
...
@@ -49,7 +49,8 @@ namespace PPTX
...
@@ -49,7 +49,8 @@ namespace PPTX
class
BlipFill
:
public
WrapperWritingElement
class
BlipFill
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
BlipFill
)
WritingElement_AdditionConstructors
(
BlipFill
)
PPTX_LOGIC_BASE2
(
BlipFill
)
BlipFill
&
operator
=
(
const
BlipFill
&
oSrc
)
BlipFill
&
operator
=
(
const
BlipFill
&
oSrc
)
{
{
...
@@ -67,8 +68,50 @@ namespace PPTX
...
@@ -67,8 +68,50 @@ namespace PPTX
m_namespace
=
oSrc
.
m_namespace
;
m_namespace
=
oSrc
.
m_namespace
;
return
*
this
;
return
*
this
;
}
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
public:
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
if
(
_T
(
"blip"
)
==
strName
)
{
if
(
!
blip
.
IsInit
())
blip
=
oReader
;
}
else
if
(
_T
(
"srcRect"
)
==
strName
)
{
if
(
!
srcRect
.
IsInit
())
srcRect
=
oReader
;
}
else
if
(
_T
(
"tile"
)
==
strName
)
{
if
(
!
tile
.
IsInit
())
tile
=
oReader
;
}
else
if
(
_T
(
"stretch"
)
==
strName
)
{
if
(
!
stretch
.
IsInit
())
stretch
=
oReader
;
}
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_blipFill
;
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"dpi"
),
dpi
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"rotWithShape"
),
rotWithShape
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
m_namespace
=
XmlUtils
::
GetNamespace
(
node
.
GetName
());
m_namespace
=
XmlUtils
::
GetNamespace
(
node
.
GetName
());
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/GradFill.h
View file @
62d48608
...
@@ -48,7 +48,8 @@ namespace PPTX
...
@@ -48,7 +48,8 @@ namespace PPTX
class
GradFill
:
public
WrapperWritingElement
class
GradFill
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
GradFill
)
WritingElement_AdditionConstructors
(
GradFill
)
PPTX_LOGIC_BASE2
(
GradFill
)
GradFill
&
operator
=
(
const
GradFill
&
oSrc
)
GradFill
&
operator
=
(
const
GradFill
&
oSrc
)
{
{
...
@@ -67,8 +68,47 @@ namespace PPTX
...
@@ -67,8 +68,47 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_gradFill
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
public:
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
XmlUtils
::
GetNameNoNS
(
oReader
.
GetName
());
if
(
_T
(
"path"
)
==
strName
)
path
=
oReader
;
else
if
(
_T
(
"lin"
)
==
strName
)
lin
=
oReader
;
else
if
(
_T
(
"tileRect"
)
==
strName
)
tileRect
=
oReader
;
else
if
(
_T
(
"gsLst"
)
==
strName
)
{
int
nCurDepth1
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth1
)
)
{
std
::
wstring
sName1
=
XmlUtils
::
GetNameNoNS
(
oReader
.
GetName
());
Gs
g
;
GsLst
.
push_back
(
g
);
GsLst
.
back
().
fromXML
(
oReader
);
}
}
}
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"rotWithShape"
),
rotWithShape
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"flip"
),
flip
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
m_namespace
=
XmlUtils
::
GetNamespace
(
node
.
GetName
());
m_namespace
=
XmlUtils
::
GetNamespace
(
node
.
GetName
());
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/NoFill.h
View file @
62d48608
...
@@ -43,7 +43,8 @@ namespace PPTX
...
@@ -43,7 +43,8 @@ namespace PPTX
class
NoFill
:
public
WrapperWritingElement
class
NoFill
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
NoFill
)
WritingElement_AdditionConstructors
(
NoFill
)
PPTX_LOGIC_BASE2
(
NoFill
)
NoFill
&
operator
=
(
const
NoFill
&
oSrc
)
NoFill
&
operator
=
(
const
NoFill
&
oSrc
)
{
{
...
@@ -53,8 +54,19 @@ namespace PPTX
...
@@ -53,8 +54,19 @@ namespace PPTX
m_namespace
=
oSrc
.
m_namespace
;
m_namespace
=
oSrc
.
m_namespace
;
return
*
this
;
return
*
this
;
}
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
public:
{
m_namespace
=
XmlUtils
::
GetNamespace
(
oReader
.
GetName
());
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_noFill
;
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
m_namespace
=
XmlUtils
::
GetNamespace
(
node
.
GetName
());
m_namespace
=
XmlUtils
::
GetNamespace
(
node
.
GetName
());
...
@@ -87,7 +99,8 @@ namespace PPTX
...
@@ -87,7 +99,8 @@ namespace PPTX
class
GrpFill
:
public
WrapperWritingElement
class
GrpFill
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
GrpFill
)
WritingElement_AdditionConstructors
(
GrpFill
)
PPTX_LOGIC_BASE2
(
GrpFill
)
GrpFill
&
operator
=
(
const
GrpFill
&
oSrc
)
GrpFill
&
operator
=
(
const
GrpFill
&
oSrc
)
{
{
...
@@ -97,8 +110,19 @@ namespace PPTX
...
@@ -97,8 +110,19 @@ namespace PPTX
m_namespace
=
oSrc
.
m_namespace
;
m_namespace
=
oSrc
.
m_namespace
;
return
*
this
;
return
*
this
;
}
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
public:
{
m_namespace
=
XmlUtils
::
GetNamespace
(
oReader
.
GetName
());
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_grpFill
;
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
m_namespace
=
XmlUtils
::
GetNamespace
(
node
.
GetName
());
m_namespace
=
XmlUtils
::
GetNamespace
(
node
.
GetName
());
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/PattFill.h
View file @
62d48608
...
@@ -41,11 +41,11 @@ namespace PPTX
...
@@ -41,11 +41,11 @@ namespace PPTX
{
{
namespace
Logic
namespace
Logic
{
{
class
PattFill
:
public
WrapperWritingElement
class
PattFill
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
PattFill
)
WritingElement_AdditionConstructors
(
PattFill
)
PPTX_LOGIC_BASE2
(
PattFill
)
PattFill
&
operator
=
(
const
PattFill
&
oSrc
)
PattFill
&
operator
=
(
const
PattFill
&
oSrc
)
{
{
...
@@ -59,8 +59,34 @@ namespace PPTX
...
@@ -59,8 +59,34 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
public:
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
sName
=
oReader
.
GetName
();
if
(
sName
==
L"a:fgClr"
)
fgClr
.
fromXML
(
oReader
);
if
(
sName
==
L"a:bgClr"
)
bgClr
.
fromXML
(
oReader
);
}
FillParentPointersForChilds
();
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_pattFill
;
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_ReadSingle
(
oReader
,
_T
(
"prst"
),
prst
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
m_namespace
=
XmlUtils
::
GetNamespace
(
node
.
GetName
());
m_namespace
=
XmlUtils
::
GetNamespace
(
node
.
GetName
());
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/SolidFill.h
View file @
62d48608
...
@@ -44,7 +44,8 @@ namespace PPTX
...
@@ -44,7 +44,8 @@ namespace PPTX
class
SolidFill
:
public
WrapperWritingElement
class
SolidFill
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
SolidFill
)
WritingElement_AdditionConstructors
(
SolidFill
)
PPTX_LOGIC_BASE2
(
SolidFill
)
SolidFill
&
operator
=
(
const
SolidFill
&
oSrc
)
SolidFill
&
operator
=
(
const
SolidFill
&
oSrc
)
{
{
...
@@ -56,8 +57,27 @@ namespace PPTX
...
@@ -56,8 +57,27 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
if
(
oReader
.
IsEmptyNode
()
)
return
;
m_namespace
=
XmlUtils
::
GetNamespace
(
oReader
.
GetName
());
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
sName
=
oReader
.
GetName
();
Color
.
fromXML
(
oReader
);
}
FillParentPointersForChilds
();
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_solidFill
;
}
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
m_namespace
=
XmlUtils
::
GetNamespace
(
node
.
GetName
());
m_namespace
=
XmlUtils
::
GetNamespace
(
node
.
GetName
());
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/Stretch.h
View file @
62d48608
...
@@ -44,7 +44,8 @@ namespace PPTX
...
@@ -44,7 +44,8 @@ namespace PPTX
class
Stretch
:
public
WrapperWritingElement
class
Stretch
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
Stretch
)
WritingElement_AdditionConstructors
(
Stretch
)
PPTX_LOGIC_BASE2
(
Stretch
)
Stretch
&
operator
=
(
const
Stretch
&
oSrc
)
Stretch
&
operator
=
(
const
Stretch
&
oSrc
)
{
{
...
@@ -54,8 +55,19 @@ namespace PPTX
...
@@ -54,8 +55,19 @@ namespace PPTX
fillRect
=
oSrc
.
fillRect
;
fillRect
=
oSrc
.
fillRect
;
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
public:
{
return
OOX
::
et_a_stretch
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
if
(
_T
(
"fillRect"
)
==
XmlUtils
::
GetNameNoNS
(
oReader
.
GetName
()))
fillRect
=
oReader
;
}
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
XmlUtils
::
CXmlNodes
oNodes
;
XmlUtils
::
CXmlNodes
oNodes
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/Tile.h
View file @
62d48608
...
@@ -45,7 +45,8 @@ namespace PPTX
...
@@ -45,7 +45,8 @@ namespace PPTX
class
Tile
:
public
WrapperWritingElement
class
Tile
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
Tile
)
WritingElement_AdditionConstructors
(
Tile
)
PPTX_LOGIC_BASE2
(
Tile
)
Tile
&
operator
=
(
const
Tile
&
oSrc
)
Tile
&
operator
=
(
const
Tile
&
oSrc
)
{
{
...
@@ -62,7 +63,25 @@ namespace PPTX
...
@@ -62,7 +63,25 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_tile
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"algn"
),
algn
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"flip"
),
flip
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"sx"
),
sx
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"sy"
),
sy
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"tx"
),
tx
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"ty"
),
ty
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
node
.
ReadAttributeBase
(
L"algn"
,
algn
);
node
.
ReadAttributeBase
(
L"algn"
,
algn
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Gs.h
View file @
62d48608
...
@@ -43,7 +43,8 @@ namespace PPTX
...
@@ -43,7 +43,8 @@ namespace PPTX
class
Gs
:
public
WrapperWritingElement
class
Gs
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
Gs
)
WritingElement_AdditionConstructors
(
Gs
)
PPTX_LOGIC_BASE2
(
Gs
)
Gs
&
operator
=
(
const
Gs
&
oSrc
)
Gs
&
operator
=
(
const
Gs
&
oSrc
)
{
{
...
@@ -55,8 +56,33 @@ namespace PPTX
...
@@ -55,8 +56,33 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_gs
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
public:
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
color
.
fromXML
(
oReader
);
}
FillParentPointersForChilds
();
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
nullable_int
tmp
;
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_ReadSingle
(
oReader
,
_T
(
"pos"
),
tmp
)
WritingElement_ReadAttributes_End
(
oReader
)
pos
=
tmp
.
get_value_or
(
0
);
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
pos
=
node
.
ReadAttributeInt
(
L"pos"
);
pos
=
node
.
ReadAttributeInt
(
L"pos"
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Hyperlink.h
View file @
62d48608
...
@@ -45,9 +45,45 @@ namespace PPTX
...
@@ -45,9 +45,45 @@ namespace PPTX
class
Hyperlink
:
public
WrapperWritingElement
class
Hyperlink
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
Hyperlink
)
WritingElement_AdditionConstructors
(
Hyperlink
)
PPTX_LOGIC_BASE2
(
Hyperlink
)
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_hyperlink
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
sName
=
XmlUtils
::
GetNameNoNS
(
oReader
.
GetName
());
if
(
sName
==
L"snd"
)
{
snd
=
oReader
;
break
;
}
}
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"r:id"
),
id
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"invalidUrl"
),
invalidUrl
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"action"
),
action
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"tgtFrame"
),
tgtFrame
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"tooltip"
),
tooltip
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"history"
),
history
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"highlightClick"
),
highlightClick
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"endSnd"
),
endSnd
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
m_name
=
XmlUtils
::
GetNameNoNS
(
node
.
GetName
());
m_name
=
XmlUtils
::
GetNameNoNS
(
node
.
GetName
());
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/LightRig.h
View file @
62d48608
...
@@ -46,16 +46,46 @@ namespace PPTX
...
@@ -46,16 +46,46 @@ namespace PPTX
class
LightRig
:
public
WrapperWritingElement
class
LightRig
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
LightRig
)
WritingElement_AdditionConstructors
(
LightRig
)
PPTX_LOGIC_BASE2
(
LightRig
)
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_lightRig
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
if
(
strName
==
L"a:rot"
)
{
rot
=
oReader
;
break
;
}
}
FillParentPointersForChilds
();
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"dir"
),
dir
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"rig"
),
rig
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
dir
=
node
.
GetAttribute
(
_T
(
"dir"
));
dir
=
node
.
GetAttribute
(
_T
(
"dir"
));
rig
=
node
.
GetAttribute
(
_T
(
"rig"
));
rig
=
node
.
GetAttribute
(
_T
(
"rig"
));
std
::
wstring
sRotNodeName
=
_T
(
"a:rot"
);
rot
=
node
.
ReadNode
(
L"a:rot"
);
rot
=
node
.
ReadNode
(
sRotNodeName
);
FillParentPointersForChilds
();
FillParentPointersForChilds
();
}
}
virtual
std
::
wstring
toXML
()
const
virtual
std
::
wstring
toXML
()
const
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Lin.h
View file @
62d48608
...
@@ -43,9 +43,26 @@ namespace PPTX
...
@@ -43,9 +43,26 @@ namespace PPTX
class
Lin
:
public
WrapperWritingElement
class
Lin
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
Lin
)
WritingElement_AdditionConstructors
(
Lin
)
PPTX_LOGIC_BASE2
(
Lin
)
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_lin
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"ang"
),
ang
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"scaled"
),
scaled
)
WritingElement_ReadAttributes_End
(
oReader
)
Normalize
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
node
.
ReadAttributeBase
(
L"ang"
,
ang
);
node
.
ReadAttributeBase
(
L"ang"
,
ang
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/LineEnd.h
View file @
62d48608
...
@@ -44,9 +44,26 @@ namespace PPTX
...
@@ -44,9 +44,26 @@ namespace PPTX
class
LineEnd
:
public
WrapperWritingElement
class
LineEnd
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
LineEnd
)
WritingElement_AdditionConstructors
(
LineEnd
)
PPTX_LOGIC_BASE2
(
LineEnd
)
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_buSzPts
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
// Читаем атрибуты
WritingElement_ReadAttributes_Start_No_NS
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"w"
),
w
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"type"
),
type
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"len"
),
len
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
m_name
=
node
.
GetName
();
m_name
=
node
.
GetName
();
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/LineJoin.h
View file @
62d48608
...
@@ -44,11 +44,47 @@ namespace PPTX
...
@@ -44,11 +44,47 @@ namespace PPTX
class
LineJoin
:
public
WrapperWritingElement
class
LineJoin
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
LineJoin
)
WritingElement_AdditionConstructors
(
LineJoin
)
PPTX_LOGIC_BASE2
(
LineJoin
)
virtual
bool
is_init
()
const
{
return
(
type
==
JoinEmpty
);};
virtual
bool
is_init
()
const
{
return
(
type
==
JoinEmpty
);};
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
std
::
wstring
name
=
oReader
.
GetName
();
type
=
JoinEmpty
;
if
(
name
==
_T
(
"round"
))
type
=
JoinRound
;
else
if
(
name
==
_T
(
"bevel"
))
type
=
JoinBevel
;
else
if
(
name
==
_T
(
"miter"
))
{
type
=
JoinMiter
;
ReadAttributes
(
oReader
);
}
Normalize
();
}
virtual
OOX
::
EElementType
getType
()
const
{
if
(
type
==
JoinRound
)
return
OOX
::
et_a_round
;
else
if
(
type
==
JoinBevel
)
return
OOX
::
et_a_bevel
;
else
if
(
type
==
JoinMiter
)
return
OOX
::
et_a_miter
;
else
return
OOX
::
et_Unknown
;
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"lim"
),
lim
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
GetJoinFrom
(
XmlUtils
::
CXmlNode
&
element
)
virtual
void
GetJoinFrom
(
XmlUtils
::
CXmlNode
&
element
)
{
{
type
=
JoinEmpty
;
type
=
JoinEmpty
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Ln.h
View file @
62d48608
...
@@ -49,9 +49,57 @@ namespace PPTX
...
@@ -49,9 +49,57 @@ namespace PPTX
class
Ln
:
public
WrapperWritingElement
class
Ln
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
Ln
)
WritingElement_AdditionConstructors
(
Ln
)
PPTX_LOGIC_BASE2
(
Ln
)
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
//m_eDashType = OOX::Drawing::linedashtypeUnknown;
std
::
wstring
sName
=
oReader
.
GetName
();
ReadAttributes
(
oReader
);
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
sName
=
oReader
.
GetName
();
if
(
_T
(
"a:bevel"
)
==
sName
||
_T
(
"a:miter"
)
==
sName
||
_T
(
"a:round"
)
==
sName
)
{
Join
.
fromXML
(
oReader
);
}
else
if
(
_T
(
"a:tailEnd"
)
==
sName
)
tailEnd
=
oReader
;
else
if
(
_T
(
"a:headEnd"
)
==
sName
)
headEnd
=
oReader
;
else
if
(
_T
(
"a:gradFill"
)
==
sName
||
_T
(
"a:noFill"
)
==
sName
||
_T
(
"a:pattFill"
)
==
sName
||
_T
(
"a:solidFill"
)
==
sName
)
{
Fill
.
fromXML
(
oReader
);
}
else
if
(
_T
(
"a:custDash"
)
==
sName
)
{
//custDash = oReader;
//m_eDashType = OOX::Drawing::linedashtypeCustom;
}
else
if
(
_T
(
"a:prstDash"
)
==
sName
)
{
prstDash
=
oReader
;
//m_eDashType = OOX::Drawing::linedashtypePreset;
}
//else if ( _T("a:extLst") == sName )
// extLst = oReader;
}
FillParentPointersForChilds
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
m_name
=
_T
(
"a:ln"
);
m_name
=
_T
(
"a:ln"
);
...
@@ -67,10 +115,20 @@ namespace PPTX
...
@@ -67,10 +115,20 @@ namespace PPTX
headEnd
=
node
.
ReadNodeNoNS
(
_T
(
"headEnd"
));
headEnd
=
node
.
ReadNodeNoNS
(
_T
(
"headEnd"
));
tailEnd
=
node
.
ReadNodeNoNS
(
_T
(
"tailEnd"
));
tailEnd
=
node
.
ReadNodeNoNS
(
_T
(
"tailEnd"
));
Normalize
();
FillParentPointersForChilds
();
FillParentPointersForChilds
();
}
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
// Читаем атрибуты
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"algn"
),
algn
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"cap"
),
cap
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"cmpd"
),
cmpd
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"w"
),
w
)
WritingElement_ReadAttributes_End
(
oReader
)
Normalize
();
}
virtual
std
::
wstring
toXML
()
const
virtual
std
::
wstring
toXML
()
const
{
{
XmlUtils
::
CAttribute
oAttr
;
XmlUtils
::
CAttribute
oAttr
;
...
@@ -272,6 +330,8 @@ namespace PPTX
...
@@ -272,6 +330,8 @@ namespace PPTX
}
}
public:
public:
// OOX::Drawing::ELineDashType m_eDashType; // Тип штриха
UniFill
Fill
;
UniFill
Fill
;
nullable
<
PrstDash
>
prstDash
;
nullable
<
PrstDash
>
prstDash
;
//custDash (Custom Dash) ยง20.1.8.21
//custDash (Custom Dash) ยง20.1.8.21
...
@@ -279,6 +339,8 @@ namespace PPTX
...
@@ -279,6 +339,8 @@ namespace PPTX
nullable
<
LineEnd
>
headEnd
;
nullable
<
LineEnd
>
headEnd
;
nullable
<
LineEnd
>
tailEnd
;
nullable
<
LineEnd
>
tailEnd
;
// nullable<ExtLst> extLst;
nullable_limit
<
Limit
::
PenAlign
>
algn
;
nullable_limit
<
Limit
::
PenAlign
>
algn
;
nullable_limit
<
Limit
::
LineCap
>
cap
;
nullable_limit
<
Limit
::
LineCap
>
cap
;
nullable_limit
<
Limit
::
CompoundLine
>
cmpd
;
nullable_limit
<
Limit
::
CompoundLine
>
cmpd
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Media/WavAudioFile.h
View file @
62d48608
...
@@ -43,7 +43,8 @@ namespace PPTX
...
@@ -43,7 +43,8 @@ namespace PPTX
class
WavAudioFile
:
public
WrapperWritingElement
class
WavAudioFile
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
WavAudioFile
)
WritingElement_AdditionConstructors
(
WavAudioFile
)
PPTX_LOGIC_BASE2
(
WavAudioFile
)
WavAudioFile
&
operator
=
(
const
WavAudioFile
&
oSrc
)
WavAudioFile
&
operator
=
(
const
WavAudioFile
&
oSrc
)
{
{
...
@@ -55,7 +56,22 @@ namespace PPTX
...
@@ -55,7 +56,22 @@ namespace PPTX
m_name
=
oSrc
.
m_name
;
m_name
=
oSrc
.
m_name
;
return
*
this
;
return
*
this
;
}
}
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_snd
;
//todooo расширить ...
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
m_name
=
XmlUtils
::
GetNameNoNS
(
oReader
.
GetName
());
ReadAttributes
(
oReader
);
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"r:embed"
),
embed
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"name"
),
name
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
m_name
=
XmlUtils
::
GetNameNoNS
(
node
.
GetName
());
m_name
=
XmlUtils
::
GetNameNoNS
(
node
.
GetName
());
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Paragraph.h
View file @
62d48608
...
@@ -45,7 +45,8 @@ namespace PPTX
...
@@ -45,7 +45,8 @@ namespace PPTX
class
Paragraph
:
public
WrapperWritingElement
class
Paragraph
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
Paragraph
)
WritingElement_AdditionConstructors
(
Paragraph
)
PPTX_LOGIC_BASE2
(
Paragraph
)
Paragraph
&
operator
=
(
const
Paragraph
&
oSrc
)
Paragraph
&
operator
=
(
const
Paragraph
&
oSrc
)
{
{
...
@@ -56,7 +57,9 @@ namespace PPTX
...
@@ -56,7 +57,9 @@ namespace PPTX
endParaRPr
=
oSrc
.
endParaRPr
;
endParaRPr
=
oSrc
.
endParaRPr
;
for
(
size_t
i
=
0
;
i
<
oSrc
.
RunElems
.
size
();
i
++
)
for
(
size_t
i
=
0
;
i
<
oSrc
.
RunElems
.
size
();
i
++
)
{
RunElems
.
push_back
(
oSrc
.
RunElems
[
i
]);
RunElems
.
push_back
(
oSrc
.
RunElems
[
i
]);
}
return
*
this
;
return
*
this
;
}
}
...
@@ -109,7 +112,64 @@ namespace PPTX
...
@@ -109,7 +112,64 @@ namespace PPTX
FillParentPointersForChilds
();
FillParentPointersForChilds
();
}
}
virtual
void
fromXML2
(
XmlUtils
::
CXmlLiteReader
&
oReader
,
bool
bClear
)
{
if
(
bClear
)
{
RunElems
.
clear
();
}
ReadAttributes
(
oReader
);
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nParentDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nParentDepth
)
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
WritingElement
*
pItem
=
NULL
;
if
(
_T
(
"pPr"
)
==
strName
)
pPr
=
oReader
;
else
if
(
_T
(
"endParaRPr"
)
==
strName
)
endParaRPr
=
oReader
;
else
if
((
_T
(
"r"
)
==
strName
)
||
(
_T
(
"fld"
)
==
strName
)
||
(
_T
(
"br"
)
==
strName
)
||
(
_T
(
"m"
)
==
strName
))
RunElems
.
push_back
(
RunElem
(
oReader
));
else
if
(
_T
(
"AlternateContent"
)
==
strName
)
{
int
nParentDepth1
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nParentDepth1
)
)
{
std
::
wstring
strName1
=
oReader
.
GetName
();
if
(
_T
(
"mc:Choice"
)
==
strName1
)
{
//GetAttributeIfExist(L"Requires", sRequires) && L"a14" == sRequires)
fromXML2
(
oReader
,
false
);
break
;
}
else
if
(
_T
(
"mc:Fallback"
)
==
strName1
)
{
fromXML2
(
oReader
,
false
);
}
}
}
}
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_End
(
oReader
)
}
public:
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
fromXML2
(
oReader
,
true
);
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_p
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
fromXML2
(
node
,
true
);
fromXML2
(
node
,
true
);
...
@@ -338,9 +398,10 @@ namespace PPTX
...
@@ -338,9 +398,10 @@ namespace PPTX
{
{
std
::
wstring
result
=
_T
(
""
);
std
::
wstring
result
=
_T
(
""
);
size_t
count
=
RunElems
.
size
();
for
(
size_t
i
=
0
;
i
<
RunElems
.
size
();
++
i
)
for
(
size_t
i
=
0
;
i
<
count
;
++
i
)
{
result
+=
RunElems
[
i
].
GetText
();
result
+=
RunElems
[
i
].
GetText
();
}
result
=
result
+
_T
(
"
\n
"
);
result
=
result
+
_T
(
"
\n
"
);
return
result
;
return
result
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Path.h
View file @
62d48608
...
@@ -45,9 +45,36 @@ namespace PPTX
...
@@ -45,9 +45,36 @@ namespace PPTX
class
Path
:
public
WrapperWritingElement
class
Path
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
Path
)
WritingElement_AdditionConstructors
(
Path
)
PPTX_LOGIC_BASE2
(
Path
)
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_path
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
XmlUtils
::
GetNameNoNS
(
oReader
.
GetName
());
if
(
_T
(
"fillToRect"
)
==
strName
)
rect
=
oReader
;
}
FillParentPointersForChilds
();
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_ReadSingle
(
oReader
,
_T
(
"path"
),
path
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
node
.
ReadAttributeBase
(
L"path"
,
path
);
node
.
ReadAttributeBase
(
L"path"
,
path
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/PrstDash.h
View file @
62d48608
...
@@ -44,9 +44,23 @@ namespace PPTX
...
@@ -44,9 +44,23 @@ namespace PPTX
class
PrstDash
:
public
WrapperWritingElement
class
PrstDash
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
PrstDash
)
WritingElement_AdditionConstructors
(
PrstDash
)
PPTX_LOGIC_BASE2
(
PrstDash
)
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_prstDash
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"val"
),
val
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
node
.
ReadAttributeBase
(
L"val"
,
val
);
node
.
ReadAttributeBase
(
L"val"
,
val
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Rect.h
View file @
62d48608
...
@@ -43,9 +43,26 @@ namespace PPTX
...
@@ -43,9 +43,26 @@ namespace PPTX
class
Rect
:
public
WrapperWritingElement
class
Rect
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
Rect
)
WritingElement_AdditionConstructors
(
Rect
)
PPTX_LOGIC_BASE2
(
Rect
)
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_rect
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"t"
),
t
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"l"
),
l
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"r"
),
r
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"b"
),
b
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
m_name
=
node
.
GetName
();
m_name
=
node
.
GetName
();
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Rot.h
View file @
62d48608
...
@@ -43,9 +43,32 @@ namespace PPTX
...
@@ -43,9 +43,32 @@ namespace PPTX
class
Rot
:
public
WrapperWritingElement
class
Rot
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
Rot
)
WritingElement_AdditionConstructors
(
Rot
)
PPTX_LOGIC_BASE2
(
Rot
)
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_rot
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
nullable_int
lat_
,
lon_
,
rev_
;
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"lat"
),
lat_
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"lon"
),
lon_
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"rev"
),
rev_
)
WritingElement_ReadAttributes_End
(
oReader
)
lat
=
lat_
.
get_value_or
(
0
);
lon
=
lon_
.
get_value_or
(
0
);
rev
=
rev_
.
get_value_or
(
0
);
Normalize
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
lat
=
node
.
ReadAttributeInt
(
L"lat"
);
lat
=
node
.
ReadAttributeInt
(
L"lat"
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/RunElem.h
View file @
62d48608
...
@@ -47,9 +47,32 @@ namespace PPTX
...
@@ -47,9 +47,32 @@ namespace PPTX
class
RunElem
:
public
WrapperWritingElement
class
RunElem
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
RunElem
)
WritingElement_AdditionConstructors
(
RunElem
)
RunElem
()
{}
virtual
OOX
::
EElementType
getType
()
const
{
if
(
Elem
.
IsInit
())
return
Elem
->
getType
();
return
OOX
::
et_Unknown
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
std
::
wstring
name
=
oReader
.
GetName
();
if
(
name
==
_T
(
"r"
))
Elem
.
reset
(
new
Logic
::
Run
(
oReader
));
else
if
(
name
==
_T
(
"fld"
))
Elem
.
reset
(
new
Logic
::
Fld
(
oReader
));
else
if
(
name
==
_T
(
"br"
))
Elem
.
reset
(
new
Logic
::
Br
(
oReader
));
else
if
(
name
==
_T
(
"m"
))
Elem
.
reset
(
new
Logic
::
MathParaWrapper
(
oReader
));
else
Elem
.
reset
();
}
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
std
::
wstring
name
=
XmlUtils
::
GetNameNoNS
(
node
.
GetName
());
std
::
wstring
name
=
XmlUtils
::
GetNameNoNS
(
node
.
GetName
());
...
@@ -62,7 +85,8 @@ namespace PPTX
...
@@ -62,7 +85,8 @@ namespace PPTX
Elem
.
reset
(
new
Logic
::
Br
(
node
));
Elem
.
reset
(
new
Logic
::
Br
(
node
));
else
if
(
name
==
_T
(
"m"
))
else
if
(
name
==
_T
(
"m"
))
Elem
.
reset
(
new
Logic
::
MathParaWrapper
(
node
));
Elem
.
reset
(
new
Logic
::
MathParaWrapper
(
node
));
else
Elem
.
reset
();
else
Elem
.
reset
();
}
}
virtual
std
::
wstring
toXML
()
const
virtual
std
::
wstring
toXML
()
const
{
{
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/RunProperties.h
View file @
62d48608
...
@@ -47,12 +47,107 @@ namespace PPTX
...
@@ -47,12 +47,107 @@ namespace PPTX
{
{
namespace
Logic
namespace
Logic
{
{
class
R
unProperties
:
public
WrapperWritingElement
class
R
tl
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
RunProperties
)
WritingElement_AdditionConstructors
(
Rtl
)
PPTX_LOGIC_BASE2
(
Rtl
)
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_rtl
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
}
virtual
std
::
wstring
toXML
()
const
{
XmlUtils
::
CAttribute
oAttr
;
return
XmlUtils
::
CreateNode
(
L"a:rtl"
,
oAttr
);
}
virtual
void
toPPTY
(
NSBinPptxRW
::
CBinaryFileWriter
*
pWriter
)
const
{
pWriter
->
WriteBYTE
(
NSBinPptxRW
::
g_nodeAttributeStart
);
pWriter
->
WriteBYTE
(
NSBinPptxRW
::
g_nodeAttributeEnd
);
}
virtual
void
fromPPTY
(
NSBinPptxRW
::
CBinaryFileReader
*
pReader
)
{
LONG
_end_rec
=
pReader
->
GetPos
()
+
pReader
->
GetLong
()
+
4
;
pReader
->
Skip
(
1
);
// start attributes
pReader
->
Seek
(
_end_rec
);
}
virtual
void
toXmlWriter
(
NSBinPptxRW
::
CXmlWriter
*
pWriter
)
const
{
pWriter
->
WriteString
(
L"<a:rtl/>"
);
}
protected:
virtual
void
FillParentPointersForChilds
(){};
};
class
RunProperties
:
public
WrapperWritingElement
{
public:
public:
WritingElement_AdditionConstructors
(
RunProperties
)
PPTX_LOGIC_BASE2
(
RunProperties
)
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_rPr
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nParentDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nParentDepth
)
)
{
std
::
wstring
sName
=
oReader
.
GetName
();
if
(
L"a:blipFill"
==
sName
||
L"a:gradFill"
==
sName
||
L"a:grpFill"
==
sName
||
L"a:noFill"
==
sName
||
L"a:pattFill"
==
sName
||
L"a:solidFill"
==
sName
)
{
Fill
.
fromXML
(
oReader
);
}
else
if
(
_T
(
"a:ln"
)
==
sName
)
ln
=
oReader
;
else
if
(
_T
(
"a:cs"
)
==
sName
)
cs
=
oReader
;
else
if
(
_T
(
"a:ea"
)
==
sName
)
ea
=
oReader
;
else
if
(
_T
(
"a:latin"
)
==
sName
)
latin
=
oReader
;
else
if
(
_T
(
"a:sym"
)
==
sName
)
sym
=
oReader
;
else
if
(
_T
(
"a:hlinkClick"
)
==
sName
)
hlinkClick
=
oReader
;
else
if
(
_T
(
"a:rtl"
)
==
sName
)
rtl
=
oReader
;
else
if
(
L"a:effectDag"
==
sName
||
L"a:effectLst"
==
sName
||
L"a:extLst"
==
sName
)
{
EffectList
.
fromXML
(
oReader
);
}
}
FillParentPointersForChilds
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
m_name
=
node
.
GetName
();
m_name
=
node
.
GetName
();
...
@@ -102,6 +197,8 @@ namespace PPTX
...
@@ -102,6 +197,8 @@ namespace PPTX
hlinkClick
=
oNode
;
hlinkClick
=
oNode
;
else
if
(
_T
(
"hlinkMouseOver"
)
==
strName
)
else
if
(
_T
(
"hlinkMouseOver"
)
==
strName
)
hlinkMouseOver
=
oNode
;
hlinkMouseOver
=
oNode
;
else
if
(
_T
(
"rtl"
)
==
strName
)
rtl
=
oNode
;
}
}
}
}
...
@@ -112,6 +209,25 @@ namespace PPTX
...
@@ -112,6 +209,25 @@ namespace PPTX
FillParentPointersForChilds
();
FillParentPointersForChilds
();
}
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"b"
),
b
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"i"
),
i
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"sz"
),
sz
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"u"
),
u
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"baseline"
),
baseline
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"spc"
),
spc
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"lang"
),
lang
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"kumimoji"
),
kumimoji
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"dirty"
),
dirty
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"normalizeH"
),
normalizeH
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"noProof"
),
noProof
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"smtClean"
),
smtClean
)
WritingElement_ReadAttributes_End
(
oReader
)
Normalize
();
}
virtual
std
::
wstring
toXML
()
const
virtual
std
::
wstring
toXML
()
const
{
{
XmlUtils
::
CAttribute
oAttr
;
XmlUtils
::
CAttribute
oAttr
;
...
@@ -145,6 +261,7 @@ namespace PPTX
...
@@ -145,6 +261,7 @@ namespace PPTX
oValue
.
WriteNullable
(
sym
);
oValue
.
WriteNullable
(
sym
);
oValue
.
WriteNullable
(
hlinkClick
);
oValue
.
WriteNullable
(
hlinkClick
);
oValue
.
WriteNullable
(
hlinkMouseOver
);
oValue
.
WriteNullable
(
hlinkMouseOver
);
oValue
.
WriteNullable
(
rtl
);
return
XmlUtils
::
CreateNode
(
m_name
,
oAttr
,
oValue
);
return
XmlUtils
::
CreateNode
(
m_name
,
oAttr
,
oValue
);
}
}
...
@@ -186,6 +303,7 @@ namespace PPTX
...
@@ -186,6 +303,7 @@ namespace PPTX
pWriter
->
Write
(
sym
);
pWriter
->
Write
(
sym
);
pWriter
->
Write
(
hlinkClick
);
pWriter
->
Write
(
hlinkClick
);
pWriter
->
Write
(
hlinkMouseOver
);
pWriter
->
Write
(
hlinkMouseOver
);
pWriter
->
Write
(
rtl
);
pWriter
->
EndNode
(
m_name
);
pWriter
->
EndNode
(
m_name
);
}
}
...
@@ -275,6 +393,7 @@ namespace PPTX
...
@@ -275,6 +393,7 @@ namespace PPTX
pWriter
->
WriteRecord2
(
7
,
hlinkClick
);
pWriter
->
WriteRecord2
(
7
,
hlinkClick
);
pWriter
->
WriteRecord2
(
8
,
hlinkMouseOver
);
pWriter
->
WriteRecord2
(
8
,
hlinkMouseOver
);
pWriter
->
WriteRecord2
(
9
,
rtl
);
}
}
virtual
void
fromPPTY
(
NSBinPptxRW
::
CBinaryFileReader
*
pReader
)
virtual
void
fromPPTY
(
NSBinPptxRW
::
CBinaryFileReader
*
pReader
)
...
@@ -482,7 +601,7 @@ namespace PPTX
...
@@ -482,7 +601,7 @@ namespace PPTX
nullable
<
TextFont
>
sym
;
nullable
<
TextFont
>
sym
;
nullable
<
Hyperlink
>
hlinkClick
;
nullable
<
Hyperlink
>
hlinkClick
;
nullable
<
Hyperlink
>
hlinkMouseOver
;
nullable
<
Hyperlink
>
hlinkMouseOver
;
//rtl (Right to Left Run) §21.1.2.2.8
nullable
<
Rtl
>
rtl
;
// Attributes
// Attributes
nullable_string
altLang
;
nullable_string
altLang
;
...
@@ -504,8 +623,6 @@ namespace PPTX
...
@@ -504,8 +623,6 @@ namespace PPTX
nullable_limit
<
Limit
::
TextStrike
>
strike
;
nullable_limit
<
Limit
::
TextStrike
>
strike
;
nullable_int
sz
;
nullable_int
sz
;
nullable_limit
<
Limit
::
TextUnderline
>
u
;
nullable_limit
<
Limit
::
TextUnderline
>
u
;
//private:
public:
std
::
wstring
m_name
;
std
::
wstring
m_name
;
protected:
protected:
virtual
void
FillParentPointersForChilds
()
virtual
void
FillParentPointersForChilds
()
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Runs/Br.h
View file @
62d48608
...
@@ -43,7 +43,8 @@ namespace PPTX
...
@@ -43,7 +43,8 @@ namespace PPTX
class
Br
:
public
RunBase
class
Br
:
public
RunBase
{
{
public:
public:
PPTX_LOGIC_BASE
(
Br
)
WritingElement_AdditionConstructors
(
Br
)
PPTX_LOGIC_BASE2
(
Br
)
Br
&
operator
=
(
const
Br
&
oSrc
)
Br
&
operator
=
(
const
Br
&
oSrc
)
{
{
...
@@ -55,15 +56,27 @@ namespace PPTX
...
@@ -55,15 +56,27 @@ namespace PPTX
}
}
virtual
OOX
::
EElementType
getType
()
const
virtual
OOX
::
EElementType
getType
()
const
{
{
return
OOX
::
et_
p
_br
;
return
OOX
::
et_
a
_br
;
}
}
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
rPr
=
node
.
ReadNode
(
_T
(
"a:rPr"
));
rPr
=
node
.
ReadNode
(
_T
(
"a:rPr"
));
FillParentPointersForChilds
();
FillParentPointersForChilds
();
}
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nParentDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nParentDepth
)
)
{
std
::
wstring
sName
=
oReader
.
GetName
();
if
(
_T
(
"a:rPr"
)
==
sName
)
rPr
=
oReader
;
}
}
virtual
std
::
wstring
toXML
()
const
virtual
std
::
wstring
toXML
()
const
{
{
XmlUtils
::
CNodeValue
oValue
;
XmlUtils
::
CNodeValue
oValue
;
...
@@ -92,7 +105,7 @@ namespace PPTX
...
@@ -92,7 +105,7 @@ namespace PPTX
}
}
virtual
std
::
wstring
GetText
()
const
{
return
_T
(
"
\n
"
);};
virtual
std
::
wstring
GetText
()
const
{
return
_T
(
"
\n
"
);};
public:
nullable
<
RunProperties
>
rPr
;
nullable
<
RunProperties
>
rPr
;
protected:
protected:
virtual
void
FillParentPointersForChilds
()
virtual
void
FillParentPointersForChilds
()
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Runs/Fld.h
View file @
62d48608
...
@@ -44,7 +44,8 @@ namespace PPTX
...
@@ -44,7 +44,8 @@ namespace PPTX
class
Fld
:
public
RunBase
class
Fld
:
public
RunBase
{
{
public:
public:
PPTX_LOGIC_BASE
(
Fld
)
WritingElement_AdditionConstructors
(
Fld
)
PPTX_LOGIC_BASE2
(
Fld
)
Fld
&
operator
=
(
const
Fld
&
oSrc
)
Fld
&
operator
=
(
const
Fld
&
oSrc
)
{
{
...
@@ -61,9 +62,45 @@ namespace PPTX
...
@@ -61,9 +62,45 @@ namespace PPTX
}
}
virtual
OOX
::
EElementType
getType
()
const
virtual
OOX
::
EElementType
getType
()
const
{
{
return
OOX
::
et_
p
_fld
;
return
OOX
::
et_
a
_fld
;
}
}
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
XmlUtils
::
GetNameNoNS
(
oReader
.
GetName
());
if
(
_T
(
"rPr"
)
==
strName
)
{
if
(
!
rPr
.
IsInit
())
rPr
=
oReader
;
}
else
if
(
_T
(
"pPr"
)
==
strName
)
{
if
(
!
pPr
.
IsInit
())
pPr
=
oReader
;
}
else
if
(
_T
(
"t"
)
==
strName
)
{
if
(
!
text
.
IsInit
())
text
=
oReader
.
GetText2
();
}
}
FillParentPointersForChilds
();
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"id"
),
id
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"type"
),
type
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
id
=
node
.
GetAttribute
(
_T
(
"id"
));
id
=
node
.
GetAttribute
(
_T
(
"id"
));
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Runs/MathParaWrapper.cpp
View file @
62d48608
...
@@ -48,6 +48,19 @@ namespace PPTX
...
@@ -48,6 +48,19 @@ namespace PPTX
m_oMath
=
oSrc
.
m_oMath
;
m_oMath
=
oSrc
.
m_oMath
;
return
*
this
;
return
*
this
;
}
}
void
MathParaWrapper
::
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
std
::
wstring
name
=
oReader
.
GetName
();
if
(
L"oMathPara"
==
name
)
{
m_oMathPara
=
oReader
;
}
else
if
(
L"oMath"
==
name
)
{
m_oMath
=
oReader
;
}
}
void
MathParaWrapper
::
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
void
MathParaWrapper
::
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
std
::
wstring
sBegin
(
_T
(
"<root xmlns:wpc=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas
\"
xmlns:mc=
\"
http://schemas.openxmlformats.org/markup-compatibility/2006
\"
xmlns:p=
\"
urn:schemas-microsoft-com:office:powerpoint
\"
xmlns:v=
\"
urn:schemas-microsoft-com:vml
\"
xmlns:x=
\"
urn:schemas-microsoft-com:office:excel
\"
xmlns:o=
\"
urn:schemas-microsoft-com:office:office
\"
xmlns:w10=
\"
urn:schemas-microsoft-com:office:word
\"
xmlns:r=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships
\"
xmlns:m=
\"
http://schemas.openxmlformats.org/officeDocument/2006/math
\"
xmlns:ve=
\"
http://schemas.openxmlformats.org/markup-compatibility/2006
\"
xmlns:w=
\"
http://schemas.openxmlformats.org/wordprocessingml/2006/main
\"
xmlns:wp=
\"
http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing
\"
xmlns:wp14=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing
\"
xmlns:w14=
\"
http://schemas.microsoft.com/office/word/2010/wordml
\"
xmlns:w15=
\"
http://schemas.microsoft.com/office/word/2012/wordml
\"
xmlns:wpg=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingGroup
\"
xmlns:wpi=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingInk
\"
xmlns:wne=
\"
http://schemas.microsoft.com/office/word/2006/wordml
\"
xmlns:wps=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingShape
\"
xmlns:a=
\"
http://schemas.openxmlformats.org/drawingml/2006/main
\"
xmlns:a14=
\"
http://schemas.microsoft.com/office/drawing/2010/main
\"
xmlns:pic=
\"
http://schemas.openxmlformats.org/drawingml/2006/picture
\"
xmlns:xdr=
\"
http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing
\"
>"
));
std
::
wstring
sBegin
(
_T
(
"<root xmlns:wpc=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas
\"
xmlns:mc=
\"
http://schemas.openxmlformats.org/markup-compatibility/2006
\"
xmlns:p=
\"
urn:schemas-microsoft-com:office:powerpoint
\"
xmlns:v=
\"
urn:schemas-microsoft-com:vml
\"
xmlns:x=
\"
urn:schemas-microsoft-com:office:excel
\"
xmlns:o=
\"
urn:schemas-microsoft-com:office:office
\"
xmlns:w10=
\"
urn:schemas-microsoft-com:office:word
\"
xmlns:r=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships
\"
xmlns:m=
\"
http://schemas.openxmlformats.org/officeDocument/2006/math
\"
xmlns:ve=
\"
http://schemas.openxmlformats.org/markup-compatibility/2006
\"
xmlns:w=
\"
http://schemas.openxmlformats.org/wordprocessingml/2006/main
\"
xmlns:wp=
\"
http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing
\"
xmlns:wp14=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing
\"
xmlns:w14=
\"
http://schemas.microsoft.com/office/word/2010/wordml
\"
xmlns:w15=
\"
http://schemas.microsoft.com/office/word/2012/wordml
\"
xmlns:wpg=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingGroup
\"
xmlns:wpi=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingInk
\"
xmlns:wne=
\"
http://schemas.microsoft.com/office/word/2006/wordml
\"
xmlns:wps=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingShape
\"
xmlns:a=
\"
http://schemas.openxmlformats.org/drawingml/2006/main
\"
xmlns:a14=
\"
http://schemas.microsoft.com/office/drawing/2010/main
\"
xmlns:pic=
\"
http://schemas.openxmlformats.org/drawingml/2006/picture
\"
xmlns:xdr=
\"
http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing
\"
>"
));
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Runs/MathParaWrapper.h
View file @
62d48608
...
@@ -50,8 +50,9 @@ namespace PPTX
...
@@ -50,8 +50,9 @@ namespace PPTX
class
MathParaWrapper
:
public
RunBase
class
MathParaWrapper
:
public
RunBase
{
{
public:
public:
PPTX_LOGIC_BASE
(
MathParaWrapper
)
WritingElement_AdditionConstructors
(
MathParaWrapper
)
MathParaWrapper
()
{}
MathParaWrapper
&
operator
=
(
const
MathParaWrapper
&
oSrc
);
MathParaWrapper
&
operator
=
(
const
MathParaWrapper
&
oSrc
);
virtual
OOX
::
EElementType
getType
()
const
virtual
OOX
::
EElementType
getType
()
const
...
@@ -59,6 +60,7 @@ namespace PPTX
...
@@ -59,6 +60,7 @@ namespace PPTX
return
OOX
::
et_p_MathPara
;
return
OOX
::
et_p_MathPara
;
}
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
);
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
);
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
);
virtual
std
::
wstring
toXML
()
const
;
virtual
std
::
wstring
toXML
()
const
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Runs/Run.h
View file @
62d48608
...
@@ -43,7 +43,8 @@ namespace PPTX
...
@@ -43,7 +43,8 @@ namespace PPTX
class
Run
:
public
RunBase
class
Run
:
public
RunBase
{
{
public:
public:
PPTX_LOGIC_BASE
(
Run
)
WritingElement_AdditionConstructors
(
Run
)
PPTX_LOGIC_BASE2
(
Run
)
Run
&
operator
=
(
const
Run
&
oSrc
)
Run
&
operator
=
(
const
Run
&
oSrc
)
{
{
...
@@ -57,9 +58,29 @@ namespace PPTX
...
@@ -57,9 +58,29 @@ namespace PPTX
}
}
virtual
OOX
::
EElementType
getType
()
const
virtual
OOX
::
EElementType
getType
()
const
{
{
return
OOX
::
et_p_r
;
return
OOX
::
et_a_r
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nParentDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nParentDepth
)
)
{
std
::
wstring
sName
=
oReader
.
GetName
();
if
(
L"a:rPr"
==
sName
)
{
rPr
=
oReader
;
}
else
if
(
L"a:t"
==
sName
)
{
if
(
!
text
.
IsInit
())
text
=
oReader
.
GetText2
();
}
}
}
}
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
XmlUtils
::
CXmlNodes
oNodes
;
XmlUtils
::
CXmlNodes
oNodes
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Scene3d.h
View file @
62d48608
...
@@ -46,17 +46,37 @@ namespace PPTX
...
@@ -46,17 +46,37 @@ namespace PPTX
class
Scene3d
:
public
WrapperWritingElement
class
Scene3d
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
Scene3d
)
WritingElement_AdditionConstructors
(
Scene3d
)
PPTX_LOGIC_BASE2
(
Scene3d
)
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_scene3d
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
if
(
strName
==
L"a:camera"
)
camera
=
oReader
;
if
(
strName
==
L"a:lightRig"
)
lightRig
=
oReader
;
if
(
strName
==
L"a:backdrop"
)
backdrop
=
oReader
;
}
FillParentPointersForChilds
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
std
::
wstring
sCameraNodeName
=
_T
(
"a:camera"
);
camera
=
node
.
ReadNode
(
L"a:camera"
);
std
::
wstring
sLightRigNodeName
=
_T
(
"a:lightRig"
);
lightRig
=
node
.
ReadNode
(
L"a:lightRig"
);
std
::
wstring
sBackdropNodeName
=
_T
(
"a:backdrop"
);
backdrop
=
node
.
ReadNode
(
L"a:backdrop"
);
camera
=
node
.
ReadNode
(
sCameraNodeName
);
lightRig
=
node
.
ReadNode
(
sLightRigNodeName
);
backdrop
=
node
.
ReadNode
(
sBackdropNodeName
);
FillParentPointersForChilds
();
FillParentPointersForChilds
();
}
}
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Sp3d.h
View file @
62d48608
...
@@ -46,7 +46,8 @@ namespace PPTX
...
@@ -46,7 +46,8 @@ namespace PPTX
class
Sp3d
:
public
WrapperWritingElement
class
Sp3d
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
Sp3d
)
WritingElement_AdditionConstructors
(
Sp3d
)
PPTX_LOGIC_BASE2
(
Sp3d
)
Sp3d
&
operator
=
(
const
Sp3d
&
oSrc
)
Sp3d
&
operator
=
(
const
Sp3d
&
oSrc
)
{
{
...
@@ -66,7 +67,33 @@ namespace PPTX
...
@@ -66,7 +67,33 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_prstClr
;
}
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
XmlUtils
::
GetNameNoNS
(
oReader
.
GetName
());
if
(
_T
(
"bevelT"
)
==
strName
)
bevelT
=
oReader
;
else
if
(
_T
(
"bevelB"
)
==
strName
)
bevelB
=
oReader
;
else
if
(
_T
(
"extrusionClr"
)
==
strName
)
extrusionClr
.
fromXML
(
oReader
);
else
if
(
_T
(
"contourClr"
)
==
strName
)
contourClr
.
fromXML
(
oReader
);
}
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
node
.
ReadAttributeBase
(
L"contourW"
,
contourW
);
node
.
ReadAttributeBase
(
L"contourW"
,
contourW
);
...
@@ -98,7 +125,15 @@ namespace PPTX
...
@@ -98,7 +125,15 @@ namespace PPTX
FillParentPointersForChilds
();
FillParentPointersForChilds
();
}
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"contourW"
),
contourW
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"extrusionH"
),
extrusionH
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"prstMaterial"
),
prstMaterial
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"z"
),
z
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
std
::
wstring
toXML
()
const
virtual
std
::
wstring
toXML
()
const
{
{
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Tab.h
View file @
62d48608
...
@@ -43,9 +43,31 @@ namespace PPTX
...
@@ -43,9 +43,31 @@ namespace PPTX
class
Tab
:
public
WrapperWritingElement
class
Tab
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
Tab
)
WritingElement_AdditionConstructors
(
Tab
)
PPTX_LOGIC_BASE2
(
Tab
)
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
public:
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
sName
=
oReader
.
GetName
();
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_tab
;
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
node
.
ReadAttributeBase
(
L"pos"
,
pos
);
node
.
ReadAttributeBase
(
L"pos"
,
pos
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/TextFit.h
View file @
62d48608
...
@@ -44,14 +44,14 @@ namespace PPTX
...
@@ -44,14 +44,14 @@ namespace PPTX
public:
public:
enum
eFit
{
FitEmpty
=
0
,
FitNo
=
1
,
FitSpAuto
=
2
,
FitNormAuto
=
3
};
enum
eFit
{
FitEmpty
=
0
,
FitNo
=
1
,
FitSpAuto
=
2
,
FitNormAuto
=
3
};
TextFit
(){
WritingElement_AdditionConstructors
(
TextFit
)
TextFit
()
{
type
=
FitEmpty
;
type
=
FitEmpty
;
}
}
PPTX_LOGIC_BASE2
(
TextFit
)
virtual
bool
is_init
(){
return
(
type
!=
FitEmpty
);};
virtual
bool
is_init
(){
return
(
type
!=
FitEmpty
);};
public:
void
GetTextFitFrom
(
XmlUtils
::
CXmlNode
&
element
)
void
GetTextFitFrom
(
XmlUtils
::
CXmlNode
&
element
)
{
{
type
=
FitEmpty
;
type
=
FitEmpty
;
...
@@ -101,6 +101,26 @@ namespace PPTX
...
@@ -101,6 +101,26 @@ namespace PPTX
}
}
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_textFit
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
sName
=
oReader
.
GetName
();
}
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
type
=
FitEmpty
;
type
=
FitEmpty
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/TextFont.h
View file @
62d48608
...
@@ -39,41 +39,129 @@ namespace PPTX
...
@@ -39,41 +39,129 @@ namespace PPTX
{
{
namespace
Logic
namespace
Logic
{
{
class
TextFont
:
public
WrapperWritingElement
class
TextFont
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
TextFont
)
WritingElement_AdditionConstructors
(
TextFont
)
PPTX_LOGIC_BASE2
(
TextFont
)
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
m_eType
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
m_eType
=
OOX
::
et_Unknown
;
m_name
=
node
.
GetName
();
m_name
=
node
.
GetName
();
if
(
_T
(
"a:cs"
)
==
m_name
)
m_eType
=
OOX
::
et_a_cs
;
else
if
(
_T
(
"a:ea"
)
==
m_name
)
m_eType
=
OOX
::
et_a_ea
;
else
if
(
_T
(
"a:latin"
)
==
m_name
)
m_eType
=
OOX
::
et_a_latin
;
else
if
(
_T
(
"a:sym"
)
==
m_name
)
m_eType
=
OOX
::
et_a_sym
;
node
.
ReadAttributeBase
(
L"charset"
,
charset
);
node
.
ReadAttributeBase
(
L"charset"
,
charset
);
node
.
ReadAttributeBase
(
L"panose"
,
panose
);
node
.
ReadAttributeBase
(
L"panose"
,
panose
);
node
.
ReadAttributeBase
(
L"pitchFamily"
,
pitchFamily
);
node
.
ReadAttributeBase
(
L"pitchFamily"
,
pitchFamily
);
typeface
=
node
.
GetAttribute
(
_T
(
"typeface"
));
typeface
=
node
.
GetAttribute
(
_T
(
"typeface"
));
}
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
m_eType
=
OOX
::
et_Unknown
;
m_name
=
oReader
.
GetName
();
if
(
_T
(
"a:cs"
)
==
m_name
)
m_eType
=
OOX
::
et_a_cs
;
else
if
(
_T
(
"a:ea"
)
==
m_name
)
m_eType
=
OOX
::
et_a_ea
;
else
if
(
_T
(
"a:latin"
)
==
m_name
)
m_eType
=
OOX
::
et_a_latin
;
else
if
(
_T
(
"a:sym"
)
==
m_name
)
m_eType
=
OOX
::
et_a_sym
;
else
return
;
ReadAttributes
(
oReader
);
if
(
!
oReader
.
IsEmptyNode
()
)
oReader
.
ReadTillEnd
();
}
virtual
std
::
wstring
toXML
()
const
virtual
std
::
wstring
toXML
()
const
{
{
std
::
wstring
name
=
m_name
;
if
(
name
.
empty
())
{
switch
(
m_eType
)
{
case
OOX
:
:
et_a_cs
:
name
=
_T
(
"a:cs"
);
break
;
case
OOX
:
:
et_a_ea
:
name
=
_T
(
"a:ea"
);
break
;
case
OOX
:
:
et_a_latin
:
name
=
_T
(
"a:latin"
);
break
;
case
OOX
:
:
et_a_sym
:
name
=
_T
(
"a:sym"
);
break
;
default:
return
_T
(
""
);
}
}
XmlUtils
::
CAttribute
oAttr
;
XmlUtils
::
CAttribute
oAttr
;
oAttr
.
Write
(
_T
(
"typeface"
),
typeface
);
oAttr
.
Write
(
_T
(
"typeface"
),
typeface
);
oAttr
.
Write
(
_T
(
"pitchFamily"
),
pitchFamily
);
oAttr
.
Write
(
_T
(
"pitchFamily"
),
pitchFamily
);
oAttr
.
Write
(
_T
(
"charset"
),
charset
);
oAttr
.
Write
(
_T
(
"charset"
),
charset
);
oAttr
.
Write
(
_T
(
"panose"
),
panose
);
oAttr
.
Write
(
_T
(
"panose"
),
panose
);
return
XmlUtils
::
CreateNode
(
m_name
,
oAttr
);
return
XmlUtils
::
CreateNode
(
name
,
oAttr
);
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
// Читаем атрибуты
if
(
oReader
.
GetAttributesCount
()
<=
0
)
return
;
if
(
!
oReader
.
MoveToFirstAttribute
()
)
return
;
std
::
wstring
wsName
=
oReader
.
GetName
();
while
(
!
wsName
.
empty
()
)
{
wchar_t
wsChar0
=
wsName
[
0
];
switch
(
wsChar0
)
{
case
'c'
:
if
(
_T
(
"charset"
)
==
wsName
)
charset
=
oReader
.
GetText
();
break
;
case
'p'
:
if
(
_T
(
"panose"
)
==
wsName
)
panose
=
oReader
.
GetText
();
else
if
(
_T
(
"pitchFamily"
)
==
wsName
)
pitchFamily
=
oReader
.
GetText
();
break
;
case
't'
:
if
(
_T
(
"typeface"
)
==
wsName
)
typeface
=
oReader
.
GetText
();
break
;
}
if
(
!
oReader
.
MoveToNextAttribute
()
)
break
;
wsName
=
oReader
.
GetName
();
}
oReader
.
MoveToElement
();
}
}
void
Merge
(
nullable
<
TextFont
>&
font
)
const
void
Merge
(
nullable
<
TextFont
>&
font
)
const
{
{
if
(
!
font
.
is_init
())
if
(
!
font
.
is_init
())
font
=
TextFont
();
font
=
TextFont
();
if
(
charset
.
is_init
())
font
->
charset
=
*
charset
;
if
(
charset
.
is_init
())
font
->
charset
=
*
charset
;
if
(
panose
.
is_init
())
font
->
panose
=
*
panose
;
if
(
panose
.
is_init
())
font
->
panose
=
*
panose
;
if
(
pitchFamily
.
is_init
())
font
->
pitchFamily
=
*
pitchFamily
;
if
(
pitchFamily
.
is_init
())
font
->
pitchFamily
=
*
pitchFamily
;
font
->
typeface
=
typeface
;
font
->
typeface
=
typeface
;
}
}
...
@@ -155,9 +243,9 @@ namespace PPTX
...
@@ -155,9 +243,9 @@ namespace PPTX
nullable_string
panose
;
nullable_string
panose
;
nullable_string
pitchFamily
;
nullable_string
pitchFamily
;
std
::
wstring
typeface
;
std
::
wstring
typeface
;
//private:
public:
std
::
wstring
m_name
;
std
::
wstring
m_name
;
OOX
::
EElementType
m_eType
;
protected:
protected:
virtual
void
FillParentPointersForChilds
(){};
virtual
void
FillParentPointersForChilds
(){};
};
};
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/TextParagraphPr.h
View file @
62d48608
...
@@ -52,7 +52,8 @@ namespace PPTX
...
@@ -52,7 +52,8 @@ namespace PPTX
class
TextParagraphPr
:
public
WrapperWritingElement
class
TextParagraphPr
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
TextParagraphPr
)
WritingElement_AdditionConstructors
(
TextParagraphPr
)
PPTX_LOGIC_BASE2
(
TextParagraphPr
)
TextParagraphPr
&
operator
=
(
const
TextParagraphPr
&
oSrc
)
TextParagraphPr
&
operator
=
(
const
TextParagraphPr
&
oSrc
)
{
{
...
@@ -88,7 +89,45 @@ namespace PPTX
...
@@ -88,7 +89,45 @@ namespace PPTX
return
*
this
;
return
*
this
;
}
}
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nParentDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nParentDepth
)
)
{
std
::
wstring
sName
=
oReader
.
GetName
();
if
(
_T
(
"a:lnSpc"
)
==
sName
)
lnSpc
=
oReader
;
else
if
(
_T
(
"a:defRPr"
)
==
sName
)
defRPr
=
oReader
;
else
if
(
_T
(
"a:spcAft"
)
==
sName
)
spcAft
=
oReader
;
else
if
(
_T
(
"a:spcBef"
)
==
sName
)
spcBef
=
oReader
;
//else if ( _T("a:extLst") == sName )
// extLst = oReader;
else
if
(
_T
(
"a:buBlip"
)
==
sName
||
_T
(
"a:buChar"
)
==
sName
||
_T
(
"a:buAutoNum"
)
==
sName
||
sName
==
_T
(
"buNone"
))
ParagraphBullet
.
fromXML
(
oReader
);
else
if
(
_T
(
"a:buClr"
)
==
sName
||
sName
==
_T
(
"a:buClrTx"
))
buColor
.
fromXML
(
oReader
);
else
if
(
_T
(
"a:buFont"
)
==
sName
||
_T
(
"a:buFontTx"
)
==
sName
)
buTypeface
.
fromXML
(
oReader
);
else
if
(
_T
(
"a:buSzTx"
)
==
sName
||
sName
==
_T
(
"a:buSzPct"
)
||
sName
==
_T
(
"a:buSzPts"
))
buSize
.
fromXML
(
oReader
);
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_pPr
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
m_name
=
node
.
GetName
();
m_name
=
node
.
GetName
();
...
@@ -139,6 +178,19 @@ namespace PPTX
...
@@ -139,6 +178,19 @@ namespace PPTX
FillParentPointersForChilds
();
FillParentPointersForChilds
();
}
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"rtl"
),
rtl
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"lvl"
),
lvl
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"algn"
),
algn
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"fontAlgn"
),
fontAlgn
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"marL"
),
marR
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"marR"
),
marL
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"indent"
),
indent
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"defTabSz"
),
defTabSz
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
std
::
wstring
toXML
()
const
virtual
std
::
wstring
toXML
()
const
{
{
XmlUtils
::
CAttribute
oAttr
;
XmlUtils
::
CAttribute
oAttr
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/TextSpacing.h
View file @
62d48608
...
@@ -43,9 +43,45 @@ namespace PPTX
...
@@ -43,9 +43,45 @@ namespace PPTX
class
TextSpacing
:
public
WrapperWritingElement
class
TextSpacing
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
TextSpacing
)
WritingElement_AdditionConstructors
(
TextSpacing
)
PPTX_LOGIC_BASE2
(
TextSpacing
)
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_Unknown
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
m_name
=
oReader
.
GetName
();
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
sName
=
oReader
.
GetName
();
nullable_int
val
;
if
(
sName
==
L"a:spcPct"
)
{
ReadAttributes
(
oReader
,
val
);
spcPct
=
val
;
}
if
(
sName
==
L"a:spcPts"
)
{
ReadAttributes
(
oReader
,
val
);
spcPts
=
val
;
}
}
Normalize
();
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
,
nullable_int
&
val
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_ReadSingle
(
oReader
,
_T
(
"val"
),
val
)
WritingElement_ReadAttributes_End
(
oReader
)
}
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
m_name
=
node
.
GetName
();
m_name
=
node
.
GetName
();
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/UniColor.cpp
View file @
62d48608
...
@@ -64,8 +64,32 @@ namespace PPTX
...
@@ -64,8 +64,32 @@ namespace PPTX
fromXML
(
node
);
fromXML
(
node
);
return
*
this
;
return
*
this
;
}
}
void
UniColor
::
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
std
::
wstring
name
=
XmlUtils
::
GetNameNoNS
(
oReader
.
GetName
());
if
(
name
==
_T
(
"srgbClr"
))
Color
.
reset
(
new
Logic
::
SrgbClr
(
oReader
));
else
if
(
name
==
_T
(
"scrgbClr"
))
{
Logic
::
SrgbClr
*
pSrgbClr
=
new
Logic
::
SrgbClr
(
oReader
);
pSrgbClr
->
fromXML
(
oReader
);
Color
.
reset
(
pSrgbClr
);
}
else
if
(
name
==
_T
(
"prstClr"
))
Color
.
reset
(
new
Logic
::
PrstClr
(
oReader
));
else
if
(
name
==
_T
(
"schemeClr"
))
Color
.
reset
(
new
Logic
::
SchemeClr
(
oReader
));
else
if
(
name
==
_T
(
"sysClr"
))
Color
.
reset
(
new
Logic
::
SysClr
(
oReader
));
else
Color
.
reset
();
}
OOX
::
EElementType
UniColor
::
getType
()
const
{
if
(
Color
.
IsInit
())
return
Color
->
getType
();
return
OOX
::
et_Unknown
;
}
void
UniColor
::
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
void
UniColor
::
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
std
::
wstring
name
=
XmlUtils
::
GetNameNoNS
(
node
.
GetName
());
std
::
wstring
name
=
XmlUtils
::
GetNameNoNS
(
node
.
GetName
());
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/UniColor.h
View file @
62d48608
...
@@ -48,8 +48,11 @@ namespace PPTX
...
@@ -48,8 +48,11 @@ namespace PPTX
explicit
UniColor
(
XmlUtils
::
CXmlNode
&
node
);
explicit
UniColor
(
XmlUtils
::
CXmlNode
&
node
);
const
UniColor
&
operator
=
(
XmlUtils
::
CXmlNode
&
node
);
const
UniColor
&
operator
=
(
XmlUtils
::
CXmlNode
&
node
);
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
);
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
);
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
);
virtual
OOX
::
EElementType
getType
()
const
;
virtual
void
GetColorFrom
(
XmlUtils
::
CXmlNode
&
element
);
virtual
void
GetColorFrom
(
XmlUtils
::
CXmlNode
&
element
);
virtual
bool
is_init
()
const
{
return
(
Color
.
IsInit
());};
virtual
bool
is_init
()
const
{
return
(
Color
.
IsInit
());};
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/UniEffect.cpp
View file @
62d48608
...
@@ -86,7 +86,108 @@ namespace PPTX
...
@@ -86,7 +86,108 @@ namespace PPTX
fromXML
(
node
);
fromXML
(
node
);
return
*
this
;
return
*
this
;
}
}
void
UniEffect
::
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
std
::
wstring
name
=
oReader
.
GetName
();
switch
((
int
)
name
[
0
])
{
case
'a'
:
{
if
(
name
==
_T
(
"alphaCeiling"
))
{
Effect
.
reset
(
new
Logic
::
AlphaCeiling
(
oReader
));
break
;
}
//1
if
(
name
==
_T
(
"alphaFloor"
))
{
Effect
.
reset
(
new
Logic
::
AlphaFloor
(
oReader
));
break
;
}
//2
if
(
name
==
_T
(
"alphaRepl"
))
{
Effect
.
reset
(
new
Logic
::
AlphaRepl
(
oReader
));
break
;
}
//3
if
(
name
==
_T
(
"alphaOutset"
))
{
Effect
.
reset
(
new
Logic
::
AlphaOutset
(
oReader
));
break
;
}
//4
if
(
name
==
_T
(
"alphaModFix"
))
{
Effect
.
reset
(
new
Logic
::
AlphaModFix
(
oReader
));
break
;
}
//5
if
(
name
==
_T
(
"alphaBiLevel"
))
{
Effect
.
reset
(
new
Logic
::
AlphaBiLevel
(
oReader
));
break
;
}
//6
if
(
name
==
_T
(
"alphaInv"
))
{
Effect
.
reset
(
new
Logic
::
AlphaInv
(
oReader
));
break
;
}
//7
if
(
name
==
_T
(
"alphaMod"
))
{
Effect
.
reset
(
new
Logic
::
AlphaMod
(
oReader
));
break
;
}
//8
break
;
}
case
'b'
:
{
if
(
name
==
_T
(
"blur"
))
{
Effect
.
reset
(
new
Logic
::
Blur
(
oReader
));
break
;
}
//9
if
(
name
==
_T
(
"biLevel"
))
{
Effect
.
reset
(
new
Logic
::
BiLevel
(
oReader
));
break
;
}
//10
if
(
name
==
_T
(
"blend"
))
{
Effect
.
reset
(
new
Logic
::
Blend
(
oReader
));
break
;
}
//11
break
;
}
case
'c'
:
{
if
(
name
==
_T
(
"cont"
))
{
Effect
.
reset
(
new
Logic
::
EffectDag
(
oReader
));
break
;
}
//12
if
(
name
==
_T
(
"clrRepl"
))
{
Effect
.
reset
(
new
Logic
::
ClrRepl
(
oReader
));
break
;
}
//13
if
(
name
==
_T
(
"clrChange"
)){
Effect
.
reset
(
new
Logic
::
ClrChange
(
oReader
));
break
;
}
//14
break
;
}
case
'd'
:
{
if
(
name
==
_T
(
"duotone"
))
{
Effect
.
reset
(
new
Logic
::
Duotone
(
oReader
));
break
;
}
//15
break
;
}
case
'e'
:
{
if
(
name
==
_T
(
"effect"
))
{
Effect
.
reset
(
new
Logic
::
EffectElement
(
oReader
));
break
;
}
//16
break
;
}
case
'f'
:
{
if
(
name
==
_T
(
"fillOverlay"
)){
Effect
.
reset
(
new
Logic
::
FillOverlay
(
oReader
));
break
;
}
//17
if
(
name
==
_T
(
"fill"
))
{
Effect
.
reset
(
new
Logic
::
FillEffect
(
oReader
));
break
;
}
//18
break
;
}
case
'g'
:
{
if
(
name
==
_T
(
"glow"
))
{
Effect
.
reset
(
new
Logic
::
Glow
(
oReader
));
break
;
}
//19
if
(
name
==
_T
(
"grayscl"
))
{
Effect
.
reset
(
new
Logic
::
Grayscl
(
oReader
));
break
;
}
//20
break
;
}
case
'h'
:
{
if
(
name
==
_T
(
"hsl"
))
{
Effect
.
reset
(
new
Logic
::
HslEffect
(
oReader
));
break
;
}
//21
break
;
}
case
'i'
:
{
if
(
name
==
_T
(
"innerShdw"
)){
Effect
.
reset
(
new
Logic
::
InnerShdw
(
oReader
));
break
;
}
//22
break
;
}
case
'l'
:
{
if
(
name
==
_T
(
"lum"
))
{
Effect
.
reset
(
new
Logic
::
LumEffect
(
oReader
));
break
;
}
//23
break
;
}
case
'o'
:
{
if
(
name
==
_T
(
"outerShdw"
)){
Effect
.
reset
(
new
Logic
::
OuterShdw
(
oReader
));
break
;
}
//24
break
;
}
case
'p'
:
{
if
(
name
==
_T
(
"prstShdw"
)){
Effect
.
reset
(
new
Logic
::
PrstShdw
(
oReader
));
break
;
}
//25
break
;
}
case
'r'
:
{
if
(
name
==
_T
(
"reflection"
))
{
Effect
.
reset
(
new
Logic
::
Reflection
(
oReader
));
break
;
}
//26
if
(
name
==
_T
(
"relOff"
))
{
Effect
.
reset
(
new
Logic
::
RelOff
(
oReader
));
break
;
}
//27
break
;
}
case
's'
:
{
if
(
name
==
_T
(
"softEdge"
))
{
Effect
.
reset
(
new
Logic
::
SoftEdge
(
oReader
));
break
;
}
//28
break
;
}
case
't'
:
{
if
(
name
==
_T
(
"tint"
))
{
Effect
.
reset
(
new
Logic
::
TintEffect
(
oReader
));
break
;
}
//29
break
;
}
case
'x'
:
{
if
(
name
==
_T
(
"xfrm"
))
{
Effect
.
reset
(
new
Logic
::
XfrmEffect
(
oReader
));
break
;
}
//30
break
;
}
}
}
void
UniEffect
::
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
void
UniEffect
::
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
std
::
wstring
name
=
XmlUtils
::
GetNameNoNS
(
node
.
GetName
());
std
::
wstring
name
=
XmlUtils
::
GetNameNoNS
(
node
.
GetName
());
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/UniEffect.h
View file @
62d48608
...
@@ -47,7 +47,14 @@ namespace PPTX
...
@@ -47,7 +47,14 @@ namespace PPTX
explicit
UniEffect
(
XmlUtils
::
CXmlNode
&
node
);
explicit
UniEffect
(
XmlUtils
::
CXmlNode
&
node
);
const
UniEffect
&
operator
=
(
XmlUtils
::
CXmlNode
&
node
);
const
UniEffect
&
operator
=
(
XmlUtils
::
CXmlNode
&
node
);
public:
virtual
OOX
::
EElementType
getType
()
const
{
if
(
Effect
.
is_init
())
return
Effect
->
getType
();
else
return
OOX
::
et_Unknown
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
);
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
);
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
);
virtual
void
GetEffectFrom
(
XmlUtils
::
CXmlNode
&
element
);
virtual
void
GetEffectFrom
(
XmlUtils
::
CXmlNode
&
element
);
virtual
bool
is_init
()
const
{
return
(
Effect
.
IsInit
());};
virtual
bool
is_init
()
const
{
return
(
Effect
.
IsInit
());};
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/UniFill.h
View file @
62d48608
...
@@ -48,8 +48,50 @@ namespace PPTX
...
@@ -48,8 +48,50 @@ namespace PPTX
class
UniFill
:
public
WrapperWritingElement
class
UniFill
:
public
WrapperWritingElement
{
{
public:
public:
PPTX_LOGIC_BASE
(
UniFill
)
WritingElement_AdditionConstructors
(
UniFill
)
public:
PPTX_LOGIC_BASE2
(
UniFill
)
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
std
::
wstring
name
=
oReader
.
GetName
();
if
(
name
==
_T
(
"a:blipFill"
))
{
m_type
=
blipFill
;
Fill
.
reset
(
new
Logic
::
BlipFill
(
oReader
));
}
else
if
(
name
==
_T
(
"a:noFill"
))
{
m_type
=
noFill
;
Fill
.
reset
(
new
Logic
::
NoFill
(
oReader
));
}
else
if
(
name
==
_T
(
"a:solidFill"
))
{
m_type
=
solidFill
;
Fill
.
reset
(
new
Logic
::
SolidFill
(
oReader
));
}
else
if
(
name
==
_T
(
"a:gradFill"
))
{
m_type
=
gradFill
;
Fill
.
reset
(
new
Logic
::
GradFill
(
oReader
));
}
else
if
(
name
==
_T
(
"a:pattFill"
))
{
m_type
=
pattFill
;
Fill
.
reset
(
new
Logic
::
PattFill
(
oReader
));
}
else
if
(
name
==
_T
(
"a:grpFill"
))
{
m_type
=
grpFill
;
Fill
.
reset
(
new
Logic
::
GrpFill
(
oReader
));
}
else
{
m_type
=
notInit
;
Fill
.
reset
();
}
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
{
std
::
wstring
name
=
XmlUtils
::
GetNameNoNS
(
node
.
GetName
());
std
::
wstring
name
=
XmlUtils
::
GetNameNoNS
(
node
.
GetName
());
...
...
ASCOfficePPTXFile/PPTXFormat/WrapperWritingElement.h
View file @
62d48608
This diff is collapsed.
Click to expand it.
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