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
6b5e03df
Commit
6b5e03df
authored
Dec 23, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
d0e01095
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
28 deletions
+28
-28
Common/DocxFormat/Source/XlsxFormat/Comments/Comments.h
Common/DocxFormat/Source/XlsxFormat/Comments/Comments.h
+27
-27
XlsxSerializerCom/Reader/BinaryWriter.h
XlsxSerializerCom/Reader/BinaryWriter.h
+1
-1
No files found.
Common/DocxFormat/Source/XlsxFormat/Comments/Comments.h
View file @
6b5e03df
...
...
@@ -83,13 +83,18 @@ namespace OOX
}
virtual
~
CAuthors
()
{
ClearItems
();
}
virtual
void
ClearItems
()
{
m_arrItems
.
clear
();
}
virtual
void
fromXML
(
XmlUtils
::
CXmlNode
&
node
)
{
}
virtual
std
::
wstring
toXML
()
const
virtual
std
::
wstring
toXML
()
const
{
return
_T
(
""
)
;
return
L""
;
}
virtual
void
toXML
(
NSStringUtils
::
CStringBuilder
&
writer
)
const
{
...
...
@@ -106,7 +111,7 @@ namespace OOX
}
writer
.
WriteString
(
L"</authors>"
);
}
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
virtual
void
fromXML
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
ReadAttributes
(
oReader
);
...
...
@@ -118,8 +123,11 @@ namespace OOX
{
std
::
wstring
sName
=
XmlUtils
::
GetNameNoNS
(
oReader
.
GetName
());
if
(
_T
(
"author"
)
==
sName
)
m_arrItems
.
push_back
(
new
std
::
wstring
(
oReader
.
GetText3
()));
if
(
L"author"
==
sName
)
{
std
::
wstring
*
str
=
new
std
::
wstring
(
oReader
.
GetText3
());
m_arrItems
.
push_back
(
str
);
}
}
}
...
...
@@ -148,7 +156,7 @@ namespace OOX
}
virtual
std
::
wstring
toXML
()
const
{
return
_T
(
""
)
;
return
L""
;
}
virtual
void
toXML
(
NSStringUtils
::
CStringBuilder
&
writer
)
const
{
...
...
@@ -190,13 +198,10 @@ namespace OOX
private:
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
// Читаем атрибуты
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"ref"
),
m_oRef
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"authorId"
),
m_oAuthorId
)
WritingElement_ReadAttributes_End
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
L"ref"
,
m_oRef
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
L"authorId"
,
m_oAuthorId
)
WritingElement_ReadAttributes_End
(
oReader
)
}
public:
nullable
<
SimpleTypes
::
CRelationshipId
>
m_oRef
;
...
...
@@ -219,7 +224,7 @@ namespace OOX
}
virtual
std
::
wstring
toXML
()
const
{
return
_T
(
""
)
;
return
L""
;
}
virtual
void
toXML
(
NSStringUtils
::
CStringBuilder
&
writer
)
const
{
...
...
@@ -247,7 +252,7 @@ namespace OOX
{
std
::
wstring
sName
=
XmlUtils
::
GetNameNoNS
(
oReader
.
GetName
());
if
(
_T
(
"comment"
)
==
sName
)
if
(
L"comment"
==
sName
)
m_arrItems
.
push_back
(
new
CComment
(
oReader
));
}
}
...
...
@@ -277,8 +282,6 @@ namespace OOX
virtual
~
CComments
()
{
}
public:
virtual
void
read
(
const
CPath
&
oPath
)
{
//don't use this. use read(const CPath& oRootPath, const CPath& oFilePath)
...
...
@@ -299,7 +302,7 @@ namespace OOX
return
;
std
::
wstring
sName
=
XmlUtils
::
GetNameNoNS
(
oReader
.
GetName
());
if
(
_T
(
"comments"
)
==
sName
)
if
(
L"comments"
==
sName
)
{
ReadAttributes
(
oReader
);
...
...
@@ -310,9 +313,9 @@ namespace OOX
{
sName
=
XmlUtils
::
GetNameNoNS
(
oReader
.
GetName
());
if
(
_T
(
"authors"
)
==
sName
)
if
(
L"authors"
==
sName
)
m_oAuthors
=
oReader
;
else
if
(
_T
(
"commentList"
)
==
sName
)
else
if
(
L"commentList"
==
sName
)
m_oCommentList
=
oReader
;
}
}
...
...
@@ -321,12 +324,12 @@ namespace OOX
virtual
void
write
(
const
CPath
&
oPath
,
const
CPath
&
oDirectory
,
CContentTypes
&
oContent
)
const
{
NSStringUtils
::
CStringBuilder
sXml
;
sXml
.
WriteString
(
_T
(
"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
standalone=
\"
yes
\"
?><comments xmlns=
\"
http://schemas.openxmlformats.org/spreadsheetml/2006/main
\"
>"
)
);
sXml
.
WriteString
(
L"<?xml version=
\"
1.0
\"
encoding=
\"
UTF-8
\"
standalone=
\"
yes
\"
?><comments xmlns=
\"
http://schemas.openxmlformats.org/spreadsheetml/2006/main
\"
>"
);
if
(
m_oAuthors
.
IsInit
())
m_oAuthors
->
toXML
(
sXml
);
if
(
m_oCommentList
.
IsInit
())
m_oCommentList
->
toXML
(
sXml
);
sXml
.
WriteString
(
_T
(
"</comments>"
)
);
sXml
.
WriteString
(
L"</comments>"
);
std
::
wstring
sPath
=
oPath
.
GetPath
();
NSFile
::
CFileBinary
::
SaveToFile
(
sPath
,
sXml
.
GetData
());
...
...
@@ -375,7 +378,7 @@ namespace OOX
}
virtual
std
::
wstring
toXML
()
const
{
return
_T
(
""
)
;
return
L""
;
}
virtual
void
toXML
(
NSStringUtils
::
CStringBuilder
&
writer
)
const
{
...
...
@@ -403,12 +406,9 @@ namespace OOX
private:
void
ReadAttributes
(
XmlUtils
::
CXmlLiteReader
&
oReader
)
{
// Читаем атрибуты
WritingElement_ReadAttributes_Start
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
_T
(
"r:id"
),
m_oId
)
WritingElement_ReadAttributes_End
(
oReader
)
WritingElement_ReadAttributes_Read_if
(
oReader
,
L"r:id"
,
m_oId
)
WritingElement_ReadAttributes_End
(
oReader
)
}
public:
nullable
<
SimpleTypes
::
CRelationshipId
>
m_oId
;
...
...
XlsxSerializerCom/Reader/BinaryWriter.h
View file @
6b5e03df
...
...
@@ -187,7 +187,7 @@ namespace BinXlsxRW
WriteFilterColumns
(
oAutofilter
.
m_arrItems
);
m_oBcw
.
WriteItemEnd
(
nCurPos
);
}
if
(
!
oAutofilter
.
m_oSortState
.
IsInit
())
if
(
oAutofilter
.
m_oSortState
.
IsInit
())
{
nCurPos
=
m_oBcw
.
WriteItemStart
(
c_oSer_AutoFilter
::
SortState
);
WriteSortState
(
oAutofilter
.
m_oSortState
.
get
());
...
...
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