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
4d528b2f
Commit
4d528b2f
authored
Aug 07, 2016
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RtfFormatReader/Writer - convert WordArt, fix bugs, ...
parent
d0b4fc4b
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
554 additions
and
403 deletions
+554
-403
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertVml.cpp
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertVml.cpp
+2
-1
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXShapeReader.cpp
...ficeRtfFile/RtfFormatLib/source/Reader/OOXShapeReader.cpp
+92
-30
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXtblPrReader.h
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXtblPrReader.h
+11
-0
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXtrPrReader.h
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXtrPrReader.h
+2
-2
ASCOfficeRtfFile/RtfFormatLib/source/RtfProperty.cpp
ASCOfficeRtfFile/RtfFormatLib/source/RtfProperty.cpp
+49
-44
ASCOfficeRtfFile/RtfFormatLib/source/RtfShape.cpp
ASCOfficeRtfFile/RtfFormatLib/source/RtfShape.cpp
+244
-85
ASCOfficeRtfFile/RtfFormatLib/source/RtfShape.h
ASCOfficeRtfFile/RtfFormatLib/source/RtfShape.h
+107
-196
Common/DocxFormat/Source/Common/SimpleTypes_Vml.h
Common/DocxFormat/Source/Common/SimpleTypes_Vml.h
+2
-0
Common/DocxFormat/Source/DocxFormat/Logic/Vml.h
Common/DocxFormat/Source/DocxFormat/Logic/Vml.h
+45
-45
No files found.
ASCOfficeOdfFileW/source/Oox2OdfConverter/ConvertVml.cpp
View file @
4d528b2f
...
...
@@ -370,7 +370,8 @@ void OoxConverter::convert(OOX::Vml::CFill *vml_fill)
if
(
vml_fill
->
m_oColor2
.
IsInit
())
odf_context
()
->
drawing_context
()
->
set_gradient_end
(
string2std_string
(
vml_fill
->
m_oColor2
->
ToString
()),
no_set
);
odf_context
()
->
drawing_context
()
->
set_gradient_center
(
vml_fill
->
m_oFocusPosition
.
GetX
(),
vml_fill
->
m_oFocusPosition
.
GetY
());
if
(
vml_fill
->
m_oFocusPosition
.
IsInit
())
odf_context
()
->
drawing_context
()
->
set_gradient_center
(
vml_fill
->
m_oFocusPosition
->
GetX
(),
vml_fill
->
m_oFocusPosition
->
GetY
());
odf_context
()
->
drawing_context
()
->
end_gradient_style
();
}
break
;
...
...
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXShapeReader.cpp
View file @
4d528b2f
...
...
@@ -70,13 +70,13 @@ bool OOXShapeReader::Parse2( ReaderParameter oParam , RtfShapePtr& oOutput)
{
case
OOX
:
:
et_v_fill
:
{
OOX
::
Vml
::
CFill
*
fill
_
=
dynamic_cast
<
OOX
::
Vml
::
CFill
*>
(
m_arrElement
->
m_arrItems
[
i
]);
OOX
::
VmlOffice
::
CFill
*
fill
=
fill_
?
dynamic_cast
<
OOX
::
VmlOffice
::
CFill
*>
(
fill_
->
m_oFill
.
GetPointer
())
:
NULL
;
OOX
::
Vml
::
CFill
*
fill
=
dynamic_cast
<
OOX
::
Vml
::
CFill
*>
(
m_arrElement
->
m_arrItems
[
i
]);
if
(
!
fill
)
break
;
CString
srId
=
fill
_
->
m_sId
.
IsInit
()
?
fill_
->
m_sId
.
get2
()
:
_T
(
""
)
;
CString
srId
=
fill
->
m_sId
.
IsInit
()
?
fill
->
m_sId
.
get2
()
:
_T
(
""
)
;
if
(
srId
.
IsEmpty
())
srId
=
fill
_
->
m_rId
.
IsInit
()
?
fill_
->
m_rId
->
GetValue
()
:
_T
(
""
)
;
srId
=
fill
->
m_rId
.
IsInit
()
?
fill
->
m_rId
->
GetValue
()
:
_T
(
""
)
;
if
(
!
srId
.
IsEmpty
()
&&
oParam
.
oReader
->
m_currentContainer
)
{
...
...
@@ -92,13 +92,53 @@ bool OOXShapeReader::Parse2( ReaderParameter oParam , RtfShapePtr& oOutput)
OOXPictureGraphicReader
::
WriteDataToPicture
(
sImagePath
,
*
oOutput
->
m_oPicture
,
oParam
.
oReader
->
m_sPath
);
}
}
else
if
(
fill
->
m_oColor
.
IsInit
())
oOutput
->
m_nFillColor
=
(
fill
->
m_oColor
->
Get_B
()
<<
16
)
+
(
fill
->
m_oColor
->
Get_G
()
<<
8
)
+
fill
->
m_oColor
->
Get_R
();
if
(
fill
->
m_oColor2
.
IsInit
())
oOutput
->
m_nFillColor2
=
(
fill
->
m_oColor2
->
Get_B
()
<<
16
)
+
(
fill
->
m_oColor2
->
Get_G
()
<<
8
)
+
fill
->
m_oColor2
->
Get_R
();
if
(
fill
->
m_oOpacity
.
IsInit
())
oOutput
->
m_nFillOpacity
=
fill
->
m_oOpacity
->
GetValue
()
*
100
;
switch
(
fill
->
m_oType
.
GetValue
())
{
case
SimpleTypes
:
:
filltypeBackground
:
oOutput
->
m_nFillType
=
9
;
break
;
case
SimpleTypes
:
:
filltypeFrame
:
oOutput
->
m_nFillType
=
3
;
break
;
case
SimpleTypes
:
:
filltypeGradient
:
oOutput
->
m_nFillType
=
4
;
break
;
case
SimpleTypes
:
:
filltypeGradientCenter
:
oOutput
->
m_nFillType
=
4
;
break
;
case
SimpleTypes
:
:
filltypeGradientRadial
:
oOutput
->
m_nFillType
=
4
;
break
;
case
SimpleTypes
:
:
filltypeGradientUnscaled
:
oOutput
->
m_nFillType
=
4
;
break
;
case
SimpleTypes
:
:
filltypePattern
:
oOutput
->
m_nFillType
=
1
;
break
;
case
SimpleTypes
:
:
filltypeTile
:
oOutput
->
m_nFillType
=
2
;
break
;
case
SimpleTypes
:
:
filltypeSolid
:
default:
break
;
}
if
(
fill
->
m_oAngle
.
IsInit
())
{
oOutput
->
m_nFillAngle
=
fill
->
m_oAngle
->
GetValue
();
if
(
oOutput
->
m_nFillType
==
4
)
oOutput
->
m_nFillType
=
7
;
}
if
(
fill
->
m_oFocus
.
IsInit
())
{
oOutput
->
m_nFillFocus
=
fill
->
m_oFocus
->
GetValue
();
}
}
break
;
case
OOX
:
:
et_v_stroke
:
{
OOX
::
Vml
::
CStroke
*
stroke
=
dynamic_cast
<
OOX
::
Vml
::
CStroke
*>
(
m_arrElement
->
m_arrItems
[
i
]);
if
(
!
stroke
)
break
;
oOutput
->
m_nLineDashing
=
stroke
->
m_oDahsStyle
.
GetValue
();
//совпадают значения
if
(
stroke
->
m_oColor
.
IsInit
())
oOutput
->
m_nLineColor
=
(
stroke
->
m_oColor
->
Get_B
()
<<
16
)
+
(
stroke
->
m_oColor
->
Get_G
()
<<
8
)
+
stroke
->
m_oColor
->
Get_R
();
}
break
;
case
OOX
:
:
et_v_imagedata
:
{
OOX
::
Vml
::
CImageData
*
image_data
=
dynamic_cast
<
OOX
::
Vml
::
CImageData
*>
(
m_arrElement
->
m_arrItems
[
i
]);
if
(
!
image_data
)
break
;
CString
srId
=
image_data
->
m_oId
.
IsInit
()
?
image_data
->
m_oId
.
get2
()
:
_T
(
""
)
;
...
...
@@ -208,7 +248,7 @@ bool OOXShapeReader::Parse2( ReaderParameter oParam , RtfShapePtr& oOutput)
{
OOX
::
Vml
::
CTextbox
*
text_box
=
dynamic_cast
<
OOX
::
Vml
::
CTextbox
*>
(
m_arrElement
->
m_arrItems
[
i
]);
if
(
text_box
->
m_oTxtbxContent
.
IsInit
(
))
if
(
(
text_box
)
&&
(
text_box
->
m_oTxtbxContent
.
IsInit
()
))
{
OOXTextItemReader
oTextItemReader
;
...
...
@@ -221,6 +261,23 @@ bool OOXShapeReader::Parse2( ReaderParameter oParam , RtfShapePtr& oOutput)
oOutput
->
m_aTextItems
=
oTextItemReader
.
m_oTextItems
;
}
}
break
;
case
OOX
:
:
et_v_textpath
:
{
OOX
::
Vml
::
CTextPath
*
text_path
=
dynamic_cast
<
OOX
::
Vml
::
CTextPath
*>
(
m_arrElement
->
m_arrItems
[
i
]);
if
(
text_path
)
{
oOutput
->
m_bGtext
=
1
;
if
(
text_path
->
m_sString
.
IsInit
())
{
oOutput
->
m_sGtextUNICODE
=
text_path
->
m_sString
.
get
();
}
if
(
text_path
->
m_oStyle
.
IsInit
())
{
ParseStyles
(
*
oOutput
,
text_path
->
m_oStyle
->
m_arrProperties
);
}
}
}
break
;
}
}
//проверяем на inline
...
...
@@ -243,18 +300,13 @@ bool OOXShapeReader::Parse( ReaderParameter oParam , RtfShapePtr& oOutput)
if
(
m_vmlElement
==
NULL
)
return
Parse2
(
oParam
,
oOutput
);
//todooo
//CString sType = m_vmlElement->;Type
//int nType = GetType( sType );
//if( -1 != nType )
// oOutput->m_nShapeType = nType;
if
(
m_vmlElement
->
m_sId
.
IsInit
())
{
oOutput
->
m_nID
=
oParam
.
oReader
->
m_oOOXIdGenerator
.
GetId
(
m_vmlElement
->
m_sId
.
get
());
}
//oOutput->m_nLeft = 0; //стили только с widht height (например в Numbering)
//oOutput->m_nTop
= 0;
//oOutput->m_nTop = 0;
oOutput
->
m_eShapeType
=
RtfShape
::
st_none
;
//inline or anchor
if
(
m_vmlElement
->
m_oStyle
.
IsInit
())
...
...
@@ -280,22 +332,28 @@ bool OOXShapeReader::Parse( ReaderParameter oParam , RtfShapePtr& oOutput)
{
oOutput
->
m_nShapeType
=
1
;
}
//CString sConnectionType = oXmlReader.ReadNodeAttribute( _T("o:connecttype"), _T("") );
//if( _T("custom") == sConnectionType )
// oOutput->m_nConnectionType = 0;
//else if( _T("none") == sConnectionType )
// oOutput->m_nConnectionType = 1;
//else if( _T("rect") == sConnectionType )
// oOutput->m_nConnectionType = 2;
//else if( _T("segments") == sConnectionType )
// oOutput->m_nConnectionType = 3;
if
(
m_vmlElement
->
m_oFilled
.
IsInit
())
oOutput
->
m_bFilled
=
m_vmlElement
->
m_oFilled
->
GetValue
()
==
SimpleTypes
::
booleanFalse
?
0
:
1
;
if
(
m_vmlElement
->
m_oStroked
.
IsInit
())
oOutput
->
m_bLine
=
m_vmlElement
->
m_oStroked
->
GetValue
()
==
SimpleTypes
::
booleanFalse
?
0
:
1
;
if
(
m_vmlElement
->
m_oFillColor
.
IsInit
())
oOutput
->
m_nFillColor
=
(
m_vmlElement
->
m_oFillColor
->
Get_B
()
<<
16
)
+
(
m_vmlElement
->
m_oFillColor
->
Get_G
()
<<
8
)
+
m_vmlElement
->
m_oFillColor
->
Get_R
();
if
(
m_vmlElement
->
m_oStrokeColor
.
IsInit
())
oOutput
->
m_nLineColor
=
(
m_vmlElement
->
m_oStrokeColor
->
Get_B
()
<<
16
)
+
(
m_vmlElement
->
m_oStrokeColor
->
Get_G
()
<<
8
)
+
m_vmlElement
->
m_oStrokeColor
->
Get_R
();
if
(
m_vmlElement
->
m_oStrokeWeight
.
IsInit
())
oOutput
->
m_nLineWidth
=
m_vmlElement
->
m_oStrokeWeight
->
ToEmu
();
switch
(
m_vmlElement
->
m_oConnectorType
.
GetValue
())
{
case
SimpleTypes
:
:
connectortypeCurved
:
oOutput
->
m_nConnectionType
=
2
;
break
;
case
SimpleTypes
:
:
connectortypeElbow
:
oOutput
->
m_nConnectionType
=
1
;
break
;
case
SimpleTypes
:
:
connectortypeNone
:
oOutput
->
m_nConnectionType
=
3
;
break
;
case
SimpleTypes
:
:
connectortypeStraight
:
oOutput
->
m_nConnectionType
=
0
;
break
;
case
SimpleTypes
:
:
connectortypeCurved
:
oOutput
->
m_nConnectionType
=
2
;
break
;
case
SimpleTypes
:
:
connectortypeElbow
:
oOutput
->
m_nConnectionType
=
1
;
break
;
case
SimpleTypes
:
:
connectortypeNone
:
oOutput
->
m_nConnectionType
=
3
;
break
;
case
SimpleTypes
:
:
connectortypeStraight
:
oOutput
->
m_nConnectionType
=
0
;
break
;
}
oOutput
->
m_bLayoutInCell
=
m_vmlElement
->
m_oAllowInCell
.
GetValue
();
...
...
@@ -323,9 +381,6 @@ bool OOXShapeReader::Parse( ReaderParameter oParam , RtfShapePtr& oOutput)
oOutput
->
m_nGroupBottom
=
oOutput
->
m_nGroupTop
+
m_vmlElement
->
m_oCoordSize
->
GetY
();
}
if
(
m_vmlElement
->
m_oStrokeWeight
.
IsInit
())
oOutput
->
m_nLineWidth
=
m_vmlElement
->
m_oStrokeWeight
->
ToEmu
();
return
Parse2
(
oParam
,
oOutput
);
...
...
@@ -455,6 +510,15 @@ bool OOXShapeReader::ParseStyle(RtfShape& oShape, SimpleTypes::Vml::CCssProperty
else
if
(
nValue
<
0
)
oShape
.
m_nZOrderRelative
=
1
;
}
break
;
case
SimpleTypes
:
:
Vml
::
cssptFontFamily
:
{
oShape
.
m_sGtextFont
=
CString
(
prop
->
get_Value
().
wsValue
);
}
break
;
case
SimpleTypes
:
:
Vml
::
cssptFontSize
:
{
oShape
.
m_nGtextSize
=
prop
->
get_Value
().
oValue
.
dValue
;
}
break
;
case
SimpleTypes
:
:
Vml
::
cssptDirection
:
break
;
case
SimpleTypes
:
:
Vml
::
cssptLayoutFlow
:
break
;
case
SimpleTypes
:
:
Vml
::
cssptMsoDirectionAlt
:
break
;
...
...
@@ -466,8 +530,6 @@ bool OOXShapeReader::ParseStyle(RtfShape& oShape, SimpleTypes::Vml::CCssProperty
case
SimpleTypes
:
:
Vml
::
cssptMsoTextScale
:
break
;
case
SimpleTypes
:
:
Vml
::
cssptVTextAnchor
:
break
;
case
SimpleTypes
:
:
Vml
::
cssptFont
:
break
;
case
SimpleTypes
:
:
Vml
::
cssptFontFamily
:
break
;
case
SimpleTypes
:
:
Vml
::
cssptFontSize
:
break
;
case
SimpleTypes
:
:
Vml
::
cssptFontStyle
:
break
;
case
SimpleTypes
:
:
Vml
::
cssptFontVariant
:
break
;
case
SimpleTypes
:
:
Vml
::
cssptFontWeight
:
break
;
...
...
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXtblPrReader.h
View file @
4d528b2f
...
...
@@ -113,6 +113,17 @@ public:
OOXtblpPrReader
otblpPrReader
(
m_ooxTableProps
->
m_oTblpPr
.
GetPointer
());
otblpPrReader
.
Parse
(
oParam
,
oOutputProperty
);
}
if
(
(
m_ooxTableProps
->
m_oJc
.
IsInit
())
&&
(
m_ooxTableProps
->
m_oJc
->
m_oVal
.
IsInit
()))
{
switch
(
m_ooxTableProps
->
m_oJc
->
m_oVal
->
GetValue
())
{
case
SimpleTypes
:
:
jctableCenter
:
oOutputProperty
.
m_eJust
=
RtfTableProperty
::
rj_trqc
;
break
;
case
SimpleTypes
:
:
jctableEnd
:
case
SimpleTypes
:
:
jctableRight
:
oOutputProperty
.
m_eJust
=
RtfTableProperty
::
rj_trqr
;
break
;
case
SimpleTypes
:
:
jctableStart
:
case
SimpleTypes
:
:
jctableLeft
:
oOutputProperty
.
m_eJust
=
RtfTableProperty
::
rj_trql
;
break
;
}
}
if
(
m_ooxTableProps
->
m_oTblBorders
.
IsInit
())
{
if
(
m_ooxTableProps
->
m_oTblBorders
->
m_oTop
.
IsInit
()
)
...
...
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXtrPrReader.h
View file @
4d528b2f
...
...
@@ -78,10 +78,10 @@ public:
switch
(
m_ooxTableRowProps
->
m_oJc
->
m_oVal
->
GetValue
())
{
case
SimpleTypes
:
:
jctableCenter
:
oOutputProperty
.
m_eJust
=
RtfRowProperty
::
rj_trqc
;
break
;
case
SimpleTypes
:
:
jctableEnd
:
oOutputProperty
.
m_eJust
=
RtfRowProperty
::
rj_trq
l
;
break
;
case
SimpleTypes
:
:
jctableEnd
:
oOutputProperty
.
m_eJust
=
RtfRowProperty
::
rj_trq
r
;
break
;
case
SimpleTypes
:
:
jctableStart
:
oOutputProperty
.
m_eJust
=
RtfRowProperty
::
rj_trql
;
break
;
case
SimpleTypes
:
:
jctableLeft
:
oOutputProperty
.
m_eJust
=
RtfRowProperty
::
rj_trql
;
break
;
case
SimpleTypes
:
:
jctableRight
:
oOutputProperty
.
m_eJust
=
RtfRowProperty
::
rj_trq
l
;
break
;
case
SimpleTypes
:
:
jctableRight
:
oOutputProperty
.
m_eJust
=
RtfRowProperty
::
rj_trq
r
;
break
;
}
}
...
...
ASCOfficeRtfFile/RtfFormatLib/source/RtfProperty.cpp
View file @
4d528b2f
...
...
@@ -1702,68 +1702,73 @@ CString RtfParagraphProperty::RenderToRtf(RenderParameter oRenderParameter)
{
CString
sResult
;
//RENDER_RTF_INT( m_nStyle, sResult, _T("s") );
RENDER_RTF_BOOL
(
m_bAutoHyphenation
,
sResult
,
_T
(
"hyphpar"
)
);
RENDER_RTF_BOOL
(
m_bInTable
,
sResult
,
_T
(
"intbl"
)
);
RENDER_RTF_BOOL
(
m_bAutoHyphenation
,
sResult
,
_T
(
"hyphpar"
)
);
RENDER_RTF_BOOL
(
m_bInTable
,
sResult
,
_T
(
"intbl"
)
);
if
(
PROP_DEF
!=
m_nItap
&&
1
!=
m_nItap
)
sResult
.
AppendFormat
(
_T
(
"
\\
itap%d"
),
m_nItap
);
RENDER_RTF_BOOL
(
m_bKeep
,
sResult
,
_T
(
"keep"
)
);
RENDER_RTF_BOOL
(
m_bKeepNext
,
sResult
,
_T
(
"keepn"
)
);
RENDER_RTF_INT
(
m_nOutlinelevel
,
sResult
,
_T
(
"outlinelevel"
)
);
RENDER_RTF_BOOL
(
m_bPageBB
,
sResult
,
_T
(
"pagebb"
)
);
RENDER_RTF_BOOL
(
m_bKeep
,
sResult
,
_T
(
"keep"
)
);
RENDER_RTF_BOOL
(
m_bKeepNext
,
sResult
,
_T
(
"keepn"
)
);
RENDER_RTF_INT
(
m_nOutlinelevel
,
sResult
,
_T
(
"outlinelevel"
)
);
RENDER_RTF_BOOL
(
m_bPageBB
,
sResult
,
_T
(
"pagebb"
)
);
switch
(
m_eAlign
)
{
case
pa_qc
:
sResult
.
Append
(
_T
(
"
\\
qc"
)
);
break
;
case
pa_qj
:
sResult
.
Append
(
_T
(
"
\\
qj"
)
);
break
;
case
pa_ql
:
sResult
.
Append
(
_T
(
"
\\
ql"
)
);
break
;
case
pa_qr
:
sResult
.
Append
(
_T
(
"
\\
qr"
)
);
break
;
case
pa_qd
:
sResult
.
Append
(
_T
(
"
\\
qd"
)
);
break
;
case
pa_qk0
:
sResult
.
Append
(
_T
(
"
\\
qk0"
)
);
break
;
case
pa_qk10
:
sResult
.
Append
(
_T
(
"
\\
qk10"
)
);
break
;
case
pa_qk20
:
sResult
.
Append
(
_T
(
"
\\
qk20"
)
);
break
;
case
pa_qc
:
sResult
.
Append
(
_T
(
"
\\
qc"
)
);
break
;
case
pa_qj
:
sResult
.
Append
(
_T
(
"
\\
qj"
)
);
break
;
case
pa_ql
:
sResult
.
Append
(
_T
(
"
\\
ql"
)
);
break
;
case
pa_qr
:
sResult
.
Append
(
_T
(
"
\\
qr"
)
);
break
;
case
pa_qd
:
sResult
.
Append
(
_T
(
"
\\
qd"
)
);
break
;
case
pa_qk0
:
sResult
.
Append
(
_T
(
"
\\
qk0"
)
);
break
;
case
pa_qk10
:
sResult
.
Append
(
_T
(
"
\\
qk10"
)
);
break
;
case
pa_qk20
:
sResult
.
Append
(
_T
(
"
\\
qk20"
)
);
break
;
}
switch
(
m_eFontAlign
)
{
case
fa_faauto
:
sResult
.
Append
(
_T
(
"
\\
faauto"
)
);
break
;
case
fa_fahang
:
sResult
.
Append
(
_T
(
"
\\
fahang"
)
);
break
;
case
fa_facenter
:
sResult
.
Append
(
_T
(
"
\\
facenter"
)
);
break
;
case
fa_faroman
:
sResult
.
Append
(
_T
(
"
\\
faroman"
)
);
break
;
case
fa_favar
:
sResult
.
Append
(
_T
(
"
\\
favar"
)
);
break
;
case
fa_fafixed
:
sResult
.
Append
(
_T
(
"
\\
fafixed"
)
);
break
;
}
RENDER_RTF_INT
(
m_nIndFirstLine
,
sResult
,
_T
(
"fi"
)
);
RENDER_RTF_INT
(
m_nIndLeft
,
sResult
,
_T
(
"li"
)
);
RENDER_RTF_INT
(
m_nIndStart
,
sResult
,
_T
(
"lin"
)
);
RENDER_RTF_INT
(
m_nIndRight
,
sResult
,
_T
(
"ri"
)
);
RENDER_RTF_INT
(
m_nIndEnd
,
sResult
,
_T
(
"rin"
)
);
RENDER_RTF_BOOL
(
m_bIndRightAuto
,
sResult
,
_T
(
"adjustright"
)
);
RENDER_RTF_BOOL
(
m_bIndMirror
,
sResult
,
_T
(
"indmirror"
)
);
RENDER_RTF_INT
(
m_nSpaceBefore
,
sResult
,
_T
(
"sb"
)
);
RENDER_RTF_INT
(
m_nSpaceAfter
,
sResult
,
_T
(
"sa"
)
);
RENDER_RTF_INT
(
m_nSpaceBeforeAuto
,
sResult
,
_T
(
"sbauto"
)
);
RENDER_RTF_INT
(
m_nSpaceAfterAuto
,
sResult
,
_T
(
"saauto"
)
);
RENDER_RTF_INT
(
m_nSpaceBeforeLine
,
sResult
,
_T
(
"lisb"
)
);
RENDER_RTF_INT
(
m_nSpaceAfterLine
,
sResult
,
_T
(
"lisa"
)
);
RENDER_RTF_INT
(
m_nSpaceBetween
,
sResult
,
_T
(
"sl"
)
);
RENDER_RTF_INT
(
m_nSpaceMultiLine
,
sResult
,
_T
(
"slmult"
)
);
case
fa_faauto
:
sResult
.
Append
(
_T
(
"
\\
faauto"
)
);
break
;
case
fa_fahang
:
sResult
.
Append
(
_T
(
"
\\
fahang"
)
);
break
;
case
fa_facenter
:
sResult
.
Append
(
_T
(
"
\\
facenter"
)
);
break
;
case
fa_faroman
:
sResult
.
Append
(
_T
(
"
\\
faroman"
)
);
break
;
case
fa_favar
:
sResult
.
Append
(
_T
(
"
\\
favar"
)
);
break
;
case
fa_fafixed
:
sResult
.
Append
(
_T
(
"
\\
fafixed"
)
);
break
;
}
RENDER_RTF_INT
(
m_nIndFirstLine
,
sResult
,
_T
(
"fi"
)
);
RENDER_RTF_INT
(
m_nIndLeft
,
sResult
,
_T
(
"li"
)
);
RENDER_RTF_INT
(
m_nIndStart
,
sResult
,
_T
(
"lin"
)
);
RENDER_RTF_INT
(
m_nIndRight
,
sResult
,
_T
(
"ri"
)
);
RENDER_RTF_INT
(
m_nIndEnd
,
sResult
,
_T
(
"rin"
)
);
RENDER_RTF_BOOL
(
m_bIndRightAuto
,
sResult
,
_T
(
"adjustright"
)
);
RENDER_RTF_BOOL
(
m_bIndMirror
,
sResult
,
_T
(
"indmirror"
)
);
RENDER_RTF_INT
(
m_nSpaceBefore
,
sResult
,
_T
(
"sb"
)
);
RENDER_RTF_INT
(
m_nSpaceAfter
,
sResult
,
_T
(
"sa"
)
);
RENDER_RTF_INT
(
m_nSpaceBeforeAuto
,
sResult
,
_T
(
"sbauto"
)
);
RENDER_RTF_INT
(
m_nSpaceAfterAuto
,
sResult
,
_T
(
"saauto"
)
);
RENDER_RTF_INT
(
m_nSpaceBeforeLine
,
sResult
,
_T
(
"lisb"
)
);
RENDER_RTF_INT
(
m_nSpaceAfterLine
,
sResult
,
_T
(
"lisa"
)
);
RENDER_RTF_INT
(
m_nSpaceBetween
,
sResult
,
_T
(
"sl"
)
);
RENDER_RTF_INT
(
m_nSpaceMultiLine
,
sResult
,
_T
(
"slmult"
)
);
RENDER_RTF_BOOL
(
m_bContextualSpacing
,
sResult
,
_T
(
"contextualspace"
)
);
if
(
0
==
m_bRtl
)
sResult
.
Append
(
_T
(
"
\\
ltrpar"
));
else
if
(
PROP_DEF
!=
m_bRtl
)
sResult
.
Append
(
_T
(
"
\\
rtlpar"
));
RENDER_RTF_BOOL
(
m_bNoWordWrap
,
sResult
,
_T
(
"nowwrap"
)
);
if
(
0
==
m_bSnapToGrid
)
sResult
.
Append
(
_T
(
"
\\
nosnaplinegrid"
)
);
else
if
(
PROP_DEF
!=
m_bSnapToGrid
)
sResult
.
Append
(
_T
(
"
\\
nosnaplinegrid0"
)
);
switch
(
m_eTextBoxWrap
)
{
case
tbw_txbxtwno
:
sResult
.
Append
(
_T
(
"
\\
txbxtwno"
));
break
;
case
tbw_txbxtwalways
:
sResult
.
Append
(
_T
(
"
\\
txbxtwalways"
));
break
;
case
tbw_txbxtwfirstlast
:
sResult
.
Append
(
_T
(
"
\\
txbxtwfirstlast"
));
break
;
case
tbw_txbxtwfirst
:
sResult
.
Append
(
_T
(
"
\\
txbxtwfirst"
));
break
;
case
tbw_txbxtwlast
:
sResult
.
Append
(
_T
(
"
\\
txbxtwlast"
));
break
;
case
tbw_txbxtwno
:
sResult
.
Append
(
_T
(
"
\\
txbxtwno"
));
break
;
case
tbw_txbxtwalways
:
sResult
.
Append
(
_T
(
"
\\
txbxtwalways"
));
break
;
case
tbw_txbxtwfirstlast
:
sResult
.
Append
(
_T
(
"
\\
txbxtwfirstlast"
));
break
;
case
tbw_txbxtwfirst
:
sResult
.
Append
(
_T
(
"
\\
txbxtwfirst"
));
break
;
case
tbw_txbxtwlast
:
sResult
.
Append
(
_T
(
"
\\
txbxtwlast"
));
break
;
}
if
(
PROP_DEF
!=
m_nListId
&&
PROP_DEF
!=
m_nListLevel
)
{
...
...
@@ -1816,9 +1821,9 @@ CString RtfParagraphProperty::RenderToRtf(RenderParameter oRenderParameter)
switch
(
m_eTextFollow
)
{
case
tf_frmtxlrtb
:
sResult
.
Append
(
_T
(
"
\\
frmtxlrtb"
));
break
;
case
tf_frmtxtbrl
:
sResult
.
Append
(
_T
(
"
\\
frmtxtbrl"
));
break
;
case
tf_frmtxbtlr
:
sResult
.
Append
(
_T
(
"
\\
frmtxbtlr"
));
break
;
case
tf_frmtxlrtb
:
sResult
.
Append
(
_T
(
"
\\
frmtxlrtb"
));
break
;
case
tf_frmtxtbrl
:
sResult
.
Append
(
_T
(
"
\\
frmtxtbrl"
));
break
;
case
tf_frmtxbtlr
:
sResult
.
Append
(
_T
(
"
\\
frmtxbtlr"
));
break
;
case
tf_frmtxlrtbv
:
sResult
.
Append
(
_T
(
"
\\
frmtxlrtbv"
));
break
;
case
tf_frmtxtbrlv
:
sResult
.
Append
(
_T
(
"
\\
frmtxtbrlv"
));
break
;
}
...
...
ASCOfficeRtfFile/RtfFormatLib/source/RtfShape.cpp
View file @
4d528b2f
This diff is collapsed.
Click to expand it.
ASCOfficeRtfFile/RtfFormatLib/source/RtfShape.h
View file @
4d528b2f
This diff is collapsed.
Click to expand it.
Common/DocxFormat/Source/Common/SimpleTypes_Vml.h
View file @
4d528b2f
...
...
@@ -2592,6 +2592,8 @@ namespace SimpleTypes
if
(
sValue
.
GetLength
()
<=
0
)
return
this
->
m_eValue
;
sValue
.
MakeLower
();
wchar_t
wChar
=
sValue
.
GetAt
(
0
);
switch
(
wChar
)
{
...
...
Common/DocxFormat/Source/DocxFormat/Logic/Vml.h
View file @
4d528b2f
...
...
@@ -430,7 +430,7 @@ namespace OOX
ComplexTypes_WriteAttribute2
(
_T
(
"id=
\"
"
),
m_sId
);
sResult
+=
_T
(
"type=
\"
"
)
+
m_oType
.
ToString
()
+
_T
(
"
\"
"
);
if
(
SimpleTypes
::
booleanTrue
!=
m_oOn
.
GetValue
()
)
if
(
(
m_oOn
.
IsInit
())
&&
(
SimpleTypes
::
booleanTrue
!=
m_oOn
->
GetValue
()
)
)
sResult
+=
_T
(
"on=
\"
false
\"
"
);
if
(
m_oOpacity
.
IsInit
()
)
...
...
@@ -445,27 +445,27 @@ namespace OOX
ComplexTypes_WriteAttribute
(
_T
(
"origin=
\"
"
),
m_oOrigin
);
ComplexTypes_WriteAttribute
(
_T
(
"position=
\"
"
),
m_oPosition
);
if
(
SimpleTypes
::
imageaspectIgnore
!=
m_oAspect
.
GetValue
()
)
sResult
+=
_T
(
"aspect=
\"
"
)
+
m_oAspect
.
ToString
()
+
_T
(
"
\"
"
);
if
(
(
m_oAspect
.
IsInit
())
&&
(
SimpleTypes
::
imageaspectIgnore
!=
m_oAspect
->
GetValue
()
)
)
sResult
+=
_T
(
"aspect=
\"
"
)
+
m_oAspect
->
ToString
()
+
_T
(
"
\"
"
);
// TO DO: Сделать запись m_arrColors
ComplexTypes_WriteAttribute
(
_T
(
"angle=
\"
"
),
m_oAngle
);
if
(
SimpleTypes
::
booleanTrue
!=
m_oAlignShape
.
GetValue
()
)
if
(
(
m_oAlignShape
.
IsInit
())
&&
(
SimpleTypes
::
booleanTrue
!=
m_oAlignShape
->
GetValue
()
)
)
sResult
+=
_T
(
"alignshape=
\"
false
\"
"
);
if
(
0
!=
m_oFocus
.
GetValue
()
)
sResult
+=
_T
(
"focus=
\"
"
)
+
m_oFocus
.
ToString
()
+
_T
(
"
\"
"
);
if
(
(
m_oFocus
.
IsInit
())
&&
(
0
!=
m_oFocus
->
GetValue
()
)
)
sResult
+=
_T
(
"focus=
\"
"
)
+
m_oFocus
->
ToString
()
+
_T
(
"
\"
"
);
if
(
0
!=
m_oFocusPosition
.
GetX
()
||
0
!=
m_oFocusPosition
.
GetY
()
)
sResult
+=
_T
(
"focusposition=
\"
"
)
+
m_oFocusPosition
.
ToString
()
+
_T
(
"
\"
"
);
if
(
(
m_oFocusPosition
.
IsInit
())
&&
(
0
!=
m_oFocusPosition
->
GetX
()
||
0
!=
m_oFocusPosition
->
GetY
()
)
)
sResult
+=
_T
(
"focusposition=
\"
"
)
+
m_oFocusPosition
->
ToString
()
+
_T
(
"
\"
"
);
if
(
0
!=
m_oFocusSize
.
GetX
()
||
0
!=
m_oFocusSize
.
GetY
()
)
sResult
+=
_T
(
"focussize=
\"
"
)
+
m_oFocusSize
.
ToString
()
+
_T
(
"
\"
"
);
if
(
(
m_oFocusSize
.
IsInit
()
)
&&
(
0
!=
m_oFocusSize
->
GetX
()
||
0
!=
m_oFocusSize
->
GetY
()
)
)
sResult
+=
_T
(
"focussize=
\"
"
)
+
m_oFocusSize
->
ToString
()
+
_T
(
"
\"
"
);
if
(
SimpleTypes
::
fillmethodSigma
!=
m_oMethod
.
GetValue
()
)
sResult
+=
_T
(
"method=
\"
"
)
+
m_oMethod
.
ToString
()
+
_T
(
"
\"
"
);
if
(
(
m_oMethod
.
IsInit
()
)
&&
(
SimpleTypes
::
fillmethodSigma
!=
m_oMethod
->
GetValue
()
)
)
sResult
+=
_T
(
"method=
\"
"
)
+
m_oMethod
->
ToString
()
+
_T
(
"
\"
"
);
ComplexTypes_WriteAttribute
(
_T
(
"o:detectmouseclick=
\"
"
),
m_oDetectMouseClick
);
ComplexTypes_WriteAttribute2
(
_T
(
"o:title=
\"
"
),
m_sTitle
);
...
...
@@ -473,10 +473,10 @@ namespace OOX
if
(
m_oOpacity2
.
IsInit
()
)
sResult
+=
_T
(
"o:opacity2=
\"
"
)
+
m_oOpacity2
->
ToString
()
+
_T
(
"
\"
"
);
if
(
SimpleTypes
::
booleanFalse
!=
m_oRecolor
.
GetValue
()
)
if
(
(
m_oRecolor
.
IsInit
())
&&
(
SimpleTypes
::
booleanFalse
!=
m_oRecolor
->
GetValue
()
)
)
sResult
+=
_T
(
"recolor=
\"
true
\"
"
);
if
(
SimpleTypes
::
booleanFalse
!=
m_oRotate
.
GetValue
()
)
if
(
(
m_oRotate
.
IsInit
())
&&
(
SimpleTypes
::
booleanFalse
!=
m_oRotate
->
GetValue
()
)
)
sResult
+=
_T
(
"rotate=
\"
true
\"
"
);
ComplexTypes_WriteAttribute
(
_T
(
"r:id=
\"
"
),
m_rId
);
...
...
@@ -501,9 +501,9 @@ namespace OOX
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
// Выставляем значения по умолчанию
m_oFocus
.
SetValue
(
0
);
m_oFocusPosition
.
SetValue
(
0.0
,
0.0
);
m_oFocusSize
.
SetValue
(
0.0
,
0.0
);
//
m_oFocus.SetValue( 0 );
//
m_oFocusPosition.SetValue( 0.0, 0.0 );
//
m_oFocusSize.SetValue( 0.0, 0.0 );
CString
sColors
;
// Читаем атрибуты
...
...
@@ -596,36 +596,36 @@ namespace OOX
};
// Attributes
SimpleTypes
::
CTrueFalse
<
SimpleTypes
::
booleanTrue
>
m_oAlignShape
;
nullable
<
CString
>
m_sAltHref
;
nullable
<
SimpleTypes
::
CDecimalNumber
<>>
m_oAngle
;
SimpleTypes
::
CImageAspect
<
SimpleTypes
::
imageaspectIgnore
>
m_oAspect
;
nullable
<
SimpleTypes
::
CColorType
<>>
m_oColor
;
nullable
<
SimpleTypes
::
CColorType
<>>
m_oColor2
;
std
::
vector
<
TIntermediateColor
*>
m_arrColors
;
nullable
<
SimpleTypes
::
CTrueFalse
<>>
m_oDetectMouseClick
;
SimpleTypes
::
CFixedPercentage
m_oFocus
;
SimpleTypes
::
Vml
::
CVml_Vector2D_Percentage
m_oFocusPosition
;
SimpleTypes
::
Vml
::
CVml_Vector2D_Percentage
m_oFocusSize
;
nullable
<
CString
>
m_sHref
;
nullable
<
SimpleTypes
::
CRelationshipId
>
m_rId
;
nullable
<
CString
>
m_sId
;
SimpleTypes
::
CFillMethod
<
SimpleTypes
::
fillmethodSigma
>
m_oMethod
;
SimpleTypes
::
CTrueFalse
<
SimpleTypes
::
booleanTrue
>
m_oOn
;
nullable
<
SimpleTypes
::
Vml
::
CVml_1_65536
>
m_oOpacity
;
nullable
<
SimpleTypes
::
Vml
::
CVml_1_65536
>
m_oOpacity2
;
nullable
<
SimpleTypes
::
Vml
::
CVml_Vector2D_1_65536
>
m_oOrigin
;
nullable
<
SimpleTypes
::
Vml
::
CVml_Vector2D_1_65536
>
m_oPosition
;
SimpleTypes
::
CTrueFalse
<
SimpleTypes
::
booleanFalse
>
m_oRecolor
;
nullable
<
SimpleTypes
::
CRelationshipId
>
m_oRelId
;
SimpleTypes
::
CTrueFalse
<
SimpleTypes
::
booleanFalse
>
m_oRotate
;
nullable
<
SimpleTypes
::
Vml
::
CVml_Vector2D_Units
>
m_oSize
;
nullable
<
CString
>
m_sSrc
;
nullable
<
CString
>
m_sTitle
;
SimpleTypes
::
CFillType
<
SimpleTypes
::
filltypeSolid
,
0
>
m_oType
;
nullable
<
SimpleTypes
::
CTrueFalse
<
SimpleTypes
::
booleanTrue
>>
m_oAlignShape
;
nullable
<
CString
>
m_sAltHref
;
nullable
<
SimpleTypes
::
CDecimalNumber
<>>
m_oAngle
;
nullable
<
SimpleTypes
::
CImageAspect
<
SimpleTypes
::
imageaspectIgnore
>
>
m_oAspect
;
nullable
<
SimpleTypes
::
CColorType
<>>
m_oColor
;
nullable
<
SimpleTypes
::
CColorType
<>>
m_oColor2
;
std
::
vector
<
TIntermediateColor
*>
m_arrColors
;
nullable
<
SimpleTypes
::
CTrueFalse
<>>
m_oDetectMouseClick
;
nullable
<
SimpleTypes
::
CFixedPercentage
>
m_oFocus
;
nullable
<
SimpleTypes
::
Vml
::
CVml_Vector2D_Percentage
>
m_oFocusPosition
;
nullable
<
SimpleTypes
::
Vml
::
CVml_Vector2D_Percentage
>
m_oFocusSize
;
nullable
<
CString
>
m_sHref
;
nullable
<
SimpleTypes
::
CRelationshipId
>
m_rId
;
nullable
<
CString
>
m_sId
;
nullable
<
SimpleTypes
::
CFillMethod
<
SimpleTypes
::
fillmethodSigma
>>
m_oMethod
;
nullable
<
SimpleTypes
::
CTrueFalse
<
SimpleTypes
::
booleanTrue
>>
m_oOn
;
nullable
<
SimpleTypes
::
Vml
::
CVml_1_65536
>
m_oOpacity
;
nullable
<
SimpleTypes
::
Vml
::
CVml_1_65536
>
m_oOpacity2
;
nullable
<
SimpleTypes
::
Vml
::
CVml_Vector2D_1_65536
>
m_oOrigin
;
nullable
<
SimpleTypes
::
Vml
::
CVml_Vector2D_1_65536
>
m_oPosition
;
nullable
<
SimpleTypes
::
CTrueFalse
<
SimpleTypes
::
booleanFalse
>>
m_oRecolor
;
nullable
<
SimpleTypes
::
CRelationshipId
>
m_oRelId
;
nullable
<
SimpleTypes
::
CTrueFalse
<
SimpleTypes
::
booleanFalse
>>
m_oRotate
;
nullable
<
SimpleTypes
::
Vml
::
CVml_Vector2D_Units
>
m_oSize
;
nullable
<
CString
>
m_sSrc
;
nullable
<
CString
>
m_sTitle
;
SimpleTypes
::
CFillType
<
SimpleTypes
::
filltypeSolid
,
0
>
m_oType
;
// Childs
nullable
<
OOX
::
VmlOffice
::
CFill
>
m_oFill
;
nullable
<
OOX
::
VmlOffice
::
CFill
>
m_oFill
;
};
//--------------------------------------------------------------------------------
...
...
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