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
8ecdeeed
Commit
8ecdeeed
authored
Aug 28, 2016
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DocxFormat - small refactoring
parent
6778027d
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
52 additions
and
66 deletions
+52
-66
Common/DocxFormat/Source/DocxFormat/CustomXml.h
Common/DocxFormat/Source/DocxFormat/CustomXml.h
+4
-4
Common/DocxFormat/Source/DocxFormat/Document.h
Common/DocxFormat/Source/DocxFormat/Document.h
+3
-1
Common/DocxFormat/Source/DocxFormat/Drawing/DrawingParagraph.h
...n/DocxFormat/Source/DocxFormat/Drawing/DrawingParagraph.h
+1
-1
Common/DocxFormat/Source/DocxFormat/Logic/Annotations.h
Common/DocxFormat/Source/DocxFormat/Logic/Annotations.h
+6
-19
Common/DocxFormat/Source/DocxFormat/Logic/Dir.cpp
Common/DocxFormat/Source/DocxFormat/Logic/Dir.cpp
+2
-2
Common/DocxFormat/Source/DocxFormat/Logic/RunContent.h
Common/DocxFormat/Source/DocxFormat/Logic/RunContent.h
+4
-4
Common/DocxFormat/Source/DocxFormat/Logic/Sdt.h
Common/DocxFormat/Source/DocxFormat/Logic/Sdt.h
+4
-14
Common/DocxFormat/Source/DocxFormat/Logic/Vml.cpp
Common/DocxFormat/Source/DocxFormat/Logic/Vml.cpp
+1
-2
Common/DocxFormat/Source/DocxFormat/Math/oMathContent.h
Common/DocxFormat/Source/DocxFormat/Math/oMathContent.h
+1
-1
Common/DocxFormat/Source/DocxFormat/Styles.h
Common/DocxFormat/Source/DocxFormat/Styles.h
+7
-1
Common/DocxFormat/Source/SystemUtility/FileSystem/Directory.cpp
.../DocxFormat/Source/SystemUtility/FileSystem/Directory.cpp
+1
-1
Common/DocxFormat/Source/XlsxFormat/Comments/Comments.h
Common/DocxFormat/Source/XlsxFormat/Comments/Comments.h
+1
-1
Common/DocxFormat/Source/XlsxFormat/Drawing/CellAnchor.h
Common/DocxFormat/Source/XlsxFormat/Drawing/CellAnchor.h
+3
-2
Common/DocxFormat/Source/XlsxFormat/Drawing/Drawing.h
Common/DocxFormat/Source/XlsxFormat/Drawing/Drawing.h
+1
-1
Common/DocxFormat/Source/XlsxFormat/Drawing/FromTo.h
Common/DocxFormat/Source/XlsxFormat/Drawing/FromTo.h
+2
-2
Common/DocxFormat/Source/XlsxFormat/Drawing/Pic.h
Common/DocxFormat/Source/XlsxFormat/Drawing/Pic.h
+4
-3
Common/DocxFormat/Source/XlsxFormat/ExternalLinks/ExternalLinks.h
...ocxFormat/Source/XlsxFormat/ExternalLinks/ExternalLinks.h
+1
-1
Common/DocxFormat/Source/XlsxFormat/Styles/NumFmts.h
Common/DocxFormat/Source/XlsxFormat/Styles/NumFmts.h
+1
-2
Common/DocxFormat/Source/XlsxFormat/Styles/TableStyles.h
Common/DocxFormat/Source/XlsxFormat/Styles/TableStyles.h
+5
-4
No files found.
Common/DocxFormat/Source/DocxFormat/CustomXml.h
View file @
8ecdeeed
...
...
@@ -76,8 +76,7 @@ namespace OOX
}
virtual
CString
toXML
()
const
{
CString
sResult
;
sResult
.
Format
(
_T
(
"<ds:schemaRef ds:uri=
\"
%ls
\"
/>"
),
m_sUri
);
CString
sResult
=
_T
(
"<ds:schemaRef ds:uri=
\"
"
)
+
m_sUri
+
_T
(
"
\"
/>"
);
return
sResult
;
}
virtual
EElementType
getType
()
const
...
...
@@ -180,8 +179,9 @@ namespace OOX
}
virtual
void
write
(
const
CPath
&
oFilePath
,
const
CPath
&
oDirectory
,
CContentTypes
&
oContent
)
const
{
CString
sXml
;
sXml
.
Format
(
_T
(
"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
standalone=
\"
yes
\"
?><ds:datastoreItem ds:itemID=
\"
%ls
\"
xmlns:ds=
\"
http://schemas.openxmlformats.org/officeDocument/2006/customXml
\"
>"
),
m_oItemID
.
ToString
()
);
CString
sXml
=
_T
(
"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
standalone=
\"
yes
\"
?><ds:datastoreItem ds:itemID=
\"
"
);
sXml
+=
m_oItemID
.
ToString
();
sXml
+=
_T
(
"
\"
xmlns:ds=
\"
http://schemas.openxmlformats.org/officeDocument/2006/customXml
\"
>"
);
if
(
m_oShemaRefs
.
IsInit
()
)
sXml
+=
m_oShemaRefs
->
toXML
();
...
...
Common/DocxFormat/Source/DocxFormat/Document.h
View file @
8ecdeeed
...
...
@@ -449,7 +449,9 @@ namespace OOX
if
(
SimpleTypes
::
conformanceclassTransitional
!=
m_oConformance
.
GetValue
()
)
{
sXml
.
Format
(
_T
(
"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
standalone=
\"
yes
\"
?><w:document w:conformance=
\"
%ls
\"
xmlns:wpc=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas
\"
xmlns:mc=
\"
http://schemas.openxmlformats.org/markup-compatibility/2006
\"
xmlns:o=
\"
urn:schemas-microsoft-com:office:office
\"
xmlns:r=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships
\"
xmlns:m=
\"
http://schemas.openxmlformats.org/officeDocument/2006/math
\"
xmlns:v=
\"
urn:schemas-microsoft-com:vml
\"
xmlns:wp14=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing
\"
xmlns:wp=
\"
http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing
\"
xmlns:w10=
\"
urn:schemas-microsoft-com:office:word
\"
xmlns:w=
\"
http://schemas.openxmlformats.org/wordprocessingml/2006/main
\"
xmlns:w14=
\"
http://schemas.microsoft.com/office/word/2010/wordml
\"
xmlns:wpg=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingGroup
\"
xmlns:wpi=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingInk
\"
xmlns:wne=
\"
http://schemas.microsoft.com/office/word/2006/wordml
\"
xmlns:wps=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingShape
\"
mc:Ignorable=
\"
w14 wp14
\"
>"
),
m_oConformance
.
ToString
()
);
sXml
+=
_T
(
"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
standalone=
\"
yes
\"
?><w:document w:conformance=
\"
"
);
sXml
+=
m_oConformance
.
ToString
();
sXml
+=
_T
(
"
\"
xmlns:wpc=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas
\"
xmlns:mc=
\"
http://schemas.openxmlformats.org/markup-compatibility/2006
\"
xmlns:o=
\"
urn:schemas-microsoft-com:office:office
\"
xmlns:r=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships
\"
xmlns:m=
\"
http://schemas.openxmlformats.org/officeDocument/2006/math
\"
xmlns:v=
\"
urn:schemas-microsoft-com:vml
\"
xmlns:wp14=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing
\"
xmlns:wp=
\"
http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing
\"
xmlns:w10=
\"
urn:schemas-microsoft-com:office:word
\"
xmlns:w=
\"
http://schemas.openxmlformats.org/wordprocessingml/2006/main
\"
xmlns:w14=
\"
http://schemas.microsoft.com/office/word/2010/wordml
\"
xmlns:wpg=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingGroup
\"
xmlns:wpi=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingInk
\"
xmlns:wne=
\"
http://schemas.microsoft.com/office/word/2006/wordml
\"
xmlns:wps=
\"
http://schemas.microsoft.com/office/word/2010/wordprocessingShape
\"
mc:Ignorable=
\"
w14 wp14
\"
>"
);
}
else
{
...
...
Common/DocxFormat/Source/DocxFormat/Drawing/DrawingParagraph.h
View file @
8ecdeeed
...
...
@@ -75,7 +75,7 @@ namespace OOX
CString
sResult
;
if
(
m_oSpace
.
IsInit
()
)
sResult
.
Format
(
_T
(
"<a:t xml:space=
\"
%ls
\"
>"
),
m_oSpace
->
ToString
()
);
sResult
=
_T
(
"<a:t xml:space=
\"
"
)
+
m_oSpace
->
ToString
()
+
_T
(
"
\"
>"
);
else
sResult
=
_T
(
"<a:t>"
);
...
...
Common/DocxFormat/Source/DocxFormat/Logic/Annotations.h
View file @
8ecdeeed
...
...
@@ -1354,25 +1354,12 @@ namespace OOX
{
CString
sResult
=
_T
(
"<w:permStart "
);
ComplexTypes_WriteAttribute
(
_T
(
"w:colFirst=
\"
"
),
m_oColFirst
);
ComplexTypes_WriteAttribute
(
_T
(
"w:colLast=
\"
"
),
m_oColLast
);
ComplexTypes_WriteAttribute
(
_T
(
"w:displacedbyCustomXml=
\"
"
),
m_oDisplacedByCustomXml
);
if
(
m_sEd
.
IsInit
()
)
{
sResult
+=
_T
(
"w:ed=
\"
"
);
sResult
+=
m_sEd
->
GetString
();
sResult
+=
_T
(
"
\"
"
);
}
ComplexTypes_WriteAttribute
(
_T
(
"w:edGrp=
\"
"
),
m_oEdGrp
);
if
(
m_sId
.
IsInit
()
)
{
sResult
+=
_T
(
"w:id=
\"
"
);
sResult
+=
m_sId
->
GetString
();
sResult
+=
_T
(
"
\"
"
);
}
ComplexTypes_WriteAttribute
(
_T
(
"w:colFirst=
\"
"
),
m_oColFirst
);
ComplexTypes_WriteAttribute
(
_T
(
"w:colLast=
\"
"
),
m_oColLast
);
ComplexTypes_WriteAttribute
(
_T
(
"w:displacedbyCustomXml=
\"
"
),
m_oDisplacedByCustomXml
);
ComplexTypes_WriteAttribute2
(
_T
(
"w:ed=
\"
"
),
m_sEd
);
ComplexTypes_WriteAttribute
(
_T
(
"w:edGrp=
\"
"
),
m_oEdGrp
);
ComplexTypes_WriteAttribute2
(
_T
(
"w:id=
\"
"
),
m_sId
);
sResult
+=
_T
(
"/>"
);
...
...
Common/DocxFormat/Source/DocxFormat/Logic/Dir.cpp
View file @
8ecdeeed
...
...
@@ -153,9 +153,9 @@ namespace OOX
if
(
m_oVal
.
IsInit
())
{
#if defined(_WIN32) || defined (_WIN64)
sResult
.
AppendFormat
(
_T
(
" val=
\"
%ls
\"
"
),
m_oVal
->
ToString
()
);
sResult
+=
_T
(
" val=
\"
"
)
+
m_oVal
->
ToString
()
+
_T
(
"
\"
"
);
#else
sResult
.
AppendFormat
(
_T
(
" val=
\"
%ls
\"
"
),
m_oVal
->
ToString
().
c_str
()
);
sResult
+=
_T
(
" val=
\"
"
)
+
m_oVal
->
ToString
().
c_str
()
+
_T
(
"
\"
"
);
#endif
}
sResult
+=
_T
(
">"
);
...
...
Common/DocxFormat/Source/DocxFormat/Logic/RunContent.h
View file @
8ecdeeed
...
...
@@ -333,7 +333,7 @@ namespace OOX
CString
sResult
;
if
(
m_oSpace
.
IsInit
()
)
sResult
.
Format
(
_T
(
"<w:delText xml:space=
\"
%ls
\"
>"
),
m_oSpace
->
ToString
()
);
sResult
=
_T
(
"<w:delText xml:space=
\"
"
)
+
m_oSpace
->
ToString
()
+
_T
(
"
\"
>"
);
else
sResult
=
_T
(
"<w:delText>"
);
...
...
@@ -798,7 +798,7 @@ namespace OOX
CString
sResult
;
if
(
m_oSpace
.
IsInit
()
)
sResult
.
Format
(
_T
(
"<w:t xml:space=
\"
%ls
\"
>"
),
m_oSpace
->
ToString
()
);
sResult
=
_T
(
"<w:t xml:space=
\"
"
)
+
m_oSpace
->
ToString
()
+
_T
(
"
\"
>"
);
else
sResult
=
_T
(
"<w:t>"
);
...
...
@@ -1121,7 +1121,7 @@ namespace OOX
CString
sResult
;
if
(
m_oSpace
.
IsInit
()
)
sResult
.
Format
(
_T
(
"<w:delInstrText xml:space=
\"
%ls
\"
>"
),
m_oSpace
->
ToString
()
);
sResult
=
_T
(
"<w:delInstrText xml:space=
\"
"
)
+
m_oSpace
->
ToString
()
+
_T
(
"
\"
>"
);
else
sResult
=
_T
(
"<w:delInstrText>"
);
...
...
@@ -1423,7 +1423,7 @@ namespace OOX
CString
sResult
;
if
(
m_oSpace
.
IsInit
()
)
sResult
.
Format
(
_T
(
"<w:instrText xml:space=
\"
%ls
\"
>"
),
m_oSpace
->
ToString
()
);
sResult
=
_T
(
"<w:instrText xml:space=
\"
"
)
+
m_oSpace
->
ToString
()
+
_T
(
"
\"
>"
);
else
sResult
=
_T
(
"<w:instrText>"
);
...
...
Common/DocxFormat/Source/DocxFormat/Logic/Sdt.h
View file @
8ecdeeed
...
...
@@ -204,10 +204,7 @@ namespace ComplexTypes
}
virtual
CString
ToString
()
const
{
CString
sResult
;
sResult
.
Format
(
_T
(
"w:val=
\"
%ls
\"
"
),
m_oVal
.
ToString
()
);
CString
sResult
=
_T
(
"w:val=
\"
"
)
+
m_oVal
.
ToString
()
+
_T
(
"
\"
"
);
return
sResult
;
}
private:
...
...
@@ -252,10 +249,7 @@ namespace ComplexTypes
}
virtual
CString
ToString
()
const
{
CString
sResult
;
sResult
.
Format
(
_T
(
"w:val=
\"
%ls
\"
"
),
m_oVal
.
ToString
()
);
CString
sResult
=
_T
(
"w:val=
\"
"
)
+
m_oVal
.
ToString
()
+
_T
(
"
\"
"
);
return
sResult
;
}
private:
...
...
@@ -300,9 +294,7 @@ namespace ComplexTypes
}
virtual
CString
ToString
()
const
{
CString
sResult
;
sResult
.
Format
(
_T
(
"w:val=
\"
%ls
\"
"
),
m_oVal
.
ToString
()
);
CString
sResult
=
_T
(
"w:val=
\"
"
)
+
m_oVal
.
ToString
()
+
_T
(
"
\"
"
);
return
sResult
;
}
...
...
@@ -348,9 +340,7 @@ namespace ComplexTypes
}
virtual
CString
ToString
()
const
{
CString
sResult
;
sResult
.
Format
(
_T
(
"w:multiLine=
\"
%ls
\"
"
),
m_oMultiLine
.
ToString
()
);
CString
sResult
=
_T
(
"w:multiLine=
\"
"
)
+
m_oMultiLine
.
ToString
()
+
_T
(
"
\"
"
);
return
sResult
;
}
...
...
Common/DocxFormat/Source/DocxFormat/Logic/Vml.cpp
View file @
8ecdeeed
...
...
@@ -1023,8 +1023,7 @@ namespace OOX
sResult
+=
_T
(
"<x:SizeWithCells/>"
);
if
(
m_oAnchor
.
IsInit
())
{
CString
sAnchor
;
sAnchor
.
Format
(
_T
(
"<x:Anchor>%ls</x:Anchor>"
),
m_oAnchor
.
get
());
sResult
+=
sAnchor
;
sResult
+=
_T
(
"<x:Anchor>"
)
+
m_oAnchor
.
get
()
+
_T
(
"</x:Anchor>"
);
}
if
(
m_oRow
.
IsInit
())
{
...
...
Common/DocxFormat/Source/DocxFormat/Math/oMathContent.h
View file @
8ecdeeed
...
...
@@ -3293,7 +3293,7 @@ namespace OOX
CString
sResult
;
if
(
m_oSpace
.
IsInit
()
)
sResult
.
Format
(
_T
(
"<m:t xml:space=
\"
%ls
\"
>"
),
m_oSpace
->
ToString
()
);
sResult
=
_T
(
"<m:t xml:space=
\"
"
)
+
m_oSpace
->
ToString
()
+
_T
(
"
\"
>"
);
else
sResult
=
_T
(
"<m:t>"
);
...
...
Common/DocxFormat/Source/DocxFormat/Styles.h
View file @
8ecdeeed
...
...
@@ -472,7 +472,13 @@ namespace OOX
virtual
CString
toXML
()
const
{
CString
sResult
;
sResult
.
Format
(
_T
(
"<w:latentStyles w:count=
\"
%d
\"
w:defLockedState=
\"
%ls
\"
w:defQFormat=
\"
%ls
\"
w:defSemiHidden=
\"
%ls
\"
w:defUIPriority=
\"
%d
\"
w:defUnhideWhenUsed=
\"
%ls
\"
>"
),
m_oCount
.
GetValue
(),
m_oDefLockedState
.
ToString
(),
m_oDefQFormat
.
ToString
(),
m_oDefSemiHidden
.
ToString
(),
m_oDefUiPriority
.
GetValue
(),
m_oDefUnhideWhenUsed
.
ToString
()
);
sResult
.
AppendFormat
(
_T
(
"<w:latentStyles w:count=
\"
%d
\"
"
),
m_oCount
.
GetValue
());
sResult
+=
_T
(
" w:defLockedState=
\"
"
)
+
m_oDefLockedState
.
ToString
()
+
_T
(
"
\"
"
);
sResult
+=
_T
(
" w:defQFormat=
\"
"
)
+
m_oDefQFormat
.
ToString
()
+
_T
(
"
\"
"
);
sResult
+=
_T
(
" w:defSemiHidden=
\"
"
)
+
m_oDefSemiHidden
.
ToString
()
+
_T
(
"
\"
"
);
sResult
.
AppendFormat
(
_T
(
" w:defUIPriority=
\"
%d
\"
"
),
m_oDefUiPriority
.
GetValue
());
sResult
+=
_T
(
" w:defUnhideWhenUsed=
\"
"
)
+
m_oDefUnhideWhenUsed
.
ToString
();
sResult
+=
_T
(
"
\"
>"
);
for
(
unsigned
int
nIndex
=
0
;
nIndex
<
m_arrLsdException
.
size
();
nIndex
++
)
{
...
...
Common/DocxFormat/Source/SystemUtility/FileSystem/Directory.cpp
View file @
8ecdeeed
...
...
@@ -131,7 +131,7 @@ namespace FileSystem
memset
(
pBuffer
,
0
,
sizeof
(
TCHAR
)
*
(
MAX_PATH
+
1
));
::
GetTempPathW
(
MAX_PATH
,
pBuffer
);
CString
res
;
res
.
AppendFormat
(
_T
(
"%ls"
),
pBuffer
);
res
+=
CString
(
pBuffer
);
int
nSeparator1Pos
=
res
.
ReverseFind
(
_T
(
'/'
));
if
(
-
1
==
nSeparator1Pos
)
...
...
Common/DocxFormat/Source/XlsxFormat/Comments/Comments.h
View file @
8ecdeeed
...
...
@@ -373,7 +373,7 @@ namespace OOX
{
if
(
m_oId
.
IsInit
())
{
CString
sVal
;
sVal
.
Format
(
_T
(
"<legacyDrawing r:id=
\"
%ls
\"
/>"
),
m_oId
->
GetValue
()
);
CString
sVal
=
_T
(
"<legacyDrawing r:id=
\"
"
)
+
m_oId
->
GetValue
()
+
_T
(
"
\"
/>"
);
writer
.
WriteString
(
sVal
);
}
...
...
Common/DocxFormat/Source/XlsxFormat/Drawing/CellAnchor.h
View file @
8ecdeeed
...
...
@@ -69,8 +69,9 @@ namespace OOX
CString
sEnd
;
if
(
m_oFrom
.
IsInit
()
&&
m_oTo
.
IsInit
())
{
sStart
.
Format
(
_T
(
"<xdr:twoCellAnchor editAs=
\"
%ls
\"
>"
),
m_oAnchorType
.
ToString
());
sEnd
=
_T
(
"</xdr:twoCellAnchor>"
);
sStart
=
_T
(
"<xdr:twoCellAnchor editAs=
\"
"
)
+
m_oAnchorType
.
ToString
()
+
_T
(
"
\"
>"
);
sEnd
=
_T
(
"</xdr:twoCellAnchor>"
);
writer
.
WriteString
(
sStart
);
if
(
m_oFrom
.
IsInit
())
m_oFrom
->
toXML2
(
writer
,
_T
(
"xdr:from"
));
...
...
Common/DocxFormat/Source/XlsxFormat/Drawing/Drawing.h
View file @
8ecdeeed
...
...
@@ -64,7 +64,7 @@ namespace OOX
{
if
(
m_oId
.
IsInit
())
{
CString
sVal
;
sVal
.
Format
(
_T
(
"<drawing r:id=
\"
%ls
\"
/>"
),
m_oId
->
GetValue
()
);
CString
sVal
=
_T
(
"<drawing r:id=
\"
"
)
+
m_oId
->
GetValue
()
+
_T
(
"
\"
/>"
);
writer
.
WriteString
(
sVal
);
}
...
...
Common/DocxFormat/Source/XlsxFormat/Drawing/FromTo.h
View file @
8ecdeeed
...
...
@@ -60,7 +60,7 @@ namespace OOX
}
virtual
void
toXML2
(
XmlUtils
::
CStringWriter
&
writer
,
CString
sName
)
const
{
CString
sStart
;
sStart
.
Format
(
_T
(
"<%ls>"
),
sName
);
CString
sStart
=
_T
(
"<"
)
+
sName
+
_T
(
">"
);
writer
.
WriteString
(
sStart
);
if
(
m_oCol
.
IsInit
())
{
...
...
@@ -82,7 +82,7 @@ namespace OOX
CString
sVal
;
sVal
.
Format
(
_T
(
"<xdr:rowOff>%lld</xdr:rowOff>"
),
m_oRowOff
->
ToEmu
());
writer
.
WriteString
(
sVal
);
}
CString
sEnd
;
sEnd
.
Format
(
_T
(
"</%ls>"
),
sName
);
CString
sEnd
=
_T
(
"</"
)
+
sName
+
_T
(
">"
);
writer
.
WriteString
(
sEnd
);
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
...
...
Common/DocxFormat/Source/XlsxFormat/Drawing/Pic.h
View file @
8ecdeeed
...
...
@@ -250,12 +250,13 @@ namespace OOX
{
if
(
m_oBlipFill
.
IsInit
()
&&
m_oBlipFill
->
m_oBlip
.
IsInit
())
{
CString
sRes
;
sRes
.
Format
(
_T
(
"<xdr:pic><xdr:nvPicPr><xdr:cNvPr id=
\"
1
\"
name=
\"
image
\"
/><xdr:cNvPicPr><a:picLocks noChangeAspect=
\"
1
\"
/></xdr:cNvPicPr></xdr:nvPicPr><xdr:blipFill><a:blip xmlns:r=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships
\"
r:embed=
\"
%ls
\"
cstate=
\"
print
\"
><a:extLst><a:ext uri=
\"
{28A0092B-C50C-407E-A947-70E740481C1C}
\"
><a14:useLocalDpi xmlns:a14=
\"
http://schemas.microsoft.com/office/drawing/2010/main
\"
val=
\"
0
\"
/></a:ext></a:extLst></a:blip><a:stretch><a:fillRect/></a:stretch></xdr:blipFill><xdr:spPr><a:prstGeom prst=
\"
rect
\"
><a:avLst/></a:prstGeom></xdr:spPr></xdr:pic><xdr:clientData/>"
),
m_oBlipFill
->
m_oBlip
->
m_oEmbed
.
GetValue
());
CString
sRes
=
_T
(
"<xdr:pic><xdr:nvPicPr><xdr:cNvPr id=
\"
1
\"
name=
\"
image
\"
/><xdr:cNvPicPr><a:picLocks noChangeAspect=
\"
1
\"
/></xdr:cNvPicPr></xdr:nvPicPr><xdr:blipFill><a:blip xmlns:r=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships
\"
r:embed=
\"
"
);
sRes
+=
m_oBlipFill
->
m_oBlip
->
m_oEmbed
.
GetValue
();
sRes
+=
_T
(
"
\"
cstate=
\"
print
\"
><a:extLst><a:ext uri=
\"
{28A0092B-C50C-407E-A947-70E740481C1C}
\"
><a14:useLocalDpi xmlns:a14=
\"
http://schemas.microsoft.com/office/drawing/2010/main
\"
val=
\"
0
\"
/></a:ext></a:extLst></a:blip><a:stretch><a:fillRect/></a:stretch></xdr:blipFill><xdr:spPr><a:prstGeom prst=
\"
rect
\"
><a:avLst/></a:prstGeom></xdr:spPr></xdr:pic><xdr:clientData/>"
);
writer
.
WriteString
(
sRes
);
}
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
...
...
Common/DocxFormat/Source/XlsxFormat/ExternalLinks/ExternalLinks.h
View file @
8ecdeeed
...
...
@@ -80,7 +80,7 @@ namespace OOX
if
(
m_oRid
.
IsInit
())
{
CString
sVal
;
sVal
.
Format
(
_T
(
" r:id=
\"
%ls
\"
"
),
m_oRid
->
GetValue
()
);
CString
sVal
=
_T
(
" r:id=
\"
"
)
+
m_oRid
->
GetValue
()
+
_T
(
"
\"
"
);
sResult
+=
sVal
;
sResult
+=
_T
(
" xmlns:r=
\"
http://schemas.openxmlformats.org/officeDocument/2006/relationships
\"
"
);
}
...
...
Common/DocxFormat/Source/XlsxFormat/Styles/NumFmts.h
View file @
8ecdeeed
...
...
@@ -82,8 +82,7 @@ namespace OOX
}
if
(
m_oSourceLinked
.
IsInit
())
{
CString
sVal
;
sVal
.
Format
(
_T
(
" sourceLinked=
\"
%ls
\"
"
),
m_oSourceLinked
->
ToString2
(
SimpleTypes
::
onofftostring1
));
CString
sVal
=
_T
(
" sourceLinked=
\"
"
)
+
m_oSourceLinked
->
ToString2
(
SimpleTypes
::
onofftostring1
)
+
_T
(
"
\"
"
);
writer
.
WriteString
(
sVal
);
}
writer
.
WriteString
(
_T
(
"/>"
));
...
...
Common/DocxFormat/Source/XlsxFormat/Styles/TableStyles.h
View file @
8ecdeeed
...
...
@@ -61,11 +61,12 @@ namespace OOX
{
if
(
m_oType
.
IsInit
()
&&
m_oDxfId
.
IsInit
())
{
CString
sXml
;
CString
sXml
=
_T
(
"<tableStyleElement type=
\"
"
)
+
m_oType
->
ToString
()
+
_T
(
"
\"
"
);
if
(
m_oSize
.
IsInit
())
sXml
.
Format
(
_T
(
"<tableStyleElement type=
\"
%ls
\"
size=
\"
%d
\"
dxfId=
\"
%d
\"
/>"
),
m_oType
->
ToString
(),
m_oSize
->
GetValue
(),
m_oDxfId
->
GetValue
());
else
sXml
.
Format
(
_T
(
"<tableStyleElement type=
\"
%ls
\"
dxfId=
\"
%d
\"
/>"
),
m_oType
->
ToString
(),
m_oDxfId
->
GetValue
());
sXml
.
AppendFormat
(
_T
(
" size=
\"
%d
\"
"
),
m_oSize
->
GetValue
());
sXml
.
AppendFormat
(
_T
(
" dxfId=
\"
%d
\"
/>"
),
m_oDxfId
->
GetValue
());
writer
.
WriteString
(
sXml
);
}
}
...
...
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