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
037c4046
Commit
037c4046
authored
Feb 21, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PptxFormat - extending reading xml; sppr, txpr in chart without DrawingConverter
parent
4e5ac14c
Changes
44
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
1788 additions
and
1454 deletions
+1788
-1454
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertDiagram.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertDiagram.cpp
+9
-8
ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.cpp
+1
-1
ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.h
ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.h
+2
-3
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConverterChart.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConverterChart.cpp
+26
-26
ASCOfficePPTXFile/ASCOfficeDrawingConverter.cpp
ASCOfficePPTXFile/ASCOfficeDrawingConverter.cpp
+49
-41
ASCOfficePPTXFile/ASCOfficeDrawingConverter.h
ASCOfficePPTXFile/ASCOfficeDrawingConverter.h
+0
-2
ASCOfficePPTXFile/PPTXFormat/Logic/AhBase.h
ASCOfficePPTXFile/PPTXFormat/Logic/AhBase.h
+17
-2
ASCOfficePPTXFile/PPTXFormat/Logic/AhPolar.h
ASCOfficePPTXFile/PPTXFormat/Logic/AhPolar.h
+42
-3
ASCOfficePPTXFile/PPTXFormat/Logic/AhXY.h
ASCOfficePPTXFile/PPTXFormat/Logic/AhXY.h
+42
-3
ASCOfficePPTXFile/PPTXFormat/Logic/BodyPr.h
ASCOfficePPTXFile/PPTXFormat/Logic/BodyPr.h
+83
-23
ASCOfficePPTXFile/PPTXFormat/Logic/CustGeom.h
ASCOfficePPTXFile/PPTXFormat/Logic/CustGeom.h
+103
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Cxn.h
ASCOfficePPTXFile/PPTXFormat/Logic/Cxn.h
+36
-2
ASCOfficePPTXFile/PPTXFormat/Logic/DefaultShapeDefinition.h
ASCOfficePPTXFile/PPTXFormat/Logic/DefaultShapeDefinition.h
+15
-9
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/BlipFill.h
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/BlipFill.h
+1
-1
ASCOfficePPTXFile/PPTXFormat/Logic/Gd.h
ASCOfficePPTXFile/PPTXFormat/Logic/Gd.h
+18
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Geometry.h
ASCOfficePPTXFile/PPTXFormat/Logic/Geometry.h
+19
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Path2D.h
ASCOfficePPTXFile/PPTXFormat/Logic/Path2D.h
+45
-12
ASCOfficePPTXFile/PPTXFormat/Logic/Path2D/ArcTo.h
ASCOfficePPTXFile/PPTXFormat/Logic/Path2D/ArcTo.h
+19
-3
ASCOfficePPTXFile/PPTXFormat/Logic/Path2D/Close.h
ASCOfficePPTXFile/PPTXFormat/Logic/Path2D/Close.h
+9
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Path2D/CubicBezTo.h
ASCOfficePPTXFile/PPTXFormat/Logic/Path2D/CubicBezTo.h
+64
-38
ASCOfficePPTXFile/PPTXFormat/Logic/Path2D/LineTo.h
ASCOfficePPTXFile/PPTXFormat/Logic/Path2D/LineTo.h
+29
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Path2D/MoveTo.h
ASCOfficePPTXFile/PPTXFormat/Logic/Path2D/MoveTo.h
+29
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Path2D/QuadBezTo.h
ASCOfficePPTXFile/PPTXFormat/Logic/Path2D/QuadBezTo.h
+55
-26
ASCOfficePPTXFile/PPTXFormat/Logic/PrstGeom.h
ASCOfficePPTXFile/PPTXFormat/Logic/PrstGeom.h
+43
-3
ASCOfficePPTXFile/PPTXFormat/Logic/PrstTxWarp.h
ASCOfficePPTXFile/PPTXFormat/Logic/PrstTxWarp.h
+40
-2
ASCOfficePPTXFile/PPTXFormat/Logic/Shape.cpp
ASCOfficePPTXFile/PPTXFormat/Logic/Shape.cpp
+8
-6
ASCOfficePPTXFile/PPTXFormat/Logic/ShapeProperties.cpp
ASCOfficePPTXFile/PPTXFormat/Logic/ShapeProperties.cpp
+38
-26
ASCOfficePPTXFile/PPTXFormat/Logic/ShapeProperties.h
ASCOfficePPTXFile/PPTXFormat/Logic/ShapeProperties.h
+2
-2
ASCOfficePPTXFile/PPTXFormat/Logic/ShapeTextProperties.cpp
ASCOfficePPTXFile/PPTXFormat/Logic/ShapeTextProperties.cpp
+37
-26
ASCOfficePPTXFile/PPTXFormat/Logic/ShapeTextProperties.h
ASCOfficePPTXFile/PPTXFormat/Logic/ShapeTextProperties.h
+6
-6
ASCOfficePPTXFile/PPTXFormat/Logic/SpPr.cpp
ASCOfficePPTXFile/PPTXFormat/Logic/SpPr.cpp
+52
-5
ASCOfficePPTXFile/PPTXFormat/Logic/SpPr.h
ASCOfficePPTXFile/PPTXFormat/Logic/SpPr.h
+13
-1
ASCOfficePPTXFile/PPTXFormat/Logic/Table/TableCell.h
ASCOfficePPTXFile/PPTXFormat/Logic/Table/TableCell.h
+1
-1
ASCOfficePPTXFile/PPTXFormat/Logic/TextListStyle.h
ASCOfficePPTXFile/PPTXFormat/Logic/TextListStyle.h
+42
-6
ASCOfficePPTXFile/PPTXFormat/Logic/TxBody.h
ASCOfficePPTXFile/PPTXFormat/Logic/TxBody.h
+83
-30
ASCOfficePPTXFile/PPTXFormat/Logic/UniPath2D.h
ASCOfficePPTXFile/PPTXFormat/Logic/UniPath2D.h
+28
-2
ASCOfficePPTXFile/PPTXLib/PPTXFormat.vcproj
ASCOfficePPTXFile/PPTXLib/PPTXFormat.vcproj
+1
-1
Common/DocxFormat/Source/DocxFormat/WritingElement.h
Common/DocxFormat/Source/DocxFormat/WritingElement.h
+1
-0
Common/DocxFormat/Source/XlsxFormat/Chart/ChartSerialize.cpp
Common/DocxFormat/Source/XlsxFormat/Chart/ChartSerialize.cpp
+154
-491
Common/DocxFormat/Source/XlsxFormat/Chart/ChartSerialize.h
Common/DocxFormat/Source/XlsxFormat/Chart/ChartSerialize.h
+178
-437
Common/DocxFormat/Source/XlsxFormat/CommonInclude.h
Common/DocxFormat/Source/XlsxFormat/CommonInclude.h
+3
-0
X2tConverter/test/win32Test/X2tTest.vcproj
X2tConverter/test/win32Test/X2tTest.vcproj
+26
-26
XlsxSerializerCom/Reader/ChartFromToBinary.cpp
XlsxSerializerCom/Reader/ChartFromToBinary.cpp
+315
-164
XlsxSerializerCom/Reader/ChartFromToBinary.h
XlsxSerializerCom/Reader/ChartFromToBinary.h
+4
-4
No files found.
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertDiagram.cpp
View file @
037c4046
...
...
@@ -85,9 +85,10 @@ void OoxConverter::convert(PPTX::Logic::Shape *oox_shape)
if
(
type
==
SimpleTypes
::
shapetypeRect
&&
oox_shape
->
txBody
.
IsInit
())
type
=
2000
;
if
(
type
==
2000
&&
oox_shape
->
txBody
->
bodyPr
.
fromWordArt
.
get_value_or
(
false
))
if
(
type
==
2000
&&
oox_shape
->
txBody
->
bodyPr
.
IsInit
()
&&
oox_shape
->
txBody
->
bodyPr
->
fromWordArt
.
get_value_or
(
false
))
{
int
wordart_type
=
convert
(
oox_shape
->
txBody
->
bodyPr
.
prstTxWarp
.
GetPointer
());
int
wordart_type
=
convert
(
oox_shape
->
txBody
->
bodyPr
->
prstTxWarp
.
GetPointer
());
if
(
wordart_type
>
0
)
type
=
wordart_type
;
}
...
...
@@ -111,7 +112,7 @@ void OoxConverter::convert(PPTX::Logic::Shape *oox_shape)
odf_context
()
->
drawing_context
()
->
set_text
(
odf_context
()
->
text_context
());
//наложим внешние настройки для текста
convert
(
&
oox_shape
->
txBody
->
bodyPr
);
convert
(
oox_shape
->
txBody
->
bodyPr
.
GetPointer
()
);
if
(
oox_shape
->
style
.
IsInit
())
{
...
...
@@ -281,15 +282,15 @@ void OoxConverter::convert(PPTX::Logic::PathBase *oox_path)
}
if
(
cubicBezTo
)
{
std
::
wstring
path_elm
=
cubicBezTo
->
x
1
+
L" "
+
cubicBezTo
->
y1
+
L" "
+
cubicBezTo
->
x
2
+
L" "
+
cubicBezTo
->
y2
+
L" "
+
cubicBezTo
->
x
3
+
L" "
+
cubicBezTo
->
y3
;
std
::
wstring
path_elm
=
cubicBezTo
->
x
[
0
]
+
L" "
+
cubicBezTo
->
y
[
0
]
+
L" "
+
cubicBezTo
->
x
[
1
]
+
L" "
+
cubicBezTo
->
y
[
1
]
+
L" "
+
cubicBezTo
->
x
[
2
]
+
L" "
+
cubicBezTo
->
y
[
2
]
;
odf_context
()
->
drawing_context
()
->
add_path_element
(
std
::
wstring
(
L"C"
),
path_elm
);
}
if
(
quadBezTo
)
{
std
::
wstring
path_elm
=
quadBezTo
->
x
1
+
L" "
+
quadBezTo
->
y1
+
L" "
+
quadBezTo
->
x
2
+
L" "
+
quadBezTo
->
y2
;
std
::
wstring
path_elm
=
quadBezTo
->
x
[
0
]
+
L" "
+
quadBezTo
->
y
[
0
]
+
L" "
+
quadBezTo
->
x
[
1
]
+
L" "
+
quadBezTo
->
y
[
1
]
;
odf_context
()
->
drawing_context
()
->
add_path_element
(
std
::
wstring
(
L"S"
),
path_elm
);
}
if
(
arcTo
)
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.cpp
View file @
037c4046
...
...
@@ -395,7 +395,7 @@ void OoxConverter::convert(OOX::Drawing::CDiagrammParts *oox_diagramm)
if
(
oFile
.
is_init
()
&&
OOX
::
FileTypes
::
DiagDrawing
==
oFile
->
type
())
{
_CP_OPT
(
double
)
x
,
y
,
width
,
height
,
cx
=
0
,
cy
=
0
;
_CP_OPT
(
double
)
x
,
y
,
width
,
height
,
cx
,
cy
;
odf_context
()
->
drawing_context
()
->
get_size
(
width
,
height
);
odf_context
()
->
drawing_context
()
->
get_position
(
x
,
y
);
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/Converter.h
View file @
037c4046
...
...
@@ -270,7 +270,6 @@ namespace OOX
class
CT_Style1
;
class
CT_Style
;
class
CT_TextLanguageID
;
class
CRichText
;
class
CTextProperties
;
}
namespace
Vml
...
...
@@ -495,8 +494,8 @@ public:
void
convert
(
OOX
::
Spreadsheet
::
CT_LineSer
*
ser
);
void
convert
(
OOX
::
Spreadsheet
::
CT_AxDataSource
*
cat
,
int
type
);
void
convert
(
OOX
::
Spreadsheet
::
CT_NumDataSource
*
val
);
void
convert
(
OOX
::
Spreadsheet
::
CRichText
*
rich
);
void
convert
(
OOX
::
Spreadsheet
::
CTextProperties
*
txPr
);
//
void convert(OOX::Spreadsheet::CRichText *rich);
//void convert(OOX::Spreadsheet::CTextProperties
*txPr);
void
convert
(
OOX
::
Spreadsheet
::
CT_Tx
*
ct_tx
);
void
convert
(
OOX
::
Spreadsheet
::
CT_Layout
*
ct_layout
);
void
convert
(
OOX
::
Spreadsheet
::
CT_ManualLayout
*
ct_layout
);
...
...
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConverterChart.cpp
View file @
037c4046
...
...
@@ -73,32 +73,32 @@ void OoxConverter::convert(OOX::Spreadsheet::CT_ChartSpace *oox_chart)
odf_context
()
->
chart_context
()
->
end_plot_area
();
}
void
OoxConverter
::
convert
(
OOX
::
Spreadsheet
::
CRichText
*
rich
)
{
if
(
rich
==
NULL
)
return
;
odf_context
()
->
chart_context
()
->
start_text
();
OoxConverter
::
convert
(
rich
->
m_oBodyPr
.
GetPointer
());
for
(
size_t
i
=
0
;
i
<
rich
->
m_arrItems
.
size
();
i
++
)
{
OoxConverter
::
convert
(
rich
->
m_arrItems
[
i
]);
}
odf_context
()
->
chart_context
()
->
end_text
();
}
void
OoxConverter
::
convert
(
OOX
::
Spreadsheet
::
CTextProperties
*
txPr
)
{
if
(
txPr
==
NULL
)
return
;
odf_context
()
->
chart_context
()
->
start_text
();
OoxConverter
::
convert
(
txPr
->
m_oBodyPr
.
GetPointer
());
for
(
size_t
i
=
0
;
i
<
txPr
->
m_arrItems
.
size
();
i
++
)
{
OoxConverter
::
convert
(
txPr
->
m_arrItems
[
i
]);
}
odf_context
()
->
chart_context
()
->
end_text
();
}
//
void OoxConverter::convert(OOX::Spreadsheet::CRichText* rich)
//
{
//
if (rich == NULL)return;
//
//
odf_context()->chart_context()->start_text();
//
OoxConverter::convert(rich->m_oBodyPr.GetPointer());
//
//
for (size_t i = 0; i < rich->m_arrItems.size();i++)
//
{
//
OoxConverter::convert(rich->m_arrItems[i]);
//
}
//
odf_context()->chart_context()->end_text();
//
}
//
void OoxConverter::convert(OOX::Spreadsheet::CTextProperties* txPr)
//
{
//
if (txPr == NULL)return;
//
//
odf_context()->chart_context()->start_text();
//
OoxConverter::convert(txPr->m_oBodyPr.GetPointer());
//
//
for (size_t i = 0; i < txPr->m_arrItems.size();i++)
//
{
//
OoxConverter::convert(txPr->m_arrItems[i]);
//
}
//
odf_context()->chart_context()->end_text();
//
}
void
OoxConverter
::
convert
(
OOX
::
Spreadsheet
::
CT_Tx
*
ct_tx
)
{
if
(
ct_tx
==
NULL
)
return
;
...
...
ASCOfficePPTXFile/ASCOfficeDrawingConverter.cpp
View file @
037c4046
...
...
@@ -2754,7 +2754,11 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
{
if
(
pShape
->
txBody
.
IsInit
()
==
false
)
pShape
->
txBody
=
new
PPTX
::
Logic
::
TxBody
();
pShape
->
txBody
->
bodyPr
.
vert
=
pShape
->
TextBoxBodyPr
->
vert
;
if
(
!
pShape
->
txBody
->
bodyPr
.
IsInit
())
pShape
->
txBody
->
bodyPr
=
new
PPTX
::
Logic
::
BodyPr
();
pShape
->
txBody
->
bodyPr
->
vert
=
pShape
->
TextBoxBodyPr
->
vert
;
}
pPair
=
oCSSParser
.
m_mapSettings
.
find
(
L"mso-rotate"
);
...
...
@@ -2765,7 +2769,11 @@ void CDrawingConverter::doc_LoadShape(PPTX::Logic::SpTreeElem *elem, XmlUtils::C
pShape
->
TextBoxBodyPr
->
rot
=
_wtoi
(
pPair
->
second
.
c_str
())
*
60000
;
//для docx, xlsx
if
(
pShape
->
txBody
.
IsInit
()
==
false
)
//для pptx
pShape
->
txBody
=
new
PPTX
::
Logic
::
TxBody
();
pShape
->
txBody
->
bodyPr
.
rot
=
pShape
->
TextBoxBodyPr
->
rot
;
if
(
!
pShape
->
txBody
->
bodyPr
.
IsInit
())
pShape
->
txBody
->
bodyPr
=
new
PPTX
::
Logic
::
BodyPr
();
pShape
->
txBody
->
bodyPr
->
rot
=
pShape
->
TextBoxBodyPr
->
rot
;
}
catch
(...){}
}
...
...
@@ -5210,45 +5218,45 @@ void CDrawingConverter::ConvertMainPropsToVML(const std::wstring& bsMainProps, N
pWriter
.
m_strStyleMain
=
oWriter
.
GetXmlString
();
}
HRESULT
CDrawingConverter
::
GetTxBodyBinary
(
const
std
::
wstring
&
bsXml
)
{
XmlUtils
::
CXmlNode
oNode
;
if
(
!
oNode
.
FromXmlString
((
std
::
wstring
)
bsXml
))
return
S_FALSE
;
PPTX
::
Logic
::
TxBody
oTxBody
(
oNode
);
//m_pBinaryWriter->ClearNoAttack();
//ULONG lOldPos = m_pBinaryWriter->GetPosition();
m_pBinaryWriter
->
m_pCommon
->
CheckFontPicker
();
//m_pBinaryWriter->m_pCommon->m_pNativePicker->Init(m_strFontDirectory);
m_pBinaryWriter
->
WriteRecord1
(
0
,
oTxBody
);
//m_pBinaryWriter->SetPosition(lOldPos);
//m_pBinaryWriter->ClearNoAttack();
return
S_OK
;
}
HRESULT
CDrawingConverter
::
GetTxBodyXml
(
LONG
lStart
,
std
::
wstring
&
sXml
)
{
m_pReader
->
Seek
(
lStart
);
BYTE
type
=
m_pReader
->
GetUChar
();
if
(
0
!=
type
)
return
S_FALSE
;
PPTX
::
Logic
::
TxBody
oTxBody
;
oTxBody
.
fromPPTY
(
m_pReader
);
NSBinPptxRW
::
CXmlWriter
oWriter
;
oTxBody
.
toXmlWriterExcel
(
&
oWriter
);
sXml
=
oWriter
.
GetXmlString
();
return
S_OK
;
}
//
HRESULT CDrawingConverter::GetTxBodyBinary(const std::wstring& bsXml)
//
{
//
XmlUtils::CXmlNode oNode;
//
if (!oNode.FromXmlString((std::wstring)bsXml))
//
return S_FALSE;
//
//
PPTX::Logic::TxBody oTxBody(oNode);
//
//
//m_pBinaryWriter->ClearNoAttack();
//
//ULONG lOldPos = m_pBinaryWriter->GetPosition();
//
m_pBinaryWriter->m_pCommon->CheckFontPicker();
//
//m_pBinaryWriter->m_pCommon->m_pNativePicker->Init(m_strFontDirectory);
//
//
m_pBinaryWriter->WriteRecord1(0, oTxBody);
//
//
//m_pBinaryWriter->SetPosition(lOldPos);
//
//
//m_pBinaryWriter->ClearNoAttack();
//
return S_OK;
//
}
//
HRESULT CDrawingConverter::GetTxBodyXml(LONG lStart, std::wstring& sXml)
//
{
//
m_pReader->Seek(lStart);
//
//
BYTE type = m_pReader->GetUChar();
//
if (0 != type)
//
return S_FALSE;
//
//
PPTX::Logic::TxBody oTxBody;
//
oTxBody.fromPPTY(m_pReader);
//
//
NSBinPptxRW::CXmlWriter oWriter;
//
oTxBody.toXmlWriterExcel(&oWriter);
//
//
sXml = oWriter.GetXmlString();
//
//
return S_OK;
//
}
HRESULT
CDrawingConverter
::
SetFontDir
(
const
std
::
wstring
&
bsFontDir
)
{
...
...
ASCOfficePPTXFile/ASCOfficeDrawingConverter.h
View file @
037c4046
...
...
@@ -236,8 +236,6 @@ namespace NSBinPptxRW
HRESULT
WriteRels
(
const
std
::
wstring
&
sType
,
const
std
::
wstring
&
sTarget
,
const
std
::
wstring
&
sTargetMode
,
long
*
lId
);
HRESULT
LoadClrMap
(
const
std
::
wstring
&
sXml
);
HRESULT
(
GetTxBodyBinary
)
(
const
std
::
wstring
&
sXml
);
HRESULT
(
GetTxBodyXml
)
(
long
lStart
,
std
::
wstring
&
Xml
);
HRESULT
(
SetFontDir
)
(
const
std
::
wstring
&
sFontDir
);
HRESULT
SetFontPicker
(
COfficeFontPicker
*
pFontPicker
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/AhBase.h
View file @
037c4046
...
...
@@ -45,9 +45,15 @@ namespace PPTX
class
AhBase
:
public
WrapperWritingElement
{
public:
PPTX_LOGIC_BASE
(
AhBase
)
WritingElement_AdditionConstructors
(
AhBase
)
PPTX_LOGIC_BASE2
(
AhBase
)
public:
virtual
OOX
::
EElementType
getType
()
const
{
if
(
ah
.
IsInit
())
return
ah
->
getType
();
return
OOX
::
et_Unknown
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
std
::
wstring
name
=
XmlUtils
::
GetNameNoNS
(
node
.
GetName
());
...
...
@@ -58,7 +64,16 @@ namespace PPTX
ah
.
reset
(
new
Logic
::
AhPolar
(
node
));
else
ah
.
reset
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
std
::
wstring
sName
=
oReader
.
GetName
();
if
(
sName
==
L"a:ahXY"
)
ah
.
reset
(
new
Logic
::
AhXY
(
oReader
));
else
if
(
sName
==
L"a:ahPolar"
)
ah
.
reset
(
new
Logic
::
AhPolar
(
oReader
));
else
ah
.
reset
();
}
virtual
void
GetAdjustHandleFrom
(
XmlUtils
::
CXmlNode
&
element
)
{
XmlUtils
::
CXmlNode
oNode
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/AhPolar.h
View file @
037c4046
...
...
@@ -43,9 +43,9 @@ namespace PPTX
class
AhPolar
:
public
Ah
{
public:
PPTX_LOGIC_BASE
(
AhPolar
)
WritingElement_AdditionConstructors
(
AhPolar
)
PPTX_LOGIC_BASE2
(
AhPolar
)
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
XmlUtils
::
CXmlNode
oPos
=
node
.
ReadNode
(
_T
(
"a:pos"
));
...
...
@@ -60,7 +60,46 @@ namespace PPTX
node
.
ReadAttributeBase
(
L"minAng"
,
minAng
);
node
.
ReadAttributeBase
(
L"minR"
,
minR
);
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_ahPolar
;
}
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
(
sName
==
L"a:pos"
)
{
ReadAttributes2
(
oReader
);
}
}
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"gdRefR"
),
gdRefR
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"minR"
),
minR
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"maxR"
),
maxR
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"gdRefAng"
),
gdRefAng
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"minAng"
),
minAng
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"maxAng"
),
maxAng
)
WritingElement_ReadAttributes_End
(
oReader
)
}
void
ReadAttributes2
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"x"
),
x
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"y"
),
y
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
std
::
wstring
toXML
()
const
{
XmlUtils
::
CAttribute
oAttr1
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/AhXY.h
View file @
037c4046
...
...
@@ -43,9 +43,9 @@ namespace PPTX
class
AhXY
:
public
Ah
{
public:
PPTX_LOGIC_BASE
(
AhXY
)
WritingElement_AdditionConstructors
(
AhXY
)
PPTX_LOGIC_BASE2
(
AhXY
)
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
XmlUtils
::
CXmlNode
oPos
=
node
.
ReadNode
(
_T
(
"a:pos"
));
...
...
@@ -60,7 +60,46 @@ namespace PPTX
node
.
ReadAttributeBase
(
L"minX"
,
minX
);
node
.
ReadAttributeBase
(
L"minY"
,
minY
);
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_ahXY
;
}
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
(
sName
==
L"a:pos"
)
{
ReadAttributes2
(
oReader
);
}
}
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"gdRefX"
),
gdRefX
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"minX"
),
minX
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"maxX"
),
maxX
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"gdRefY"
),
gdRefY
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"minY"
),
minY
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"maxY"
),
maxY
)
WritingElement_ReadAttributes_End
(
oReader
)
}
void
ReadAttributes2
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"x"
),
x
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"y"
),
y
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
std
::
wstring
toXML
()
const
{
XmlUtils
::
CAttribute
oAttr1
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/BodyPr.h
View file @
037c4046
...
...
@@ -51,9 +51,63 @@ namespace PPTX
class
BodyPr
:
public
WrapperWritingElement
{
public:
PPTX_LOGIC_BASE
(
BodyPr
)
WritingElement_AdditionConstructors
(
BodyPr
)
PPTX_LOGIC_BASE2
(
BodyPr
)
public:
virtual
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
(
L"a:prstTxWarp"
==
strName
)
prstTxWarp
=
oReader
;
else
if
(
L"a:scene3d"
==
strName
)
scene3d
=
oReader
;
else
if
(
L"a:sp3d"
==
strName
)
sp3d
=
oReader
;
else
if
(
strName
==
L"a:noAutofit"
||
strName
==
L"a:spAutoFit"
||
strName
==
L"a:normAutofit"
)
Fit
.
fromXML
(
oReader
);
else
if
(
L"a:flatTx"
==
strName
)
{
//oNode.ReadAttributeBase(L"z", flatTx);
}
}
FillParentPointersForChilds
();
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"anchor"
),
anchor
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"anchorCtr"
),
anchorCtr
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"bIns"
),
bIns
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"compatLnSpc"
),
compatLnSpc
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"forceAA"
),
forceAA
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"fromWordArt"
),
fromWordArt
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"horzOverflow"
),
horzOverflow
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"lIns"
),
lIns
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"numCol"
),
numCol
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"rIns"
),
rIns
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"rot"
),
rot
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"rtlCol"
),
rtlCol
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"spcCol"
),
spcCol
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"spcFirstLastPara"
),
spcFirstLastPara
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"tIns"
),
tIns
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"upright"
),
upright
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"vert"
),
vert
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"vertOverflow"
),
vertOverflow
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"wrap"
),
wrap
)
WritingElement_ReadAttributes_End
(
oReader
)
Normalize
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
m_namespace
=
XmlUtils
::
GetNamespace
(
node
.
GetName
());
...
...
@@ -172,10 +226,16 @@ namespace PPTX
pWriter
->
EndNode
(
m_namespace
+
_T
(
":bodyPr"
));
}
void
Merge
(
BodyPr
&
bodyPr
)
const
void
Merge
(
nullable
<
BodyPr
>&
bodyPr
)
const
{
if
(
!
bodyPr
.
IsInit
())
{
bodyPr
=
new
PPTX
::
Logic
::
BodyPr
();
}
if
(
Fit
.
type
!=
TextFit
::
FitEmpty
)
Fit
.
Merge
(
bodyPr
.
Fit
);
Fit
.
Merge
(
bodyPr
->
Fit
);
/*
nullable_property<PrstTxWarp> prstTxWarp;
nullable_property<Scene3d> scene3d;
...
...
@@ -184,43 +244,43 @@ namespace PPTX
*/
// Attributes
if
(
anchor
.
IsInit
())
bodyPr
.
anchor
=
*
anchor
;
bodyPr
->
anchor
=
*
anchor
;
if
(
anchorCtr
.
IsInit
())
bodyPr
.
anchorCtr
=
*
anchorCtr
;
bodyPr
->
anchorCtr
=
*
anchorCtr
;
if
(
bIns
.
IsInit
())
bodyPr
.
bIns
=
*
bIns
;
bodyPr
->
bIns
=
*
bIns
;
if
(
compatLnSpc
.
IsInit
())
bodyPr
.
compatLnSpc
=
*
compatLnSpc
;
bodyPr
->
compatLnSpc
=
*
compatLnSpc
;
if
(
forceAA
.
IsInit
())
bodyPr
.
forceAA
=
*
forceAA
;
bodyPr
->
forceAA
=
*
forceAA
;
if
(
fromWordArt
.
IsInit
())
bodyPr
.
fromWordArt
=
*
fromWordArt
;
bodyPr
->
fromWordArt
=
*
fromWordArt
;
if
(
horzOverflow
.
IsInit
())
bodyPr
.
horzOverflow
=
*
horzOverflow
;
bodyPr
->
horzOverflow
=
*
horzOverflow
;
if
(
lIns
.
IsInit
())
bodyPr
.
lIns
=
*
lIns
;
bodyPr
->
lIns
=
*
lIns
;
if
(
numCol
.
IsInit
())
bodyPr
.
numCol
=
*
numCol
;
bodyPr
->
numCol
=
*
numCol
;
if
(
rIns
.
IsInit
())
bodyPr
.
rIns
=
*
rIns
;
bodyPr
->
rIns
=
*
rIns
;
if
(
rot
.
IsInit
())
bodyPr
.
rot
=
*
rot
;
bodyPr
->
rot
=
*
rot
;
if
(
rtlCol
.
IsInit
())
bodyPr
.
rtlCol
=
*
rtlCol
;
bodyPr
->
rtlCol
=
*
rtlCol
;
if
(
spcCol
.
IsInit
())
bodyPr
.
spcCol
=
*
spcCol
;
bodyPr
->
spcCol
=
*
spcCol
;
if
(
spcFirstLastPara
.
IsInit
())
bodyPr
.
spcFirstLastPara
=
*
spcFirstLastPara
;
bodyPr
->
spcFirstLastPara
=
*
spcFirstLastPara
;
if
(
tIns
.
IsInit
())
bodyPr
.
tIns
=
*
tIns
;
bodyPr
->
tIns
=
*
tIns
;
if
(
upright
.
IsInit
())
bodyPr
.
upright
=
*
upright
;
bodyPr
->
upright
=
*
upright
;
if
(
vert
.
IsInit
())
bodyPr
.
vert
=
*
vert
;
bodyPr
->
vert
=
*
vert
;
if
(
vertOverflow
.
IsInit
())
bodyPr
.
vertOverflow
=
*
vertOverflow
;
bodyPr
->
vertOverflow
=
*
vertOverflow
;
if
(
wrap
.
IsInit
())
bodyPr
.
wrap
=
*
wrap
;
bodyPr
->
wrap
=
*
wrap
;
}
virtual
void
toPPTY
(
NSBinPptxRW
::
CBinaryFileWriter
*
pWriter
)
const
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/CustGeom.h
View file @
037c4046
...
...
@@ -47,7 +47,8 @@ namespace PPTX
class
CustGeom
:
public
WrapperWritingElement
{
public:
PPTX_LOGIC_BASE
(
CustGeom
)
WritingElement_AdditionConstructors
(
CustGeom
)
PPTX_LOGIC_BASE2
(
CustGeom
)
CustGeom
&
operator
=
(
const
CustGeom
&
oSrc
)
{
...
...
@@ -65,7 +66,107 @@ namespace PPTX
return
*
this
;
}
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_custGeom
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nParentDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nParentDepth
)
)
{
std
::
wstring
sName
=
oReader
.
GetName
();
if
(
sName
==
L"a:avLst"
)
{
int
nParentDepth1
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nParentDepth1
)
)
{
std
::
wstring
sName1
=
oReader
.
GetName
();
if
(
sName1
==
L"a:gd"
)
{
Gd
gd
;
avLst
.
push_back
(
gd
);
avLst
.
back
().
fromXML
(
oReader
);
}
}
}
else
if
(
sName
==
L"a:gdLst"
)
{
int
nParentDepth1
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nParentDepth1
)
)
{
std
::
wstring
sName1
=
oReader
.
GetName
();
if
(
sName1
==
L"a:gd"
)
{
Gd
gd
;
gdLst
.
push_back
(
gd
);
gdLst
.
back
().
fromXML
(
oReader
);
}
}
}
else
if
(
sName
==
L"a:rect"
)
rect
=
oReader
;
else
if
(
sName
==
L"a:pathLst"
)
{
int
nParentDepth1
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nParentDepth1
)
)
{
std
::
wstring
sName1
=
oReader
.
GetName
();
if
(
sName1
==
L"a:path"
)
{
Path2D
gd
;
pathLst
.
push_back
(
gd
);
pathLst
.
back
().
fromXML
(
oReader
);
}
}
}
else
if
(
sName
==
L"a:ahLst"
)
{
int
nParentDepth1
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nParentDepth1
)
)
{
std
::
wstring
sName1
=
oReader
.
GetName
();
if
(
sName1
==
L"a:ahPolar"
)
{
AhBase
gd
;
ahLst
.
push_back
(
gd
);
ahLst
.
back
().
fromXML
(
oReader
);
}
else
if
(
sName1
==
L"a:ahXY"
)
{
AhBase
gd
;
ahLst
.
push_back
(
gd
);
ahLst
.
back
().
fromXML
(
oReader
);
}
}
}
else
if
(
sName
==
L"a:cxnLst"
)
{
int
nParentDepth1
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nParentDepth1
)
)
{
std
::
wstring
sName1
=
oReader
.
GetName
();
if
(
sName1
==
L"a:cxn"
)
{
Cxn
gd
;
cxnLst
.
push_back
(
gd
);
cxnLst
.
back
().
fromXML
(
oReader
);
}
}
}
}
FillParentPointersForChilds
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
XmlUtils
::
CXmlNode
oNode
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Cxn.h
View file @
037c4046
...
...
@@ -43,7 +43,8 @@ namespace PPTX
class
Cxn
:
public
WrapperWritingElement
{
public:
PPTX_LOGIC_BASE
(
Cxn
)
WritingElement_AdditionConstructors
(
Cxn
)
PPTX_LOGIC_BASE2
(
Cxn
)
Cxn
&
operator
=
(
const
Cxn
&
oSrc
)
{
...
...
@@ -55,8 +56,41 @@ namespace PPTX
ang
=
oSrc
.
ang
;
return
*
this
;
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_cxn
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
public:
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nParentDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nParentDepth
)
)
{
std
::
wstring
sName
=
oReader
.
GetName
();
if
(
sName
==
L"a:pos"
)
{
ReadAttributes2
(
oReader
);
}
}
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_ReadSingle
(
oReader
,
_T
(
"ang"
),
ang
)
WritingElement_ReadAttributes_End
(
oReader
)
}
void
ReadAttributes2
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"x"
),
x
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"y"
),
y
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
ang
=
node
.
GetAttribute
(
_T
(
"ang"
));
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/DefaultShapeDefinition.h
View file @
037c4046
...
...
@@ -95,7 +95,7 @@ namespace PPTX
{
XmlUtils
::
CNodeValue
oValue
;
oValue
.
Write
(
spPr
);
oValue
.
Write
(
bodyPr
);
oValue
.
Write
Nullable
(
bodyPr
);
oValue
.
Write
(
lstStyle
);
oValue
.
WriteNullable
(
style
);
...
...
@@ -105,7 +105,7 @@ namespace PPTX
virtual
void
toPPTY
(
NSBinPptxRW
::
CBinaryFileWriter
*
pWriter
)
const
{
pWriter
->
WriteRecord1
(
0
,
spPr
);
pWriter
->
WriteRecord
1
(
1
,
bodyPr
);
pWriter
->
WriteRecord
2
(
1
,
bodyPr
);
pWriter
->
WriteRecord1
(
2
,
lstStyle
);
pWriter
->
WriteRecord2
(
3
,
style
);
}
...
...
@@ -127,8 +127,9 @@ namespace PPTX
}
case
1
:
{
bodyPr
.
m_namespace
=
_T
(
"a"
);
bodyPr
.
fromPPTY
(
pReader
);
bodyPr
=
BodyPr
();
bodyPr
->
m_namespace
=
_T
(
"a"
);
bodyPr
->
fromPPTY
(
pReader
);
break
;
}
case
2
:
...
...
@@ -160,7 +161,9 @@ namespace PPTX
pWriter
->
m_lFlag
=
0x04
;
spPr
.
toXmlWriter
(
pWriter
);
pWriter
->
m_lFlag
=
0
;
bodyPr
.
toXmlWriter
(
pWriter
);
if
(
bodyPr
.
IsInit
())
bodyPr
->
toXmlWriter
(
pWriter
);
lstStyle
.
toXmlWriter
(
pWriter
);
pWriter
->
Write
(
style
);
...
...
@@ -169,16 +172,19 @@ namespace PPTX
public:
SpPr
spPr
;
BodyPr
bodyPr
;
nullable
<
BodyPr
>
bodyPr
;
TextListStyle
lstStyle
;
nullable
<
ShapeStyle
>
style
;
public:
std
::
wstring
m_name
;
std
::
wstring
m_name
;
protected:
virtual
void
FillParentPointersForChilds
()
{
spPr
.
SetParentPointer
(
this
);
bodyPr
.
SetParentPointer
(
this
);
if
(
bodyPr
.
IsInit
())
bodyPr
->
SetParentPointer
(
this
);
lstStyle
.
SetParentPointer
(
this
);
if
(
style
.
IsInit
())
style
->
SetParentPointer
(
this
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Fills/BlipFill.h
View file @
037c4046
...
...
@@ -78,7 +78,7 @@ namespace PPTX
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
oReader
.
GetName
(
);
std
::
wstring
strName
=
XmlUtils
::
GetNameNoNS
(
oReader
.
GetName
()
);
if
(
_T
(
"blip"
)
==
strName
)
{
if
(
!
blip
.
IsInit
())
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Gd.h
View file @
037c4046
...
...
@@ -42,9 +42,25 @@ namespace PPTX
class
Gd
:
public
WrapperWritingElement
{
public:
PPTX_LOGIC_BASE
(
Gd
)
WritingElement_AdditionConstructors
(
Gd
)
PPTX_LOGIC_BASE2
(
Gd
)
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_gd
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"name"
),
name
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"fmla"
),
fmla
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
node
.
ReadAttributeBase
(
L"name"
,
name
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Geometry.h
View file @
037c4046
...
...
@@ -45,9 +45,26 @@ namespace PPTX
class
Geometry
:
public
WrapperWritingElement
{
public:
PPTX_LOGIC_BASE
(
Geometry
)
WritingElement_AdditionConstructors
(
Geometry
)
PPTX_LOGIC_BASE2
(
Geometry
)
public:
virtual
OOX
::
EElementType
getType
()
const
{
if
(
m_geometry
.
IsInit
())
return
m_geometry
->
getType
();
return
OOX
::
et_Unknown
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
std
::
wstring
strName
=
XmlUtils
::
GetNameNoNS
(
oReader
.
GetName
());
if
(
strName
==
_T
(
"prstGeom"
))
m_geometry
.
reset
(
new
Logic
::
PrstGeom
(
oReader
));
else
if
(
strName
==
_T
(
"custGeom"
))
m_geometry
.
reset
(
new
Logic
::
CustGeom
(
oReader
));
else
m_geometry
.
reset
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
std
::
wstring
strName
=
XmlUtils
::
GetNameNoNS
(
node
.
GetName
());
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Path2D.h
View file @
037c4046
...
...
@@ -45,7 +45,8 @@ namespace PPTX
class
Path2D
:
public
WrapperWritingElement
{
public:
PPTX_LOGIC_BASE
(
Path2D
)
WritingElement_AdditionConstructors
(
Path2D
)
PPTX_LOGIC_BASE2
(
Path2D
)
Path2D
&
operator
=
(
const
Path2D
&
oSrc
)
{
...
...
@@ -62,8 +63,40 @@ namespace PPTX
return
*
this
;
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_path
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
public:
Paths
.
clear
();
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nParentDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nParentDepth
)
)
{
std
::
wstring
sName
=
oReader
.
GetName
();
UniPath2D
p
;
Paths
.
push_back
(
p
);
Paths
.
back
().
fromXML
(
oReader
);
}
FillParentPointersForChilds
();
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"extrusionOk"
),
extrusionOk
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"fill"
),
fill
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"h"
),
h
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"stroke"
),
stroke
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"w"
),
w
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
node
.
ReadAttributeBase
(
L"extrusionOk"
,
extrusionOk
);
...
...
@@ -229,12 +262,12 @@ namespace PPTX
case
GEOMETRY_TYPE_PATH_CUBICBEZTO
:
{
Logic
::
CubicBezTo
*
p
=
new
Logic
::
CubicBezTo
();
p
->
x
1
=
arr
[
0
];
p
->
y
1
=
arr
[
1
];
p
->
x
2
=
arr
[
2
];
p
->
y
2
=
arr
[
3
];
p
->
x
3
=
arr
[
4
];
p
->
y
3
=
arr
[
5
];
p
->
x
[
0
]
=
arr
[
0
];
p
->
y
[
0
]
=
arr
[
1
];
p
->
x
[
1
]
=
arr
[
2
];
p
->
y
[
1
]
=
arr
[
3
];
p
->
x
[
2
]
=
arr
[
4
];
p
->
y
[
2
]
=
arr
[
5
];
oPath
.
Path2D
.
reset
(
p
);
break
;
}
...
...
@@ -251,10 +284,10 @@ namespace PPTX
case
GEOMETRY_TYPE_PATH_QUADBEZTO
:
{
Logic
::
QuadBezTo
*
p
=
new
Logic
::
QuadBezTo
();
p
->
x
1
=
arr
[
0
];
p
->
y
1
=
arr
[
1
];
p
->
x
2
=
arr
[
2
];
p
->
y
2
=
arr
[
3
];
p
->
x
[
0
]
=
arr
[
0
];
p
->
y
[
0
]
=
arr
[
1
];
p
->
x
[
1
]
=
arr
[
2
];
p
->
y
[
1
]
=
arr
[
3
];
oPath
.
Path2D
.
reset
(
p
);
break
;
}
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Path2D/ArcTo.h
View file @
037c4046
...
...
@@ -42,7 +42,8 @@ namespace PPTX
class
ArcTo
:
public
PathBase
{
public:
PPTX_LOGIC_BASE
(
ArcTo
)
WritingElement_AdditionConstructors
(
ArcTo
)
PPTX_LOGIC_BASE2
(
ArcTo
)
ArcTo
&
operator
=
(
const
ArcTo
&
oSrc
)
{
...
...
@@ -56,8 +57,23 @@ namespace PPTX
return
*
this
;
}
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_arcTo
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"wR"
),
wR
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"hR"
),
hR
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"stAng"
),
stAng
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"swAng"
),
swAng
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
wR
=
node
.
GetAttribute
(
_T
(
"wR"
));
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Path2D/Close.h
View file @
037c4046
...
...
@@ -43,7 +43,8 @@ namespace PPTX
class
Close
:
public
PathBase
{
public:
PPTX_LOGIC_BASE
(
Close
)
WritingElement_AdditionConstructors
(
Close
)
PPTX_LOGIC_BASE2
(
Close
)
Close
&
operator
=
(
const
Close
&
oSrc
)
{
...
...
@@ -52,8 +53,14 @@ namespace PPTX
return
*
this
;
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_close
;
}
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
}
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Path2D/CubicBezTo.h
View file @
037c4046
...
...
@@ -43,24 +43,24 @@ namespace PPTX
class
CubicBezTo
:
public
PathBase
{
public:
PPTX_LOGIC_BASE
(
CubicBezTo
)
WritingElement_AdditionConstructors
(
CubicBezTo
)
PPTX_LOGIC_BASE2
(
CubicBezTo
)
CubicBezTo
&
operator
=
(
const
CubicBezTo
&
oSrc
)
{
parentFile
=
oSrc
.
parentFile
;
parentElement
=
oSrc
.
parentElement
;
x
1
=
oSrc
.
x1
;
y
1
=
oSrc
.
y1
;
x
2
=
oSrc
.
x2
;
y
2
=
oSrc
.
y2
;
x
3
=
oSrc
.
x3
;
y
3
=
oSrc
.
y3
;
x
[
0
]
=
oSrc
.
x
[
0
]
;
y
[
0
]
=
oSrc
.
y
[
0
]
;
x
[
1
]
=
oSrc
.
x
[
1
]
;
y
[
1
]
=
oSrc
.
y
[
1
]
;
x
[
2
]
=
oSrc
.
x
[
2
]
;
y
[
2
]
=
oSrc
.
y
[
2
]
;
return
*
this
;
}
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
XmlUtils
::
CXmlNodes
oNodes
;
...
...
@@ -73,23 +73,53 @@ namespace PPTX
XmlUtils
::
CXmlNode
oNode
;
oNodes
.
GetAt
(
0
,
oNode
);
x
1
=
oNode
.
GetAttribute
(
_T
(
"x"
));
y
1
=
oNode
.
GetAttribute
(
_T
(
"y"
));
x
[
0
]
=
oNode
.
GetAttribute
(
_T
(
"x"
));
y
[
0
]
=
oNode
.
GetAttribute
(
_T
(
"y"
));
oNodes
.
GetAt
(
1
,
oNode
);
x
2
=
oNode
.
GetAttribute
(
_T
(
"x"
));
y
2
=
oNode
.
GetAttribute
(
_T
(
"y"
));
x
[
1
]
=
oNode
.
GetAttribute
(
_T
(
"x"
));
y
[
1
]
=
oNode
.
GetAttribute
(
_T
(
"y"
));
oNodes
.
GetAt
(
2
,
oNode
);
x3
=
oNode
.
GetAttribute
(
_T
(
"x"
));
y3
=
oNode
.
GetAttribute
(
_T
(
"y"
));
x
[
2
]
=
oNode
.
GetAttribute
(
_T
(
"x"
));
y
[
2
]
=
oNode
.
GetAttribute
(
_T
(
"y"
));
}
}
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_cubicBezTo
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
count
=
0
;
int
nParentDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nParentDepth
)
)
{
std
::
wstring
sName
=
oReader
.
GetName
();
if
(
sName
==
L"a:pos"
)
{
ReadAttributes2
(
oReader
,
x
[
count
],
y
[
count
]);
count
++
;
}
}
}
void
ReadAttributes2
(
XmlUtils
::
CXmlLiteReader
&
oReader
,
std
::
wstring
&
x
,
std
::
wstring
&
y
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"x"
),
x
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"y"
),
y
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
std
::
wstring
toXML
()
const
{
std
::
wstring
str1
=
L"<a:pt x=
\"
"
+
x
1
+
L"
\"
y=
\"
"
+
y1
+
L"
\"
/>"
;
std
::
wstring
str2
=
L"<a:pt x=
\"
"
+
x
2
+
L"
\"
y=
\"
"
+
y2
+
L"
\"
/>"
;
std
::
wstring
str3
=
L"<a:pt x=
\"
"
+
x
3
+
L"
\"
y=
\"
"
+
y3
+
L"
\"
/>"
;
std
::
wstring
str1
=
L"<a:pt x=
\"
"
+
x
[
0
]
+
L"
\"
y=
\"
"
+
y
[
0
]
+
L"
\"
/>"
;
std
::
wstring
str2
=
L"<a:pt x=
\"
"
+
x
[
1
]
+
L"
\"
y=
\"
"
+
y
[
1
]
+
L"
\"
/>"
;
std
::
wstring
str3
=
L"<a:pt x=
\"
"
+
x
[
2
]
+
L"
\"
y=
\"
"
+
y
[
2
]
+
L"
\"
/>"
;
return
_T
(
"<a:cubicBezTo>"
)
+
str1
+
str2
+
str3
+
_T
(
"</a:cubicBezTo>"
);
}
...
...
@@ -101,22 +131,22 @@ namespace PPTX
pWriter
->
StartNode
(
_T
(
"a:pt"
));
pWriter
->
StartAttributes
();
pWriter
->
WriteAttribute
(
_T
(
"x"
),
x
1
);
pWriter
->
WriteAttribute
(
_T
(
"y"
),
y
1
);
pWriter
->
WriteAttribute
(
_T
(
"x"
),
x
[
0
]
);
pWriter
->
WriteAttribute
(
_T
(
"y"
),
y
[
0
]
);
pWriter
->
EndAttributes
();
pWriter
->
EndNode
(
_T
(
"a:pt"
));
pWriter
->
StartNode
(
_T
(
"a:pt"
));
pWriter
->
StartAttributes
();
pWriter
->
WriteAttribute
(
_T
(
"x"
),
x
2
);
pWriter
->
WriteAttribute
(
_T
(
"y"
),
y
2
);
pWriter
->
WriteAttribute
(
_T
(
"x"
),
x
[
1
]
);
pWriter
->
WriteAttribute
(
_T
(
"y"
),
y
[
1
]
);
pWriter
->
EndAttributes
();
pWriter
->
EndNode
(
_T
(
"a:pt"
));
pWriter
->
StartNode
(
_T
(
"a:pt"
));
pWriter
->
StartAttributes
();
pWriter
->
WriteAttribute
(
_T
(
"x"
),
x
3
);
pWriter
->
WriteAttribute
(
_T
(
"y"
),
y
3
);
pWriter
->
WriteAttribute
(
_T
(
"x"
),
x
[
2
]
);
pWriter
->
WriteAttribute
(
_T
(
"y"
),
y
[
2
]
);
pWriter
->
EndAttributes
();
pWriter
->
EndNode
(
_T
(
"a:pt"
));
...
...
@@ -128,33 +158,29 @@ namespace PPTX
pWriter
->
StartRecord
(
GEOMETRY_TYPE_PATH_CUBICBEZTO
);
pWriter
->
WriteBYTE
(
NSBinPptxRW
::
g_nodeAttributeStart
);
pWriter
->
WriteString1
(
0
,
x
1
);
pWriter
->
WriteString1
(
1
,
y
1
);
pWriter
->
WriteString1
(
2
,
x
2
);
pWriter
->
WriteString1
(
3
,
y
2
);
pWriter
->
WriteString1
(
4
,
x
3
);
pWriter
->
WriteString1
(
5
,
y
3
);
pWriter
->
WriteString1
(
0
,
x
[
0
]
);
pWriter
->
WriteString1
(
1
,
y
[
0
]
);
pWriter
->
WriteString1
(
2
,
x
[
1
]
);
pWriter
->
WriteString1
(
3
,
y
[
1
]
);
pWriter
->
WriteString1
(
4
,
x
[
2
]
);
pWriter
->
WriteString1
(
5
,
y
[
2
]
);
pWriter
->
WriteBYTE
(
NSBinPptxRW
::
g_nodeAttributeEnd
);
pWriter
->
EndRecord
();
}
public:
std
::
wstring
x1
;
std
::
wstring
y1
;
std
::
wstring
x2
;
std
::
wstring
y2
;
std
::
wstring
x3
;
std
::
wstring
y3
;
std
::
wstring
x
[
3
];
std
::
wstring
y
[
3
];
protected:
virtual
void
FillParentPointersForChilds
(){};
public:
virtual
std
::
wstring
GetODString
()
const
{
std
::
wstring
str1
=
L"<pt x=
\"
"
+
x
1
+
L"
\"
y=
\"
"
+
y1
+
L"
\"
/>"
;
std
::
wstring
str2
=
L"<pt x=
\"
"
+
x
2
+
L"
\"
y=
\"
"
+
y2
+
L"
\"
/>"
;
std
::
wstring
str3
=
L"<pt x=
\"
"
+
x
3
+
L"
\"
y=
\"
"
+
y3
+
L"
\"
/>"
;
std
::
wstring
str1
=
L"<pt x=
\"
"
+
x
[
0
]
+
L"
\"
y=
\"
"
+
y
[
0
]
+
L"
\"
/>"
;
std
::
wstring
str2
=
L"<pt x=
\"
"
+
x
[
1
]
+
L"
\"
y=
\"
"
+
y
[
1
]
+
L"
\"
/>"
;
std
::
wstring
str3
=
L"<pt x=
\"
"
+
x
[
2
]
+
L"
\"
y=
\"
"
+
y
[
2
]
+
L"
\"
/>"
;
return
_T
(
"<cubicBezTo>"
)
+
str1
+
str2
+
str3
+
_T
(
"</cubicBezTo>"
);
}
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Path2D/LineTo.h
View file @
037c4046
...
...
@@ -43,7 +43,8 @@ namespace PPTX
class
LineTo
:
public
PathBase
{
public:
PPTX_LOGIC_BASE
(
LineTo
)
WritingElement_AdditionConstructors
(
LineTo
)
PPTX_LOGIC_BASE2
(
LineTo
)
LineTo
&
operator
=
(
const
LineTo
&
oSrc
)
{
...
...
@@ -55,7 +56,33 @@ namespace PPTX
return
*
this
;
}
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_lineTo
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nParentDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nParentDepth
)
)
{
std
::
wstring
sName
=
oReader
.
GetName
();
if
(
sName
==
L"a:pos"
)
{
ReadAttributes2
(
oReader
);
}
}
}
void
ReadAttributes2
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"x"
),
x
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"y"
),
y
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
XmlUtils
::
CXmlNode
oNode
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Path2D/MoveTo.h
View file @
037c4046
...
...
@@ -43,7 +43,8 @@ namespace PPTX
class
MoveTo
:
public
PathBase
{
public:
PPTX_LOGIC_BASE
(
MoveTo
)
WritingElement_AdditionConstructors
(
MoveTo
)
PPTX_LOGIC_BASE2
(
MoveTo
)
MoveTo
&
operator
=
(
const
MoveTo
&
oSrc
)
{
...
...
@@ -54,8 +55,34 @@ namespace PPTX
y
=
oSrc
.
y
;
return
*
this
;
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_moveTo
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nParentDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nParentDepth
)
)
{
std
::
wstring
sName
=
oReader
.
GetName
();
public:
if
(
sName
==
L"a:pos"
)
{
ReadAttributes2
(
oReader
);
}
}
}
void
ReadAttributes2
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"x"
),
x
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"y"
),
y
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
XmlUtils
::
CXmlNode
oNode
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Path2D/QuadBezTo.h
View file @
037c4046
...
...
@@ -42,21 +42,52 @@ namespace PPTX
class
QuadBezTo
:
public
PathBase
{
public:
PPTX_LOGIC_BASE
(
QuadBezTo
)
WritingElement_AdditionConstructors
(
QuadBezTo
)
PPTX_LOGIC_BASE2
(
QuadBezTo
)
QuadBezTo
&
operator
=
(
const
QuadBezTo
&
oSrc
)
{
parentFile
=
oSrc
.
parentFile
;
parentElement
=
oSrc
.
parentElement
;
x
1
=
oSrc
.
x1
;
y
1
=
oSrc
.
y1
;
x
2
=
oSrc
.
x2
;
y
2
=
oSrc
.
y2
;
x
[
0
]
=
oSrc
.
x
[
0
]
;
y
[
0
]
=
oSrc
.
y
[
0
]
;
x
[
1
]
=
oSrc
.
x
[
1
]
;
y
[
1
]
=
oSrc
.
y
[
1
]
;
return
(
*
this
);
}
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_quadBezTo
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
count
=
0
;
int
nParentDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nParentDepth
)
)
{
std
::
wstring
sName
=
oReader
.
GetName
();
if
(
sName
==
L"a:pos"
)
{
ReadAttributes2
(
oReader
,
x
[
count
],
y
[
count
]);
count
++
;
}
}
}
void
ReadAttributes2
(
XmlUtils
::
CXmlLiteReader
&
oReader
,
std
::
wstring
&
x
,
std
::
wstring
&
y
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"x"
),
x
)
WritingElement_ReadAttributes_Read_else_if
(
oReader
,
_T
(
"y"
),
y
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
XmlUtils
::
CXmlNodes
oNodes
;
...
...
@@ -69,19 +100,19 @@ namespace PPTX
XmlUtils
::
CXmlNode
oNode
;
oNodes
.
GetAt
(
0
,
oNode
);
x
1
=
oNode
.
GetAttribute
(
_T
(
"x"
));
y
1
=
oNode
.
GetAttribute
(
_T
(
"y"
));
x
[
0
]
=
oNode
.
GetAttribute
(
_T
(
"x"
));
y
[
0
]
=
oNode
.
GetAttribute
(
_T
(
"y"
));
oNodes
.
GetAt
(
1
,
oNode
);
x
2
=
oNode
.
GetAttribute
(
_T
(
"x"
));
y
2
=
oNode
.
GetAttribute
(
_T
(
"y"
));
x
[
1
]
=
oNode
.
GetAttribute
(
_T
(
"x"
));
y
[
1
]
=
oNode
.
GetAttribute
(
_T
(
"y"
));
}
}
}
virtual
std
::
wstring
toXML
()
const
{
std
::
wstring
str1
=
L"<a:pt x=
\"
"
+
x
1
+
L"
\"
y=
\"
"
+
y1
+
L"
\"
/>"
;
std
::
wstring
str2
=
L"<a:pt x=
\"
"
+
x
2
+
L"
\"
y=
\"
"
+
y2
+
L"
\"
/>"
;
std
::
wstring
str1
=
L"<a:pt x=
\"
"
+
x
[
0
]
+
L"
\"
y=
\"
"
+
y
[
0
]
+
L"
\"
/>"
;
std
::
wstring
str2
=
L"<a:pt x=
\"
"
+
x
[
1
]
+
L"
\"
y=
\"
"
+
y
[
1
]
+
L"
\"
/>"
;
return
_T
(
"<a:quadBezTo>"
)
+
str1
+
str2
+
_T
(
"</a:quadBezTo>"
);
}
...
...
@@ -93,15 +124,15 @@ namespace PPTX
pWriter
->
StartNode
(
_T
(
"a:pt"
));
pWriter
->
StartAttributes
();
pWriter
->
WriteAttribute
(
_T
(
"x"
),
x
1
);
pWriter
->
WriteAttribute
(
_T
(
"y"
),
y
1
);
pWriter
->
WriteAttribute
(
_T
(
"x"
),
x
[
0
]
);
pWriter
->
WriteAttribute
(
_T
(
"y"
),
y
[
0
]
);
pWriter
->
EndAttributes
();
pWriter
->
EndNode
(
_T
(
"a:pt"
));
pWriter
->
StartNode
(
_T
(
"a:pt"
));
pWriter
->
StartAttributes
();
pWriter
->
WriteAttribute
(
_T
(
"x"
),
x
2
);
pWriter
->
WriteAttribute
(
_T
(
"y"
),
y
2
);
pWriter
->
WriteAttribute
(
_T
(
"x"
),
x
[
1
]
);
pWriter
->
WriteAttribute
(
_T
(
"y"
),
y
[
1
]
);
pWriter
->
EndAttributes
();
pWriter
->
EndNode
(
_T
(
"a:pt"
));
...
...
@@ -113,27 +144,25 @@ namespace PPTX
pWriter
->
StartRecord
(
GEOMETRY_TYPE_PATH_QUADBEZTO
);
pWriter
->
WriteBYTE
(
NSBinPptxRW
::
g_nodeAttributeStart
);
pWriter
->
WriteString1
(
0
,
x
1
);
pWriter
->
WriteString1
(
1
,
y
1
);
pWriter
->
WriteString1
(
2
,
x
2
);
pWriter
->
WriteString1
(
3
,
y
2
);
pWriter
->
WriteString1
(
0
,
x
[
0
]
);
pWriter
->
WriteString1
(
1
,
y
[
0
]
);
pWriter
->
WriteString1
(
2
,
x
[
1
]
);
pWriter
->
WriteString1
(
3
,
y
[
1
]
);
pWriter
->
WriteBYTE
(
NSBinPptxRW
::
g_nodeAttributeEnd
);
pWriter
->
EndRecord
();
}
public:
std
::
wstring
x1
;
std
::
wstring
y1
;
std
::
wstring
x2
;
std
::
wstring
y2
;
std
::
wstring
x
[
2
];
std
::
wstring
y
[
2
];
protected:
virtual
void
FillParentPointersForChilds
(){};
public:
virtual
std
::
wstring
GetODString
()
const
{
std
::
wstring
str1
=
L"<a:pt x=
\"
"
+
x
1
+
L"
\"
y=
\"
"
+
y1
+
L"
\"
/>"
;
std
::
wstring
str2
=
L"<a:pt x=
\"
"
+
x
2
+
L"
\"
y=
\"
"
+
y2
+
L"
\"
/>"
;
std
::
wstring
str1
=
L"<a:pt x=
\"
"
+
x
[
0
]
+
L"
\"
y=
\"
"
+
y
[
0
]
+
L"
\"
/>"
;
std
::
wstring
str2
=
L"<a:pt x=
\"
"
+
x
[
1
]
+
L"
\"
y=
\"
"
+
y
[
1
]
+
L"
\"
/>"
;
return
_T
(
"<quadBezTo>"
)
+
str1
+
str2
+
_T
(
"</quadBezTo>"
);
}
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/PrstGeom.h
View file @
037c4046
...
...
@@ -44,7 +44,8 @@ namespace PPTX
class
PrstGeom
:
public
WrapperWritingElement
{
public:
PPTX_LOGIC_BASE
(
PrstGeom
)
WritingElement_AdditionConstructors
(
PrstGeom
)
PPTX_LOGIC_BASE2
(
PrstGeom
)
PrstGeom
&
operator
=
(
const
PrstGeom
&
oSrc
)
{
...
...
@@ -56,8 +57,47 @@ namespace PPTX
return
*
this
;
}
public:
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_prstGeom
;
}
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
(
sName
==
L"a:avLst"
)
{
int
nParentDepth1
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nParentDepth1
)
)
{
std
::
wstring
sName1
=
oReader
.
GetName
();
if
(
sName1
==
L"a:gd"
)
{
Gd
gd
;
avLst
.
push_back
(
gd
);
avLst
.
back
().
fromXML
(
oReader
);
}
}
}
}
FillParentPointersForChilds
();
}
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_ReadSingle
(
oReader
,
_T
(
"r:prst"
),
prst
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
node
.
ReadAttributeBase
(
L"prst"
,
prst
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/PrstTxWarp.h
View file @
037c4046
...
...
@@ -44,7 +44,8 @@ namespace PPTX
class
PrstTxWarp
:
public
WrapperWritingElement
{
public:
PPTX_LOGIC_BASE
(
PrstTxWarp
)
WritingElement_AdditionConstructors
(
PrstTxWarp
)
PPTX_LOGIC_BASE2
(
PrstTxWarp
)
PrstTxWarp
&
operator
=
(
const
PrstTxWarp
&
oSrc
)
{
...
...
@@ -56,8 +57,45 @@ namespace PPTX
return
*
this
;
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_a_prstTxWarp
;
}
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
(
"a:avLst"
)
==
strName
)
{
int
nCurDepth1
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth1
)
)
{
std
::
wstring
strName1
=
oReader
.
GetName
();
if
(
_T
(
"a:gd"
)
==
strName1
)
{
Gd
gd
;
avLst
.
push_back
(
gd
);
avLst
.
back
().
fromXML
(
oReader
);
}
}
}
}
}
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
)
{
node
.
ReadAttributeBase
(
L"prst"
,
prst
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Shape.cpp
View file @
037c4046
...
...
@@ -176,7 +176,7 @@ namespace PPTX
if
(
pWriter
->
m_lDocType
!=
XMLWRITER_DOC_TYPE_DOCX
)
{
if
(
pWriter
->
m_lDocType
==
XMLWRITER_DOC_TYPE_XLSX
&&
txBody
.
is_init
())
txBody
->
m_n
s
=
_T
(
"xdr
"
);
txBody
->
m_n
ame
=
_T
(
"xdr:txBody
"
);
pWriter
->
Write
(
txBody
);
}
...
...
@@ -198,7 +198,7 @@ namespace PPTX
}
else
if
(
txBody
.
is_init
())
{
txBody
->
m_n
s
=
_T
(
"wps
"
);
txBody
->
m_n
ame
=
_T
(
"wps:txBody
"
);
pWriter
->
Write
(
txBody
);
}
...
...
@@ -371,7 +371,7 @@ namespace PPTX
pWriter
->
m_pMainDocument
->
getBinaryContent
(
strContent
,
*
pWriter
,
lDataSize
);
pWriter
->
EndRecord
();
pWriter
->
WriteRecord
1
(
5
,
txBody
->
bodyPr
);
pWriter
->
WriteRecord
2
(
5
,
txBody
->
bodyPr
);
}
}
else
...
...
@@ -597,7 +597,9 @@ namespace PPTX
if
(
!
shape
.
txBody
.
is_init
())
shape
.
txBody
=
new
TxBody
();
txBody
->
bodyPr
.
Merge
(
shape
.
txBody
->
bodyPr
);
if
(
txBody
->
bodyPr
.
IsInit
())
txBody
->
bodyPr
->
Merge
(
shape
.
txBody
->
bodyPr
);
if
(
txBody
->
lstStyle
.
is_init
())
{
for
(
int
i
=
0
;
i
<
10
;
i
++
)
...
...
@@ -738,9 +740,9 @@ namespace PPTX
if
(
txBody
.
is_init
())
{
if
(
txBody
->
bodyPr
.
anchor
.
is_init
())
if
(
txBody
->
bodyPr
.
IsInit
()
&&
txBody
->
bodyPr
->
anchor
.
is_init
())
{
std
::
wstring
_strAnchor
=
txBody
->
bodyPr
.
anchor
->
get
();
std
::
wstring
_strAnchor
=
txBody
->
bodyPr
->
anchor
->
get
();
if
(
_strAnchor
==
L"t"
)
oStylesWriter
.
WriteAttributeCSS
(
L"v-text-anchor"
,
L"top"
);
else
if
(
_strAnchor
==
L"b"
)
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/ShapeProperties.cpp
View file @
037c4046
...
...
@@ -65,7 +65,9 @@ namespace PPTX
{
if
(
Src
.
IsInit
())
{
Src
->
bodyPr
.
Merge
(
bodyPr
);
if
(
Src
->
bodyPr
.
IsInit
())
Src
->
bodyPr
->
Merge
(
bodyPr
);
if
(
Src
->
lstStyle
.
IsInit
())
{
for
(
int
i
=
0
;
i
<
10
;
i
++
)
...
...
@@ -753,7 +755,9 @@ namespace PPTX
void
ShapeProperties
::
SetParentFilePointer
(
const
WrapperFile
*
pFile
)
{
bodyPr
.
SetParentFilePointer
(
pFile
);
if
(
bodyPr
.
IsInit
())
bodyPr
->
SetParentFilePointer
(
pFile
);
for
(
int
i
=
0
;
i
<
10
;
i
++
)
{
levels
[
i
]
->
SetParentFilePointer
(
pFile
);
...
...
@@ -766,45 +770,53 @@ namespace PPTX
DWORD
ShapeProperties
::
GetHyperlinkRGBA
()
const
{
if
(
bodyPr
.
parentFileIs
<
Slide
>
())
return
bodyPr
.
parentFileAs
<
Slide
>
().
GetRGBAFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
.
parentFileIs
<
SlideLayout
>
())
return
bodyPr
.
parentFileAs
<
SlideLayout
>
().
GetRGBAFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
.
parentFileIs
<
SlideMaster
>
())
return
bodyPr
.
parentFileAs
<
SlideMaster
>
().
GetRGBAFromMap
(
_T
(
"hlink"
));
if
(
!
bodyPr
.
IsInit
())
return
0
;
if
(
bodyPr
->
parentFileIs
<
Slide
>
())
return
bodyPr
->
parentFileAs
<
Slide
>
().
GetRGBAFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
->
parentFileIs
<
SlideLayout
>
())
return
bodyPr
->
parentFileAs
<
SlideLayout
>
().
GetRGBAFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
->
parentFileIs
<
SlideMaster
>
())
return
bodyPr
->
parentFileAs
<
SlideMaster
>
().
GetRGBAFromMap
(
_T
(
"hlink"
));
else
return
0
;
}
DWORD
ShapeProperties
::
GetHyperlinkARGB
()
const
{
if
(
bodyPr
.
parentFileIs
<
Slide
>
())
return
bodyPr
.
parentFileAs
<
Slide
>
().
GetARGBFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
.
parentFileIs
<
SlideLayout
>
())
return
bodyPr
.
parentFileAs
<
SlideLayout
>
().
GetARGBFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
.
parentFileIs
<
SlideMaster
>
())
return
bodyPr
.
parentFileAs
<
SlideMaster
>
().
GetARGBFromMap
(
_T
(
"hlink"
));
if
(
!
bodyPr
.
IsInit
())
return
0
;
if
(
bodyPr
->
parentFileIs
<
Slide
>
())
return
bodyPr
->
parentFileAs
<
Slide
>
().
GetARGBFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
->
parentFileIs
<
SlideLayout
>
())
return
bodyPr
->
parentFileAs
<
SlideLayout
>
().
GetARGBFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
->
parentFileIs
<
SlideMaster
>
())
return
bodyPr
->
parentFileAs
<
SlideMaster
>
().
GetARGBFromMap
(
_T
(
"hlink"
));
else
return
0
;
}
DWORD
ShapeProperties
::
GetHyperlinkBGRA
()
const
{
if
(
bodyPr
.
parentFileIs
<
Slide
>
())
return
bodyPr
.
parentFileAs
<
Slide
>
().
GetBGRAFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
.
parentFileIs
<
SlideLayout
>
())
return
bodyPr
.
parentFileAs
<
SlideLayout
>
().
GetBGRAFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
.
parentFileIs
<
SlideMaster
>
())
return
bodyPr
.
parentFileAs
<
SlideMaster
>
().
GetBGRAFromMap
(
_T
(
"hlink"
));
if
(
!
bodyPr
.
IsInit
())
return
0
;
if
(
bodyPr
->
parentFileIs
<
Slide
>
())
return
bodyPr
->
parentFileAs
<
Slide
>
().
GetBGRAFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
->
parentFileIs
<
SlideLayout
>
())
return
bodyPr
->
parentFileAs
<
SlideLayout
>
().
GetBGRAFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
->
parentFileIs
<
SlideMaster
>
())
return
bodyPr
->
parentFileAs
<
SlideMaster
>
().
GetBGRAFromMap
(
_T
(
"hlink"
));
else
return
0
;
}
DWORD
ShapeProperties
::
GetHyperlinkABGR
()
const
{
if
(
bodyPr
.
parentFileIs
<
Slide
>
())
return
bodyPr
.
parentFileAs
<
Slide
>
().
GetABGRFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
.
parentFileIs
<
SlideLayout
>
())
return
bodyPr
.
parentFileAs
<
SlideLayout
>
().
GetABGRFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
.
parentFileIs
<
SlideMaster
>
())
return
bodyPr
.
parentFileAs
<
SlideMaster
>
().
GetABGRFromMap
(
_T
(
"hlink"
));
if
(
!
bodyPr
.
IsInit
())
return
0
;
if
(
bodyPr
->
parentFileIs
<
Slide
>
())
return
bodyPr
->
parentFileAs
<
Slide
>
().
GetABGRFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
->
parentFileIs
<
SlideLayout
>
())
return
bodyPr
->
parentFileAs
<
SlideLayout
>
().
GetABGRFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
->
parentFileIs
<
SlideMaster
>
())
return
bodyPr
->
parentFileAs
<
SlideMaster
>
().
GetABGRFromMap
(
_T
(
"hlink"
));
else
return
0
;
}
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/ShapeProperties.h
View file @
037c4046
...
...
@@ -56,7 +56,7 @@ namespace PPTX
nullable
<
FontRef
>
fontStyle
;
nullable
<
TextParagraphPr
>
levels
[
10
];
nullable
<
TextParagraphPr
>
masters
[
10
];
BodyPr
bodyPr
;
nullable
<
BodyPr
>
bodyPr
;
//std::string MajorLatin;
//std::string MinorLatin;
...
...
@@ -80,7 +80,7 @@ namespace PPTX
void
SetMajorLatin
(
const
TextFont
&
mjltFont
){
MajorLatin
=
mjltFont
;};
void
SetMinorLatin
(
const
TextFont
&
mnltFont
){
MinorLatin
=
mnltFont
;};
std
::
wstring
GetAnchor
()
const
{
return
bodyPr
.
anchor
.
get_value_or
(
_T
(
"t"
))
;};
std
::
wstring
GetAnchor
()
const
{
return
bodyPr
.
IsInit
()
?
bodyPr
->
anchor
.
get_value_or
(
L"t"
)
:
L"t"
;};
std
::
wstring
GetParagraphAlgn
(
int
level
,
const
nullable
<
TextParagraphPr
>&
pParagraph
)
const
;
int
GetParagraphLeftMargin
(
int
level
,
const
nullable
<
TextParagraphPr
>&
pParagraph
)
const
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/ShapeTextProperties.cpp
View file @
037c4046
...
...
@@ -101,7 +101,9 @@ namespace PPTX
{
if
(
Src
.
IsInit
())
{
Src
->
bodyPr
.
Merge
(
bodyPr
);
if
(
Src
->
bodyPr
.
IsInit
())
Src
->
bodyPr
->
Merge
(
bodyPr
);
if
(
Src
->
lstStyle
.
IsInit
())
{
for
(
int
i
=
0
;
i
<
10
;
i
++
)
...
...
@@ -589,48 +591,57 @@ namespace PPTX
DWORD
CShapeTextProperties
::
GetHyperlinkRGBA
()
const
{
if
(
bodyPr
.
parentFileIs
<
Slide
>
())
return
bodyPr
.
parentFileAs
<
Slide
>
().
GetRGBAFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
.
parentFileIs
<
SlideLayout
>
())
return
bodyPr
.
parentFileAs
<
SlideLayout
>
().
GetRGBAFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
.
parentFileIs
<
SlideMaster
>
())
return
bodyPr
.
parentFileAs
<
SlideMaster
>
().
GetRGBAFromMap
(
_T
(
"hlink"
));
if
(
!
bodyPr
.
IsInit
())
return
0
;
if
(
bodyPr
->
parentFileIs
<
Slide
>
())
return
bodyPr
->
parentFileAs
<
Slide
>
().
GetRGBAFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
->
parentFileIs
<
SlideLayout
>
())
return
bodyPr
->
parentFileAs
<
SlideLayout
>
().
GetRGBAFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
->
parentFileIs
<
SlideMaster
>
())
return
bodyPr
->
parentFileAs
<
SlideMaster
>
().
GetRGBAFromMap
(
_T
(
"hlink"
));
else
return
0
;
}
DWORD
CShapeTextProperties
::
GetHyperlinkARGB
()
const
{
if
(
bodyPr
.
parentFileIs
<
Slide
>
())
return
bodyPr
.
parentFileAs
<
Slide
>
().
GetARGBFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
.
parentFileIs
<
SlideLayout
>
())
return
bodyPr
.
parentFileAs
<
SlideLayout
>
().
GetARGBFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
.
parentFileIs
<
SlideMaster
>
())
return
bodyPr
.
parentFileAs
<
SlideMaster
>
().
GetARGBFromMap
(
_T
(
"hlink"
));
if
(
!
bodyPr
.
IsInit
())
return
0
;
if
(
bodyPr
->
parentFileIs
<
Slide
>
())
return
bodyPr
->
parentFileAs
<
Slide
>
().
GetARGBFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
->
parentFileIs
<
SlideLayout
>
())
return
bodyPr
->
parentFileAs
<
SlideLayout
>
().
GetARGBFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
->
parentFileIs
<
SlideMaster
>
())
return
bodyPr
->
parentFileAs
<
SlideMaster
>
().
GetARGBFromMap
(
_T
(
"hlink"
));
else
return
0
;
}
DWORD
CShapeTextProperties
::
GetHyperlinkBGRA
()
const
{
if
(
bodyPr
.
parentFileIs
<
Slide
>
())
return
bodyPr
.
parentFileAs
<
Slide
>
().
GetBGRAFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
.
parentFileIs
<
SlideLayout
>
())
return
bodyPr
.
parentFileAs
<
SlideLayout
>
().
GetBGRAFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
.
parentFileIs
<
SlideMaster
>
())
return
bodyPr
.
parentFileAs
<
SlideMaster
>
().
GetBGRAFromMap
(
_T
(
"hlink"
));
if
(
!
bodyPr
.
IsInit
())
return
0
;
if
(
bodyPr
->
parentFileIs
<
Slide
>
())
return
bodyPr
->
parentFileAs
<
Slide
>
().
GetBGRAFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
->
parentFileIs
<
SlideLayout
>
())
return
bodyPr
->
parentFileAs
<
SlideLayout
>
().
GetBGRAFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
->
parentFileIs
<
SlideMaster
>
())
return
bodyPr
->
parentFileAs
<
SlideMaster
>
().
GetBGRAFromMap
(
_T
(
"hlink"
));
else
return
0
;
}
DWORD
CShapeTextProperties
::
GetHyperlinkABGR
()
const
{
if
(
bodyPr
.
parentFileIs
<
Slide
>
())
return
bodyPr
.
parentFileAs
<
Slide
>
().
GetABGRFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
.
parentFileIs
<
SlideLayout
>
())
return
bodyPr
.
parentFileAs
<
SlideLayout
>
().
GetABGRFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
.
parentFileIs
<
SlideMaster
>
())
return
bodyPr
.
parentFileAs
<
SlideMaster
>
().
GetABGRFromMap
(
_T
(
"hlink"
));
if
(
!
bodyPr
.
IsInit
())
return
0
;
if
(
bodyPr
->
parentFileIs
<
Slide
>
())
return
bodyPr
->
parentFileAs
<
Slide
>
().
GetABGRFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
->
parentFileIs
<
SlideLayout
>
())
return
bodyPr
->
parentFileAs
<
SlideLayout
>
().
GetABGRFromMap
(
_T
(
"hlink"
));
else
if
(
bodyPr
->
parentFileIs
<
SlideMaster
>
())
return
bodyPr
->
parentFileAs
<
SlideMaster
>
().
GetABGRFromMap
(
_T
(
"hlink"
));
else
return
0
;
}
void
CShapeTextProperties
::
SetParentFilePointer
(
const
WrapperFile
*
pFile
)
{
bodyPr
.
SetParentFilePointer
(
pFile
);
if
(
bodyPr
.
IsInit
())
bodyPr
->
SetParentFilePointer
(
pFile
);
m_pFile
=
pFile
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/ShapeTextProperties.h
View file @
037c4046
...
...
@@ -48,11 +48,11 @@ namespace PPTX
class
CFontInfo
{
public:
LONG
FontRef
;
LONG
FontRef
;
std
::
wstring
strFontName
;
std
::
wstring
strPanose
;
std
::
wstring
strPitchFamily
;
BYTE
Charset
;
std
::
wstring
strPanose
;
std
::
wstring
strPitchFamily
;
BYTE
Charset
;
public:
CFontInfo
()
...
...
@@ -90,7 +90,7 @@ namespace PPTX
LONG
m_lTextType
;
nullable
<
TextParagraphPr
>
m_levels
[
10
];
nullable
<
TextParagraphPr
>
m_body
[
10
];
BodyPr
bodyPr
;
nullable
<
BodyPr
>
bodyPr
;
// просто указатель - он должен выставиться из темы
std
::
vector
<
nullable
<
TextParagraphPr
>*>*
m_masters
;
...
...
@@ -135,7 +135,7 @@ namespace PPTX
return
-
1
;
}
std
::
wstring
GetAnchor
()
const
{
return
bodyPr
.
anchor
.
get_value_or
(
_T
(
"t"
));
};
std
::
wstring
GetAnchor
()
const
{
return
bodyPr
.
IsInit
()
?
bodyPr
->
anchor
.
get_value_or
(
L"t"
)
:
L"t"
;
};
nullable_base
<
WORD
>
GetParagraphAlgn
(
int
level
,
const
nullable
<
TextParagraphPr
>&
pParagraph
)
const
;
nullable_base
<
LONG
>
GetParagraphLeftMargin
(
int
level
,
const
nullable
<
TextParagraphPr
>&
pParagraph
)
const
;
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/SpPr.cpp
View file @
037c4046
...
...
@@ -44,26 +44,73 @@ namespace PPTX
{
Fill
.
m_type
=
UniFill
::
notInit
;
}
SpPr
::~
SpPr
()
{
}
SpPr
::
SpPr
(
XmlUtils
::
CXmlNode
&
node
)
{
fromXML
(
node
);
}
SpPr
::
SpPr
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
fromXML
(
oReader
);
}
const
SpPr
&
SpPr
::
operator
=
(
XmlUtils
::
CXmlNode
&
node
)
{
fromXML
(
node
);
return
*
this
;
}
const
SpPr
&
SpPr
::
operator
=
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
fromXML
(
oReader
);
return
*
this
;
}
void
SpPr
::
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
m_namespace
=
XmlUtils
::
GetNamespace
(
oReader
.
GetName
());
ReadAttributes
(
oReader
);
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nParentDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nParentDepth
)
)
{
std
::
wstring
sName
=
XmlUtils
::
GetNameNoNS
(
oReader
.
GetName
());
if
(
L"xfrm"
==
sName
)
xfrm
=
oReader
;
else
if
(
L"ln"
==
sName
)
ln
=
oReader
;
else
if
(
L"scene3d"
==
sName
)
scene3d
=
oReader
;
else
if
(
L"sp3d"
==
sName
)
sp3d
=
oReader
;
else
if
(
L"blipFill"
==
sName
||
L"gradFill"
==
sName
||
L"grpFill"
==
sName
||
L"noFill"
==
sName
||
L"pattFill"
==
sName
||
L"solidFill"
==
sName
)
{
Fill
.
fromXML
(
oReader
);
}
else
if
(
L"effectDag"
==
sName
||
L"effectLst"
==
sName
||
L"extLst"
==
sName
)
{
EffectList
.
fromXML
(
oReader
);
}
else
if
(
L"prstGeom"
==
sName
||
L"custGeom"
==
sName
)
{
Geometry
.
fromXML
(
oReader
);
}
}
FillParentPointersForChilds
();
}
void
SpPr
::
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
m_namespace
=
XmlUtils
::
GetNamespace
(
node
.
GetName
());
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/SpPr.h
View file @
037c4046
...
...
@@ -57,12 +57,24 @@ namespace PPTX
explicit
SpPr
(
XmlUtils
::
CXmlNode
&
node
);
const
SpPr
&
operator
=
(
XmlUtils
::
CXmlNode
&
node
);
explicit
SpPr
(
XmlUtils
::
CXmlLiteReader
&
oReader
);
const
SpPr
&
operator
=
(
XmlUtils
::
CXmlLiteReader
&
oReader
);
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_
p
_spPr
;
return
OOX
::
et_
a
_spPr
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
);
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
);
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_ReadSingle
(
oReader
,
_T
(
"bwMode"
),
bwMode
)
WritingElement_ReadAttributes_End
(
oReader
)
}
virtual
std
::
wstring
toXML
()
const
;
virtual
void
toXmlWriter
(
NSBinPptxRW
::
CXmlWriter
*
pWriter
)
const
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/Table/TableCell.h
View file @
037c4046
...
...
@@ -148,7 +148,7 @@ namespace PPTX
{
txBody
=
new
Logic
::
TxBody
();
txBody
->
fromPPTY
(
pReader
);
txBody
->
m_ns
=
_T
(
"a
"
);
txBody
->
m_name
=
_T
(
"a:txBody
"
);
break
;
}
default:
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/TextListStyle.h
View file @
037c4046
...
...
@@ -44,9 +44,9 @@ namespace PPTX
class
TextListStyle
:
public
WrapperWritingElement
{
public:
PPTX_LOGIC_BASE
(
TextListStyle
)
WritingElement_AdditionConstructors
(
TextListStyle
)
PPTX_LOGIC_BASE2
(
TextListStyle
)
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
m_name
=
node
.
GetName
();
...
...
@@ -64,6 +64,44 @@ namespace PPTX
FillParentPointersForChilds
();
}
virtual
OOX
::
EElementType
getType
()
const
{
return
OOX
::
et_Unknown
;
//a_bodyStyle;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
m_name
=
oReader
.
GetName
();
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
XmlUtils
::
GetNameNoNS
(
oReader
.
GetName
());
if
(
_T
(
"defPPr"
)
==
strName
)
levels
[
9
]
=
oReader
;
else
if
(
_T
(
"lvl1pPr"
)
==
strName
)
levels
[
0
]
=
oReader
;
else
if
(
_T
(
"lvl2pPr"
)
==
strName
)
levels
[
1
]
=
oReader
;
else
if
(
_T
(
"lvl3pPr"
)
==
strName
)
levels
[
2
]
=
oReader
;
else
if
(
_T
(
"lvl4pPr"
)
==
strName
)
levels
[
3
]
=
oReader
;
else
if
(
_T
(
"lvl5pPr"
)
==
strName
)
levels
[
4
]
=
oReader
;
else
if
(
_T
(
"lvl6pPr"
)
==
strName
)
levels
[
5
]
=
oReader
;
else
if
(
_T
(
"lvl7pPr"
)
==
strName
)
levels
[
6
]
=
oReader
;
else
if
(
_T
(
"lvl8pPr"
)
==
strName
)
levels
[
7
]
=
oReader
;
else
if
(
_T
(
"lvl9pPr"
)
==
strName
)
levels
[
8
]
=
oReader
;
}
}
virtual
std
::
wstring
toXML
()
const
{
XmlUtils
::
CNodeValue
oValue
;
...
...
@@ -139,10 +177,8 @@ namespace PPTX
levels
[
i
]
->
Merge
(
lstStyle
->
levels
[
i
]);
}
public:
nullable
<
TextParagraphPr
>
levels
[
10
];
//private:
public:
mutable
std
::
wstring
m_name
;
nullable
<
TextParagraphPr
>
levels
[
10
];
mutable
std
::
wstring
m_name
;
protected:
virtual
void
FillParentPointersForChilds
()
{
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/TxBody.h
View file @
037c4046
...
...
@@ -49,15 +49,27 @@ namespace PPTX
public:
TxBody
()
{
m_n
s
=
_T
(
"p
"
);
m_n
ame
=
_T
(
"p:txBody
"
);
}
virtual
~
TxBody
()
{}
explicit
TxBody
(
XmlUtils
::
CXmlNode
&
node
)
{
fromXML
(
node
);
}
explicit
TxBody
(
XmlUtils
::
CXmlNode
&
node
)
{
fromXML
(
node
);
}
const
TxBody
&
operator
=
(
XmlUtils
::
CXmlNode
&
node
)
{
fromXML
(
node
);
return
*
this
;
}
explicit
TxBody
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
fromXML
(
oReader
);
}
const
TxBody
&
operator
=
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
fromXML
(
oReader
);
return
*
this
;
}
TxBody
(
const
TxBody
&
oSrc
)
{
*
this
=
oSrc
;
}
TxBody
&
operator
=
(
const
TxBody
&
oSrc
)
...
...
@@ -65,20 +77,49 @@ namespace PPTX
parentFile
=
oSrc
.
parentFile
;
parentElement
=
oSrc
.
parentElement
;
bodyPr
=
oSrc
.
bodyPr
;
lstStyle
=
oSrc
.
lstStyle
;
Paragrs
=
oSrc
.
Paragrs
;
bodyPr
=
oSrc
.
bodyPr
;
lstStyle
=
oSrc
.
lstStyle
;
Paragrs
=
oSrc
.
Paragrs
;
m_n
s
=
oSrc
.
m_ns
;
m_n
ame
=
oSrc
.
m_name
;
return
*
this
;
}
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
m_name
=
oReader
.
GetName
();
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
std
::
wstring
strName
=
oReader
.
GetName
();
if
(
_T
(
"a:bodyPr"
)
==
strName
)
{
bodyPr
=
oReader
;
}
else
if
(
_T
(
"a:lstStyle"
)
==
strName
)
{
lstStyle
=
oReader
;
}
else
if
(
_T
(
"a:p"
)
==
strName
)
{
Paragraph
p
;
Paragrs
.
push_back
(
p
);
Paragrs
.
back
().
fromXML
(
oReader
);
}
}
FillParentPointersForChilds
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
Paragrs
.
clear
();
m_name
=
node
.
GetName
();
bodyPr
=
node
.
ReadNode
(
_T
(
"a:bodyPr"
));
lstStyle
=
node
.
ReadNode
(
_T
(
"a:lstStyle"
));
...
...
@@ -89,22 +130,25 @@ namespace PPTX
virtual
std
::
wstring
toXML
()
const
{
XmlUtils
::
CNodeValue
oValue
;
oValue
.
Write
(
bodyPr
);
oValue
.
WriteNullable
(
bodyPr
);
oValue
.
WriteNullable
(
lstStyle
);
oValue
.
WriteArray
(
Paragrs
);
return
XmlUtils
::
CreateNode
(
_T
(
"p:txBody"
)
,
oValue
);
return
XmlUtils
::
CreateNode
(
m_name
,
oValue
);
}
virtual
void
toXmlWriter
(
NSBinPptxRW
::
CXmlWriter
*
pWriter
)
const
{
pWriter
->
StartNode
(
m_n
s
+
_T
(
":txBody"
)
);
pWriter
->
StartNode
(
m_n
ame
);
pWriter
->
EndAttributes
();
bodyPr
.
m_namespace
=
_T
(
"a"
);
bodyPr
.
toXmlWriter
(
pWriter
);
if
(
lstStyle
.
is_init
())
if
(
bodyPr
.
IsInit
())
{
bodyPr
->
m_namespace
=
_T
(
"a"
);
bodyPr
->
toXmlWriter
(
pWriter
);
}
if
(
lstStyle
.
IsInit
())
lstStyle
->
m_name
=
_T
(
"a:lstStyle"
);
pWriter
->
Write
(
lstStyle
);
...
...
@@ -112,7 +156,7 @@ namespace PPTX
for
(
size_t
i
=
0
;
i
<
nCount
;
++
i
)
Paragrs
[
i
].
toXmlWriter
(
pWriter
);
pWriter
->
EndNode
(
m_n
s
+
_T
(
":txBody"
)
);
pWriter
->
EndNode
(
m_n
ame
);
}
void
toXmlWriterExcel
(
NSBinPptxRW
::
CXmlWriter
*
pWriter
)
const
...
...
@@ -121,9 +165,11 @@ namespace PPTX
pWriter->StartNode(_T("c:rich"));
pWriter->EndAttributes();
*/
bodyPr
.
m_namespace
=
_T
(
"a"
);
bodyPr
.
toXmlWriter
(
pWriter
);
if
(
bodyPr
.
IsInit
())
{
bodyPr
->
m_namespace
=
_T
(
"a"
);
bodyPr
->
toXmlWriter
(
pWriter
);
}
if
(
lstStyle
.
is_init
())
lstStyle
->
m_name
=
_T
(
"a:lstStyle"
);
...
...
@@ -150,16 +196,18 @@ namespace PPTX
void
Merge
(
nullable
<
TxBody
>&
txBody
)
const
{
if
(
!
txBody
.
is_init
())
txBody
=
new
TxBody
();
bodyPr
.
Merge
(
txBody
->
bodyPr
);
if
(
lstStyle
.
is_init
())
if
(
!
txBody
.
is_init
())
return
;
if
(
bodyPr
.
IsInit
())
bodyPr
->
Merge
(
txBody
->
bodyPr
);
if
(
lstStyle
.
IsInit
())
lstStyle
->
Merge
(
txBody
->
lstStyle
);
}
virtual
void
toPPTY
(
NSBinPptxRW
::
CBinaryFileWriter
*
pWriter
)
const
{
pWriter
->
WriteRecord
1
(
0
,
bodyPr
);
pWriter
->
WriteRecord
2
(
0
,
bodyPr
);
pWriter
->
WriteRecord2
(
1
,
lstStyle
);
pWriter
->
WriteRecordArray
(
2
,
0
,
Paragrs
);
}
...
...
@@ -174,7 +222,8 @@ namespace PPTX
{
case
0
:
{
bodyPr
.
fromPPTY
(
pReader
);
bodyPr
=
new
Logic
::
BodyPr
();
bodyPr
->
fromPPTY
(
pReader
);
break
;
}
case
1
:
...
...
@@ -206,15 +255,17 @@ namespace PPTX
}
public:
BodyPr
bodyPr
;
nullable
<
BodyPr
>
bodyPr
;
nullable
<
TextListStyle
>
lstStyle
;
std
::
vector
<
Paragraph
>
Paragrs
;
std
::
wstring
m_ns
;
std
::
wstring
m_name
;
protected:
virtual
void
FillParentPointersForChilds
()
{
bodyPr
.
SetParentPointer
(
this
);
if
(
bodyPr
.
is_init
())
bodyPr
->
SetParentPointer
(
this
);
if
(
lstStyle
.
is_init
())
lstStyle
->
SetParentPointer
(
this
);
...
...
@@ -226,9 +277,11 @@ namespace PPTX
public:
bool
IsOneLineParagraphs
()
const
{
if
(
!
bodyPr
.
wrap
.
is_init
())
return
false
;
return
(
bodyPr
.
wrap
->
get
()
==
_T
(
"none"
));
if
(
!
bodyPr
.
is_init
())
return
false
;
if
(
!
bodyPr
->
wrap
.
is_init
())
return
false
;
return
(
bodyPr
->
wrap
->
get
()
==
_T
(
"none"
));
}
std
::
wstring
GetDocxTxBoxContent
(
NSBinPptxRW
::
CBinaryFileWriter
*
pWriter
,
const
nullable
<
PPTX
::
Logic
::
ShapeStyle
>&
shape_style
);
...
...
ASCOfficePPTXFile/PPTXFormat/Logic/UniPath2D.h
View file @
037c4046
...
...
@@ -49,9 +49,35 @@ namespace PPTX
class
UniPath2D
:
public
WrapperWritingElement
{
public:
PPTX_LOGIC_BASE
(
UniPath2D
)
WritingElement_AdditionConstructors
(
UniPath2D
)
PPTX_LOGIC_BASE2
(
UniPath2D
)
public:
virtual
OOX
::
EElementType
getType
()
const
{
if
(
Path2D
.
IsInit
())
return
Path2D
->
getType
();
return
OOX
::
et_Unknown
;
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
std
::
wstring
name
=
XmlUtils
::
GetNameNoNS
(
oReader
.
GetName
());
if
(
name
==
_T
(
"moveTo"
))
Path2D
.
reset
(
new
Logic
::
MoveTo
(
oReader
));
else
if
(
name
==
_T
(
"lnTo"
))
Path2D
.
reset
(
new
Logic
::
LineTo
(
oReader
));
else
if
(
name
==
_T
(
"cubicBezTo"
))
Path2D
.
reset
(
new
Logic
::
CubicBezTo
(
oReader
));
else
if
(
name
==
_T
(
"close"
))
Path2D
.
reset
(
new
Logic
::
Close
(
oReader
));
else
if
(
name
==
_T
(
"arcTo"
))
Path2D
.
reset
(
new
Logic
::
ArcTo
(
oReader
));
else
if
(
name
==
_T
(
"quadBezTo"
))
Path2D
.
reset
(
new
Logic
::
QuadBezTo
(
oReader
));
else
Path2D
.
reset
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
std
::
wstring
name
=
XmlUtils
::
GetNameNoNS
(
node
.
GetName
());
...
...
ASCOfficePPTXFile/PPTXLib/PPTXFormat.vcproj
View file @
037c4046
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType=
"Visual C++"
Version=
"8
,
00"
Version=
"8
.
00"
Name=
"PPTXFormat"
ProjectGUID=
"{36636678-AE25-4BE6-9A34-2561D1BCF302}"
RootNamespace=
"PPTXFormat"
...
...
Common/DocxFormat/Source/DocxFormat/WritingElement.h
View file @
037c4046
...
...
@@ -249,6 +249,7 @@ namespace OOX
et_a_latin
,
// <a:latin>
et_a_lightRig
,
// <a:lightRig>
et_a_lin
,
// <a:lin>
et_a_lineTo
,
// <a:lineTo>
et_a_ln
,
// <a:ln>
et_a_lnDef
,
// <a:lnDef>
et_a_lnRef
,
// <a:lnRef>
...
...
Common/DocxFormat/Source/XlsxFormat/Chart/ChartSerialize.cpp
View file @
037c4046
This diff is collapsed.
Click to expand it.
Common/DocxFormat/Source/XlsxFormat/Chart/ChartSerialize.h
View file @
037c4046
This diff is collapsed.
Click to expand it.
Common/DocxFormat/Source/XlsxFormat/CommonInclude.h
View file @
037c4046
...
...
@@ -41,6 +41,9 @@
#include "../DocxFormat/Drawing/DrawingTextProperties.h"
#include "../DocxFormat/Drawing/DrawingParagraph.h"
#include "../../../../ASCOfficePPTXFile/PPTXFormat/Logic/SpPr.h"
#include "../../../../ASCOfficePPTXFile/PPTXFormat/Logic/TxBody.h"
#include "ComplexTypes_Spreadsheet.h"
#include "FileTypes_Spreadsheet.h"
#include "WritingElement.h"
...
...
X2tConverter/test/win32Test/X2tTest.vcproj
View file @
037c4046
<?xml version="1.0" encoding="windows-1251"?>
<VisualStudioProject
ProjectType=
"Visual C++"
Version=
"8
,
00"
Version=
"8
.
00"
Name=
"X2tTest"
ProjectGUID=
"{355A22F4-1394-4B82-B2F1-FF0ECFB9E3EF}"
RootNamespace=
"X2tTest"
...
...
@@ -356,12 +356,16 @@
<Filter
Name=
"Common"
>
<File
RelativePath=
"..\..\..\XlsxSerializerCom\Writer\BinaryReader.h"
>
</File>
<File
RelativePath=
"..\..\..\XlsxSerializerCom\Common\BinReaderWriterDefines.h"
>
</File>
<File
RelativePath=
"..\..\..\XlsxSerializerCom\
Common\Common
.cpp"
RelativePath=
"..\..\..\XlsxSerializerCom\
Reader\ChartFromToBinary
.cpp"
>
<FileConfiguration
Name=
"Debug|Win32"
...
...
@@ -376,33 +380,16 @@
>
<Tool
Name=
"VCCLCompilerTool"
AdditionalOptions=
"/bigobj"
UsePrecompiledHeader=
"0"
/>
</FileConfiguration>
</File>
<File
RelativePath=
"..\..\..\XlsxSerializerCom\Common\Common.h"
>
</File>
<File
RelativePath=
"..\..\..\Common\FileDownloader\FileDownloader_win.cpp"
>
</File>
</Filter>
<Filter
Name=
"Reader"
>
<File
RelativePath=
"..\..\..\XlsxSerializerCom\Writer\BinaryCommonReader.h"
>
</File>
<File
RelativePath=
"..\..\..\XlsxSerializerCom\Writer\BinaryReader.h"
RelativePath=
"..\..\..\XlsxSerializerCom\Reader\ChartFromToBinary.h"
>
</File>
<File
RelativePath=
"..\..\..\XlsxSerializerCom\
Reader\CSVReader
.cpp"
RelativePath=
"..\..\..\XlsxSerializerCom\
Common\Common
.cpp"
>
<FileConfiguration
Name=
"Debug|Win32"
...
...
@@ -417,24 +404,29 @@
>
<Tool
Name=
"VCCLCompilerTool"
AdditionalOptions=
"/bigobj"
UsePrecompiledHeader=
"0"
/>
</FileConfiguration>
</File>
<File
RelativePath=
"..\..\..\XlsxSerializerCom\Reader\CSVReader.h"
RelativePath=
"..\..\..\XlsxSerializerCom\Common\Common.h"
>
</File>
<File
RelativePath=
"..\..\..\Common\FileDownloader\FileDownloader_win.cpp"
>
</File>
</Filter>
<Filter
Name=
"
Writ
er"
Name=
"
Read
er"
>
<File
RelativePath=
"..\..\..\XlsxSerializerCom\
Reader\BinaryWrit
er.h"
RelativePath=
"..\..\..\XlsxSerializerCom\
Writer\BinaryCommonRead
er.h"
>
</File>
<File
RelativePath=
"..\..\..\XlsxSerializerCom\Reader\C
hartFromToBinary
.cpp"
RelativePath=
"..\..\..\XlsxSerializerCom\Reader\C
SVReader
.cpp"
>
<FileConfiguration
Name=
"Debug|Win32"
...
...
@@ -454,7 +446,15 @@
</FileConfiguration>
</File>
<File
RelativePath=
"..\..\..\XlsxSerializerCom\Reader\ChartFromToBinary.h"
RelativePath=
"..\..\..\XlsxSerializerCom\Reader\CSVReader.h"
>
</File>
</Filter>
<Filter
Name=
"Writer"
>
<File
RelativePath=
"..\..\..\XlsxSerializerCom\Reader\BinaryWriter.h"
>
</File>
<File
...
...
XlsxSerializerCom/Reader/ChartFromToBinary.cpp
View file @
037c4046
This diff is collapsed.
Click to expand it.
XlsxSerializerCom/Reader/ChartFromToBinary.h
View file @
037c4046
...
...
@@ -59,7 +59,6 @@ namespace BinXlsxRW {
int
ReadCT_RelId
(
long
length
,
CT_RelId
*
poResult
);
private:
std
::
wstring
*
GetRecordXml
(
long
length
,
int
nRecordType
);
std
::
wstring
*
GetTxBodyXml
(
long
length
);
int
ReadCT_extLst
(
BYTE
type
,
long
length
,
void
*
poResult
);
int
ReadCT_ChartSpace
(
BYTE
type
,
long
length
,
void
*
poResult
);
...
...
@@ -201,6 +200,8 @@ namespace BinXlsxRW {
int
ReadAlternateContent
(
BYTE
type
,
long
length
,
void
*
poResult
);
int
ReadAlternateContentChoice
(
BYTE
type
,
long
length
,
void
*
poResult
);
int
ReadAlternateContentFallback
(
BYTE
type
,
long
length
,
void
*
poResult
);
int
ReadCT_SpPr
(
BYTE
type
,
long
length
,
void
*
poResult
);
int
ReadCT_TxPr
(
BYTE
type
,
long
length
,
void
*
poResult
);
};
class
BinaryChartWriter
{
...
...
@@ -348,15 +349,14 @@ namespace BinXlsxRW {
void
WriteAlternateContent
(
AlternateContent
&
oVal
);
void
WriteAlternateContentChoice
(
AlternateContentChoice
&
oVal
);
void
WriteAlternateContentFallback
(
AlternateContentFallback
&
oVal
);
private:
void
toBin
(
ItemsChoiceType5
eType
,
void
*
pVal
);
void
toBin
(
ItemsChoiceType6
eType
,
void
*
pVal
);
void
toBin
(
ItemsChoiceType4
eType
,
void
*
pVal
);
void
GetRecordBinary
(
int
nType
,
std
::
wstring
&
sXml
,
int
nRecordType
);
void
GetTxBodyBinary
(
int
nType
,
std
::
wstring
&
sXml
);
void
toBin
(
ItemsChoiceType3
eType
,
void
*
pVal
);
void
GetRecordBinary
(
int
nType
,
std
::
wstring
&
sXml
,
int
nRecordType
);
};
}
#endif // #ifndef CHART_FROM_TO_BINARY
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