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
3d198bc2
Commit
3d198bc2
authored
Jan 11, 2018
by
Sergey Konovalov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
for xlsx comments: Tahoma 9, User name in comment body
parent
05ff75ee
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
20 deletions
+30
-20
Common/DocxFormat/Source/XlsxFormat/Worksheets/Worksheet.h
Common/DocxFormat/Source/XlsxFormat/Worksheets/Worksheet.h
+1
-1
XlsxSerializerCom/Reader/BinaryWriter.h
XlsxSerializerCom/Reader/BinaryWriter.h
+4
-4
XlsxSerializerCom/Writer/BinaryReader.h
XlsxSerializerCom/Writer/BinaryReader.h
+25
-15
No files found.
Common/DocxFormat/Source/XlsxFormat/Worksheets/Worksheet.h
View file @
3d198bc2
...
...
@@ -245,7 +245,7 @@ namespace OOX
}
for
(
std
::
list
<
OOX
::
WritingElement
*>::
iterator
it1
=
pShape
->
m_arrItems
.
begin
();
it1
!=
pShape
->
m_arrItems
.
end
();
it1
++
)
{
OOX
::
WritingElement
*
pElem
=
*
it
;
OOX
::
WritingElement
*
pElem
=
*
it
1
;
if
(
!
pElem
)
continue
;
if
(
OOX
::
et_v_ClientData
==
pElem
->
getType
())
...
...
XlsxSerializerCom/Reader/BinaryWriter.h
View file @
3d198bc2
...
...
@@ -3617,15 +3617,15 @@ namespace BinXlsxRW
void
WriteCommentDataContent
(
OOX
::
Spreadsheet
::
CCommentItem
*
pComment
,
SerializeCommon
::
CommentData
*
pCommentData
,
nullable
<
OOX
::
Spreadsheet
::
CSi
>*
pCommentText
)
{
int
nCurPos
=
0
;
if
(
NULL
!=
pComment
Text
&&
pCommentText
->
IsInit
())
if
(
NULL
!=
pComment
Data
&&
!
pCommentData
->
sText
.
empty
())
{
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSer_CommentData
::
Text
);
m_oBcw
.
m_oStream
.
WriteStringW
(
(
*
pCommentText
)
->
ToString
()
);
m_oBcw
.
m_oStream
.
WriteStringW
(
pCommentData
->
sText
);
}
else
if
(
NULL
!=
pComment
Data
&&
!
pCommentData
->
sText
.
empty
())
else
if
(
NULL
!=
pComment
Text
&&
pCommentText
->
IsInit
())
{
m_oBcw
.
m_oStream
.
WriteBYTE
(
c_oSer_CommentData
::
Text
);
m_oBcw
.
m_oStream
.
WriteStringW
(
pCommentData
->
sText
);
m_oBcw
.
m_oStream
.
WriteStringW
(
(
*
pCommentText
)
->
ToString
()
);
}
if
(
NULL
!=
pCommentData
)
{
...
...
XlsxSerializerCom/Writer/BinaryReader.h
View file @
3d198bc2
...
...
@@ -2340,22 +2340,32 @@ namespace BinXlsxRW {
{
if
(
NULL
!=
pCommentData
&&
false
==
pCommentData
->
sText
.
empty
())
{
OOX
::
Spreadsheet
::
CRun
*
pRun
=
new
OOX
::
Spreadsheet
::
CRun
();
pRun
->
m_oRPr
.
Init
();
OOX
::
Spreadsheet
::
CRPr
&
pRPr
=
pRun
->
m_oRPr
.
get2
();
pRPr
.
m_oRFont
.
Init
();
pRPr
.
m_oRFont
->
m_sVal
.
Init
();
pRPr
.
m_oRFont
->
m_sVal
->
append
(
_T
(
"Tahoma"
));
pRPr
.
m_oSz
.
Init
();
pRPr
.
m_oSz
->
m_oVal
.
Init
();
pRPr
.
m_oSz
->
m_oVal
->
SetValue
(
8
);
addCommentRun
(
oSi
,
pCommentData
->
sUserName
+
_T
(
":"
),
true
);
addCommentRun
(
oSi
,
_T
(
"
\n
"
)
+
pCommentData
->
sText
,
false
);
}
}
void
addCommentRun
(
OOX
::
Spreadsheet
::
CSi
&
oSi
,
const
std
::
wstring
&
text
,
bool
isBold
)
{
OOX
::
Spreadsheet
::
CRun
*
pRun
=
new
OOX
::
Spreadsheet
::
CRun
();
pRun
->
m_oRPr
.
Init
();
OOX
::
Spreadsheet
::
CRPr
&
pRPr
=
pRun
->
m_oRPr
.
get2
();
if
(
isBold
)
{
pRPr
.
m_oBold
.
Init
();
pRPr
.
m_oBold
->
m_oVal
.
FromBool
(
true
);
}
pRPr
.
m_oRFont
.
Init
();
pRPr
.
m_oRFont
->
m_sVal
.
Init
();
pRPr
.
m_oRFont
->
m_sVal
->
append
(
_T
(
"Tahoma"
));
pRPr
.
m_oSz
.
Init
();
pRPr
.
m_oSz
->
m_oVal
.
Init
();
pRPr
.
m_oSz
->
m_oVal
->
SetValue
(
9
);
OOX
::
Spreadsheet
::
CText
*
pText
=
new
OOX
::
Spreadsheet
::
CText
();
pText
->
m_sText
.
append
(
pCommentData
->
sT
ext
);
OOX
::
Spreadsheet
::
CText
*
pText
=
new
OOX
::
Spreadsheet
::
CText
();
pText
->
m_sText
.
append
(
t
ext
);
pRun
->
m_arrItems
.
push_back
(
pText
);
oSi
.
m_arrItems
.
push_back
(
pRun
);
}
pRun
->
m_arrItems
.
push_back
(
pText
);
oSi
.
m_arrItems
.
push_back
(
pRun
);
}
};
class
BinaryWorksheetsTableReader
:
public
Binary_CommonReader
<
BinaryWorksheetsTableReader
>
...
...
@@ -4097,7 +4107,7 @@ namespace BinXlsxRW {
pRPr
.
m_oRFont
->
m_sVal
->
append
(
_T
(
"Tahoma"
));
pRPr
.
m_oSz
.
Init
();
pRPr
.
m_oSz
->
m_oVal
.
Init
();
pRPr
.
m_oSz
->
m_oVal
->
SetValue
(
8
);
pRPr
.
m_oSz
->
m_oVal
->
SetValue
(
9
);
pRPr
.
m_oBold
.
Init
();
pRPr
.
m_oBold
->
FromBool
(
true
);
...
...
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