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
51f8d63e
Commit
51f8d63e
authored
Apr 01, 2016
by
konovalovsergey
Committed by
Alexander Trofimov
May 21, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add wp14:sizeRelH/wp14:sizeRelV
parent
6a1cf1e4
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
379 additions
and
3 deletions
+379
-3
ASCOfficeDocxFile2/BinReader/ReaderClasses.h
ASCOfficeDocxFile2/BinReader/ReaderClasses.h
+14
-0
ASCOfficeDocxFile2/BinReader/Readers.h
ASCOfficeDocxFile2/BinReader/Readers.h
+48
-0
ASCOfficeDocxFile2/BinWriter/BinReaderWriterDefines.h
ASCOfficeDocxFile2/BinWriter/BinReaderWriterDefines.h
+9
-1
ASCOfficeDocxFile2/BinWriter/BinWriters.h
ASCOfficeDocxFile2/BinWriter/BinWriters.h
+46
-0
ASCOfficePPTXFile/ASCOfficeDrawingConverter.cpp
ASCOfficePPTXFile/ASCOfficeDrawingConverter.cpp
+11
-2
Common/DocxFormat/Source/Common/SimpleTypes_Drawing.h
Common/DocxFormat/Source/Common/SimpleTypes_Drawing.h
+98
-0
Common/DocxFormat/Source/DocxFormat/Drawing/Drawing.h
Common/DocxFormat/Source/DocxFormat/Drawing/Drawing.h
+151
-0
Common/DocxFormat/Source/DocxFormat/WritingElement.h
Common/DocxFormat/Source/DocxFormat/WritingElement.h
+2
-0
No files found.
ASCOfficeDocxFile2/BinReader/ReaderClasses.h
View file @
51f8d63e
...
...
@@ -1901,6 +1901,8 @@ public:
double
SimplePosY
;
CDrawingPropertyWrap
DrawingPropertyWrap
;
CString
sChartRels
;
CString
sSizeRelH
;
CString
sSizeRelV
;
int
m_nDocPr
;
bool
bDataPos
;
...
...
@@ -2180,7 +2182,19 @@ public:
if
(
bChart
)
sXml
.
AppendFormat
(
_T
(
"<wp:docPr id=
\"
%d
\"
name=
\"
Chart %d
\"
/><wp:cNvGraphicFramePr/><a:graphic xmlns:a=
\"
http://schemas.openxmlformats.org/drawingml/2006/main
\"
><a:graphicData uri=
\"
http://schemas.openxmlformats.org/drawingml/2006/chart
\"
><c:chart xmlns:c=
\"
http://schemas.openxmlformats.org/drawingml/2006/chart
\"
xmlns:r=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships
\"
r:id=
\"
%ls
\"
/></a:graphicData></a:graphic>"
),
m_nDocPr
,
m_nDocPr
,
(
const
TCHAR
*
)
sChartRels
);
else
{
sXml
.
AppendFormat
(
_T
(
"<wp:docPr id=
\"
%d
\"
name=
\"\"
/>"
),
m_nDocPr
);
sXml
.
Append
(
_T
(
"<wp:cNvGraphicFramePr/>"
));
}
if
(
!
sSizeRelH
.
IsEmpty
())
{
sXml
.
Append
(
sSizeRelH
);
}
if
(
!
sSizeRelV
.
IsEmpty
())
{
sXml
.
Append
(
sSizeRelV
);
}
sXml
.
Append
(
_T
(
"</wp:anchor>"
));
...
...
ASCOfficeDocxFile2/BinReader/Readers.h
View file @
51f8d63e
...
...
@@ -6238,6 +6238,18 @@ public:
{
res
=
Read2
(
length
,
&
Binary_DocumentTableReader
::
ReadSimplePos
,
this
,
poResult
);
}
else
if
(
c_oSerImageType2
::
SizeRelH
==
type
)
{
OOX
::
Drawing
::
CSizeRelH
oSizeRelH
;
res
=
Read2
(
length
,
&
Binary_DocumentTableReader
::
ReadSizeRelH
,
this
,
&
oSizeRelH
);
pDrawingProperty
->
sSizeRelH
=
oSizeRelH
.
toXML
();
}
else
if
(
c_oSerImageType2
::
SizeRelV
==
type
)
{
OOX
::
Drawing
::
CSizeRelV
oSizeRelV
;
res
=
Read2
(
length
,
&
Binary_DocumentTableReader
::
ReadSizeRelV
,
this
,
&
oSizeRelV
);
pDrawingProperty
->
sSizeRelV
=
oSizeRelV
.
toXML
();
}
else
if
(
c_oSerImageType2
::
WrapNone
==
type
)
{
pDrawingProperty
->
bDrawingPropertyWrap
=
true
;
...
...
@@ -6396,6 +6408,42 @@ public:
res
=
c_oSerConstants
::
ReadUnknown
;
return
res
;
}
int
ReadSizeRelH
(
BYTE
type
,
long
length
,
void
*
poResult
)
{
int
res
=
c_oSerConstants
::
ReadOk
;
OOX
::
Drawing
::
CSizeRelH
*
pSizeRelH
=
static_cast
<
OOX
::
Drawing
::
CSizeRelH
*>
(
poResult
);
if
(
c_oSerSizeRelHV
::
RelativeFrom
==
type
)
{
pSizeRelH
->
m_oRelativeFrom
.
Init
();
pSizeRelH
->
m_oRelativeFrom
->
SetValue
((
SimpleTypes
::
ESizeRelFromH
)
m_oBufferedStream
.
GetUChar
());
}
else
if
(
c_oSerSizeRelHV
::
Pct
==
type
)
{
pSizeRelH
->
m_oPctWidth
.
Init
();
pSizeRelH
->
m_oPctWidth
->
SetValue
(
m_oBufferedStream
.
GetDouble
());
}
else
res
=
c_oSerConstants
::
ReadUnknown
;
return
res
;
}
int
ReadSizeRelV
(
BYTE
type
,
long
length
,
void
*
poResult
)
{
int
res
=
c_oSerConstants
::
ReadOk
;
OOX
::
Drawing
::
CSizeRelV
*
pSizeRelV
=
static_cast
<
OOX
::
Drawing
::
CSizeRelV
*>
(
poResult
);
if
(
c_oSerSizeRelHV
::
RelativeFrom
==
type
)
{
pSizeRelV
->
m_oRelativeFrom
.
Init
();
pSizeRelV
->
m_oRelativeFrom
->
SetValue
((
SimpleTypes
::
ESizeRelFromV
)
m_oBufferedStream
.
GetUChar
());
}
else
if
(
c_oSerSizeRelHV
::
Pct
==
type
)
{
pSizeRelV
->
m_oPctHeight
.
Init
();
pSizeRelV
->
m_oPctHeight
->
SetValue
(
m_oBufferedStream
.
GetDouble
());
}
else
res
=
c_oSerConstants
::
ReadUnknown
;
return
res
;
}
int
ReadWrapThroughTight
(
BYTE
type
,
long
length
,
void
*
poResult
)
{
int
res
=
c_oSerConstants
::
ReadOk
;
...
...
ASCOfficeDocxFile2/BinWriter/BinReaderWriterDefines.h
View file @
51f8d63e
...
...
@@ -492,7 +492,10 @@ extern int g_nCurFormatVersion;
WrapTopAndBottom
=
22
,
Chart
=
23
,
ChartImg
=
24
,
Chart2
=
25
Chart2
=
25
,
CachedImage
=
26
,
SizeRelH
=
27
,
SizeRelV
=
28
};}
namespace
c_oSerEffectExtent
{
enum
c_oSerEffectExtent
{
...
...
@@ -513,6 +516,11 @@ extern int g_nCurFormatVersion;
PosOffset
=
2
,
PctOffset
=
3
};}
namespace
c_oSerSizeRelHV
{
enum
c_oSerSizeRelHV
{
RelativeFrom
=
0
,
Pct
=
1
};}
namespace
c_oSerSimplePos
{
enum
c_oSerSimplePos
{
X
=
0
,
...
...
ASCOfficeDocxFile2/BinWriter/BinWriters.h
View file @
51f8d63e
...
...
@@ -5298,6 +5298,22 @@ namespace BinDocxRW
WriteSimplePos
(
pAnchor
.
m_oSimplePos
.
get
());
m_oBcw
.
WriteItemWithLengthEnd
(
nCurPos
);
}
if
(
pAnchor
.
m_oSizeRelH
.
IsInit
())
{
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerImageType2
::
SizeRelH
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerPropLenType
::
Variable
);
nCurPos
=
m_oBcw
.
WriteItemWithLengthStart
();
WriteSizeRelH
(
pAnchor
.
m_oSizeRelH
.
get
());
m_oBcw
.
WriteItemWithLengthEnd
(
nCurPos
);
}
if
(
pAnchor
.
m_oSizeRelV
.
IsInit
())
{
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerImageType2
::
SizeRelV
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerPropLenType
::
Variable
);
nCurPos
=
m_oBcw
.
WriteItemWithLengthStart
();
WriteSizeRelV
(
pAnchor
.
m_oSizeRelV
.
get
());
m_oBcw
.
WriteItemWithLengthEnd
(
nCurPos
);
}
if
(
pAnchor
.
m_oWrapNone
.
IsInit
())
{
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerImageType2
::
WrapNone
);
...
...
@@ -5422,6 +5438,36 @@ namespace BinDocxRW
m_oBcw
.
m_oStream
.
WriteDouble
(
oPosV
.
m_oPctOffset
->
GetValue
());
}
}
void
WriteSizeRelH
(
const
OOX
::
Drawing
::
CSizeRelH
&
oSizeRelH
)
{
if
(
oSizeRelH
.
m_oRelativeFrom
.
IsInit
())
{
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerSizeRelHV
::
RelativeFrom
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerPropLenType
::
Byte
);
m_oBcw
.
m_oStream
.
WriteBYTE
((
BYTE
)
oSizeRelH
.
m_oRelativeFrom
->
GetValue
());
}
if
(
oSizeRelH
.
m_oPctWidth
.
IsInit
())
{
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerSizeRelHV
::
Pct
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerPropLenType
::
Double
);
m_oBcw
.
m_oStream
.
WriteDouble
(
oSizeRelH
.
m_oPctWidth
->
GetValue
());
}
}
void
WriteSizeRelV
(
const
OOX
::
Drawing
::
CSizeRelV
&
oSizeRelV
)
{
if
(
oSizeRelV
.
m_oRelativeFrom
.
IsInit
())
{
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerSizeRelHV
::
RelativeFrom
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerPropLenType
::
Byte
);
m_oBcw
.
m_oStream
.
WriteBYTE
((
BYTE
)
oSizeRelV
.
m_oRelativeFrom
->
GetValue
());
}
if
(
oSizeRelV
.
m_oPctHeight
.
IsInit
())
{
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerSizeRelHV
::
Pct
);
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerPropLenType
::
Double
);
m_oBcw
.
m_oStream
.
WriteDouble
(
oSizeRelV
.
m_oPctHeight
->
GetValue
());
}
}
void
WriteSimplePos
(
const
ComplexTypes
::
Drawing
::
CPoint2D
&
oSimplePos
)
{
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSerSimplePos
::
X
);
...
...
ASCOfficePPTXFile/ASCOfficeDrawingConverter.cpp
View file @
51f8d63e
...
...
@@ -3915,6 +3915,7 @@ HRESULT CDrawingConverter::SaveObject(LONG lStart, LONG lLength, const CString&
bool
bIsInline
=
false
;
CString
strMainProps
=
(
CString
)
bsMainProps
;
CString
strMainPropsTail
;
int
nIndexF
=
strMainProps
.
Find
(
_T
(
"</wp:inline>"
));
if
(
-
1
!=
nIndexF
)
{
...
...
@@ -3930,13 +3931,20 @@ HRESULT CDrawingConverter::SaveObject(LONG lStart, LONG lLength, const CString&
if
(
-
1
==
nIndexF
)
return
S_FALSE
;
int
nIndexTail
=
(
std
::
min
)(
strMainProps
.
Find
(
_T
(
"<wp14:sizeRelH"
)),
strMainProps
.
Find
(
_T
(
"<wp14:sizeRelV"
)));
if
(
-
1
!=
nIndexTail
)
{
strMainPropsTail
=
strMainProps
.
Right
(
strMainProps
.
GetLength
()
-
nIndexTail
);
strMainProps
=
strMainProps
.
Mid
(
0
,
nIndexTail
);
}
/*
CString strId = _T("");
strId.Format(_T("<wp:docPr id=\"%d\" name=\"\"/>"), m_pReader->GenerateNextId());
strMainProps += strId;
*/
strMainProps
+=
_T
(
"<wp:cNvGraphicFramePr/>"
);
//
strMainProps += _T("<wp:cNvGraphicFramePr/>");
m_pReader
->
Seek
(
lStart
);
...
...
@@ -4042,7 +4050,8 @@ HRESULT CDrawingConverter::SaveObject(LONG lStart, LONG lLength, const CString&
oElem
.
toXmlWriter
(
&
oXmlWriter
);
oXmlWriter
.
WriteString
(
_T
(
"</a:graphicData>\
</a:graphic>"
));
oXmlWriter
.
WriteString
(
strMainPropsTail
);
oXmlWriter
.
WriteString
(
bIsInline
?
_T
(
"</wp:inline>"
)
:
_T
(
"</wp:anchor>"
));
oXmlWriter
.
WriteString
(
_T
(
"</w:drawing>"
));
...
...
Common/DocxFormat/Source/Common/SimpleTypes_Drawing.h
View file @
51f8d63e
...
...
@@ -1976,6 +1976,13 @@ namespace SimpleTypes
return
sResult
;
}
virtual
CString
ToStringDecimalNumber
()
const
{
CString
sResult
;
sResult
.
Format
(
_T
(
"%d"
),
int
(
m_dValue
*
1000.0
)
);
return
sResult
;
}
SimpleType_FromString2
(
double
)
SimpleType_Operator_Equal
(
CPercentage
)
...
...
@@ -6055,8 +6062,99 @@ namespace SimpleTypes
SimpleType_Operator_Equal
(
CRelFromV
)
};
enum
ESizeRelFromH
{
sizerelfromhMargin
=
0
,
sizerelfromhPage
=
1
,
sizerelfromhLeftMargin
=
2
,
sizerelfromhRightMargin
=
3
,
sizerelfromhInsideMargin
=
4
,
sizerelfromhOutsideMargin
=
5
};
template
<
ESizeRelFromH
eDefValue
=
sizerelfromhPage
>
class
CSizeRelFromH
:
public
CSimpleType
<
ESizeRelFromH
,
eDefValue
>
{
public:
CSizeRelFromH
()
{}
virtual
ESizeRelFromH
FromString
(
CString
&
sValue
)
{
if
(
_T
(
"margin"
)
==
sValue
)
this
->
m_eValue
=
sizerelfromhMargin
;
else
if
(
_T
(
"page"
)
==
sValue
)
this
->
m_eValue
=
sizerelfromhPage
;
else
if
(
_T
(
"leftMargin"
)
==
sValue
)
this
->
m_eValue
=
sizerelfromhLeftMargin
;
else
if
(
_T
(
"rightMargin"
)
==
sValue
)
this
->
m_eValue
=
sizerelfromhRightMargin
;
else
if
(
_T
(
"insideMargin"
)
==
sValue
)
this
->
m_eValue
=
sizerelfromhInsideMargin
;
else
if
(
_T
(
"outsideMargin"
)
==
sValue
)
this
->
m_eValue
=
sizerelfromhOutsideMargin
;
else
this
->
m_eValue
=
eDefValue
;
return
this
->
m_eValue
;
}
virtual
CString
ToString
()
const
{
switch
(
this
->
m_eValue
)
{
case
sizerelfromhMargin
:
return
_T
(
"margin"
);
case
sizerelfromhPage
:
return
_T
(
"page"
);
case
sizerelfromhLeftMargin
:
return
_T
(
"leftMargin"
);
case
sizerelfromhRightMargin
:
return
_T
(
"rightMargin"
);
case
sizerelfromhInsideMargin
:
return
_T
(
"insideMargin"
);
case
sizerelfromhOutsideMargin
:
return
_T
(
"outsideMargin"
);
}
}
SimpleType_FromString
(
ESizeRelFromH
)
SimpleType_Operator_Equal
(
CSizeRelFromH
)
};
enum
ESizeRelFromV
{
sizerelfromvMargin
=
0
,
sizerelfromvPage
=
1
,
sizerelfromvTopMargin
=
2
,
sizerelfromvBottomMargin
=
3
,
sizerelfromvInsideMargin
=
4
,
sizerelfromvOutsideMargin
=
5
};
template
<
ESizeRelFromV
eDefValue
=
sizerelfromvPage
>
class
CSizeRelFromV
:
public
CSimpleType
<
ESizeRelFromV
,
eDefValue
>
{
public:
CSizeRelFromV
()
{}
virtual
ESizeRelFromV
FromString
(
CString
&
sValue
)
{
if
(
_T
(
"margin"
)
==
sValue
)
this
->
m_eValue
=
sizerelfromvMargin
;
else
if
(
_T
(
"page"
)
==
sValue
)
this
->
m_eValue
=
sizerelfromvPage
;
else
if
(
_T
(
"topMargin"
)
==
sValue
)
this
->
m_eValue
=
sizerelfromvTopMargin
;
else
if
(
_T
(
"bottomMargin"
)
==
sValue
)
this
->
m_eValue
=
sizerelfromvBottomMargin
;
else
if
(
_T
(
"insideMargin"
)
==
sValue
)
this
->
m_eValue
=
sizerelfromvInsideMargin
;
else
if
(
_T
(
"outsideMargin"
)
==
sValue
)
this
->
m_eValue
=
sizerelfromvOutsideMargin
;
else
this
->
m_eValue
=
eDefValue
;
return
this
->
m_eValue
;
}
virtual
CString
ToString
()
const
{
switch
(
this
->
m_eValue
)
{
case
sizerelfromvMargin
:
return
_T
(
"margin"
);
case
sizerelfromvPage
:
return
_T
(
"page"
);
case
sizerelfromvTopMargin
:
return
_T
(
"topMargin"
);
case
sizerelfromvBottomMargin
:
return
_T
(
"bottomMargin"
);
case
sizerelfromvInsideMargin
:
return
_T
(
"insideMargin"
);
case
sizerelfromvOutsideMargin
:
return
_T
(
"outsideMargin"
);
}
}
SimpleType_FromString
(
ESizeRelFromV
)
SimpleType_Operator_Equal
(
CSizeRelFromV
)
};
//--------------------------------------------------------------------------------
// WrapDistance 10.4.3.6 (Part 1)
...
...
Common/DocxFormat/Source/DocxFormat/Drawing/Drawing.h
View file @
51f8d63e
...
...
@@ -363,6 +363,151 @@ namespace OOX
nullable
<
SimpleTypes
::
CPositionOffset
<>
>
m_oPosOffset
;
nullable
<
SimpleTypes
::
CPercentage
>
m_oPctOffset
;
};
class
CSizeRelH
:
public
WritingElement
{
public:
WritingElement_AdditionConstructors
(
CSizeRelH
)
CSizeRelH
()
{
}
virtual
~
CSizeRelH
()
{
}
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
oNode
)
{
// TO DO: Реализовать
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
CString
sName
=
oReader
.
GetName
();
if
(
_T
(
"wp14:pctWidth"
)
==
sName
)
{
m_oPctWidth
=
oReader
.
GetText2
().
GetString
();
}
}
}
virtual
CString
toXML
()
const
{
CString
sResult
=
_T
(
"<wp14:sizeRelH "
);
if
(
m_oRelativeFrom
.
IsInit
()
)
sResult
+=
_T
(
"relativeFrom=
\"
"
)
+
m_oRelativeFrom
->
ToString
()
+
_T
(
"
\"
>"
);
else
sResult
+=
_T
(
">"
);
if
(
m_oPctWidth
.
IsInit
())
sResult
+=
_T
(
"<wp14:pctWidth>"
)
+
m_oPctWidth
->
ToStringDecimalNumber
()
+
_T
(
"</wp14:pctWidth>"
);
sResult
+=
_T
(
"</wp14:sizeRelH>"
);
return
sResult
;
}
virtual
EElementType
getType
()
const
{
return
OOX
::
et_wp_sizeRelH
;
}
private:
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
// Читаем атрибуты
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_ReadSingle
(
oReader
,
_T
(
"relativeFrom"
),
m_oRelativeFrom
)
WritingElement_ReadAttributes_End
(
oReader
)
}
public:
// Attributes
nullable
<
SimpleTypes
::
CSizeRelFromH
<>
>
m_oRelativeFrom
;
// Childs
nullable
<
SimpleTypes
::
CPercentage
>
m_oPctWidth
;
};
class
CSizeRelV
:
public
WritingElement
{
public:
WritingElement_AdditionConstructors
(
CSizeRelV
)
CSizeRelV
()
{
}
virtual
~
CSizeRelV
()
{
}
public:
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
oNode
)
{
// TO DO: Реализовать
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
if
(
oReader
.
IsEmptyNode
()
)
return
;
int
nCurDepth
=
oReader
.
GetDepth
();
while
(
oReader
.
ReadNextSiblingNode
(
nCurDepth
)
)
{
CString
sName
=
oReader
.
GetName
();
if
(
_T
(
"wp14:pctHeight"
)
==
sName
)
{
m_oPctHeight
=
oReader
.
GetText2
().
GetString
();
}
}
}
virtual
CString
toXML
()
const
{
CString
sResult
=
_T
(
"<wp14:sizeRelV "
);
if
(
m_oRelativeFrom
.
IsInit
()
)
sResult
+=
_T
(
"relativeFrom=
\"
"
)
+
m_oRelativeFrom
->
ToString
()
+
_T
(
"
\"
>"
);
else
sResult
+=
_T
(
">"
);
if
(
m_oPctHeight
.
IsInit
())
sResult
+=
_T
(
"<wp14:pctHeight>"
)
+
m_oPctHeight
->
ToStringDecimalNumber
()
+
_T
(
"</wp14:pctHeight>"
);
sResult
+=
_T
(
"</wp14:sizeRelV>"
);
return
sResult
;
}
virtual
EElementType
getType
()
const
{
return
OOX
::
et_wp_sizeRelH
;
}
private:
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
// Читаем атрибуты
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_ReadSingle
(
oReader
,
_T
(
"relativeFrom"
),
m_oRelativeFrom
)
WritingElement_ReadAttributes_End
(
oReader
)
}
public:
// Attributes
nullable
<
SimpleTypes
::
CSizeRelFromV
<>
>
m_oRelativeFrom
;
// Childs
nullable
<
SimpleTypes
::
CPercentage
>
m_oPctHeight
;
};
//--------------------------------------------------------------------------------
// CWrapNone 20.4.2.15 (Part 1)
//--------------------------------------------------------------------------------
...
...
@@ -859,6 +1004,10 @@ namespace OOX
m_oPositionV
=
oReader
;
else
if
(
_T
(
"wp:simplePos"
)
==
sName
)
m_oSimplePos
=
oReader
;
else
if
(
_T
(
"wp14:sizeRelH"
)
==
sName
)
m_oSizeRelH
=
oReader
;
else
if
(
_T
(
"wp14:sizeRelV"
)
==
sName
)
m_oSizeRelV
=
oReader
;
else
if
(
_T
(
"mc:AlternateContent"
)
==
sName
)
//ПРИВЛЕЧЕНИЕ СРЕДСТВ ИЗ МЕСТНЫХ ИСТОЧНИКОВ.docx
//вариативность на разные версии офиса части параметров - кстати ... это может встретиться в ЛЮБОМ месте
...
...
@@ -1082,6 +1231,8 @@ namespace OOX
nullable
<
OOX
::
Drawing
::
CGraphic
>
m_oGraphic
;
nullable
<
OOX
::
Drawing
::
CPosH
>
m_oPositionH
;
nullable
<
OOX
::
Drawing
::
CPosV
>
m_oPositionV
;
nullable
<
OOX
::
Drawing
::
CSizeRelH
>
m_oSizeRelH
;
nullable
<
OOX
::
Drawing
::
CSizeRelV
>
m_oSizeRelV
;
nullable
<
ComplexTypes
::
Drawing
::
CPoint2D
>
m_oSimplePos
;
nullable
<
OOX
::
Drawing
::
CWrapNone
>
m_oWrapNone
;
nullable
<
OOX
::
Drawing
::
CWrapSquare
>
m_oWrapSquare
;
...
...
Common/DocxFormat/Source/DocxFormat/WritingElement.h
View file @
51f8d63e
...
...
@@ -689,6 +689,8 @@ namespace OOX
et_wp_inline
,
// <wp:inline>
et_wp_positionH
,
// <wp:positionH>
et_wp_positionV
,
// <wp:positionV>
et_wp_sizeRelH
,
// <wp14:sizeRelH>
et_wp_sizeRelV
,
// <wp14:sizeRelV>
et_wp_wrapNone
,
// <wp:wrapNone>
et_wp_wrapPolygon
,
// <wp:wrapPolygon>
et_wp_wrapSquare
,
// <wp:wrapSquare>
...
...
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