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
6982b1d3
Commit
6982b1d3
authored
Jun 08, 2016
by
konovalovsergey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TableCellSpacing
parent
dad96cc4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
2 deletions
+27
-2
ASCOfficeDocxFile2/BinReader/ReaderClasses.h
ASCOfficeDocxFile2/BinReader/ReaderClasses.h
+4
-1
ASCOfficeDocxFile2/BinReader/Readers.h
ASCOfficeDocxFile2/BinReader/Readers.h
+7
-0
ASCOfficeDocxFile2/BinWriter/BinReaderWriterDefines.h
ASCOfficeDocxFile2/BinWriter/BinReaderWriterDefines.h
+2
-1
ASCOfficeDocxFile2/BinWriter/BinWriters.h
ASCOfficeDocxFile2/BinWriter/BinWriters.h
+14
-0
No files found.
ASCOfficeDocxFile2/BinReader/ReaderClasses.h
View file @
6982b1d3
...
...
@@ -2270,9 +2270,10 @@ public:
CString
Look
;
CString
Layout
;
CString
tblPrChange
;
CString
TableCellSpacing
;
bool
IsEmpty
()
{
return
Jc
.
IsEmpty
()
&&
TableInd
.
IsEmpty
()
&&
TableW
.
IsEmpty
()
&&
TableCellMar
.
IsEmpty
()
&&
TableBorders
.
IsEmpty
()
&&
Shd
.
IsEmpty
()
&&
tblpPr
.
IsEmpty
()
&&
Style
.
IsEmpty
()
&&
Look
.
IsEmpty
()
&&
tblPrChange
.
IsEmpty
();
return
Jc
.
IsEmpty
()
&&
TableInd
.
IsEmpty
()
&&
TableW
.
IsEmpty
()
&&
TableCellMar
.
IsEmpty
()
&&
TableBorders
.
IsEmpty
()
&&
Shd
.
IsEmpty
()
&&
tblpPr
.
IsEmpty
()
&&
Style
.
IsEmpty
()
&&
Look
.
IsEmpty
()
&&
tblPrChange
.
IsEmpty
()
&&
TableCellSpacing
.
IsEmpty
()
;
}
CString
Write
(
bool
bBandSize
,
bool
bLayout
)
{
...
...
@@ -2288,6 +2289,8 @@ public:
sRes
.
Append
(
TableW
);
if
(
false
==
Jc
.
IsEmpty
())
sRes
.
Append
(
Jc
);
if
(
false
==
TableCellSpacing
.
IsEmpty
())
sRes
.
Append
(
TableCellSpacing
);
if
(
false
==
TableInd
.
IsEmpty
())
sRes
.
Append
(
TableInd
);
if
(
false
==
TableBorders
.
IsEmpty
())
...
...
ASCOfficeDocxFile2/BinReader/Readers.h
View file @
6982b1d3
...
...
@@ -1629,6 +1629,13 @@ public:
res
=
Read1
(
length
,
&
Binary_tblPrReader
::
ReadTblPrChange
,
this
,
&
tblPrChange
);
pWiterTblPr
->
tblPrChange
=
tblPrChange
.
ToString
(
_T
(
"w:tblPrChange"
));
}
else
if
(
c_oSerProp_tblPrType
::
TableCellSpacing
==
type
)
{
double
dSpacing
=
m_oBufferedStream
.
GetDouble
();
dSpacing
/=
2
;
long
nSpacing
=
SerializeCommon
::
Round
(
g_dKoef_mm_to_twips
*
dSpacing
);
pWiterTblPr
->
TableCellSpacing
.
Format
(
_T
(
"<w:tblCellSpacing w:w=
\"
%d
\"
w:type=
\"
dxa
\"
/>"
),
nSpacing
);
}
else
res
=
c_oSerConstants
::
ReadUnknown
;
return
res
;
...
...
ASCOfficeDocxFile2/BinWriter/BinReaderWriterDefines.h
View file @
6982b1d3
...
...
@@ -248,7 +248,8 @@ extern int g_nCurFormatVersion;
Style
=
10
,
tblpPr2
=
11
,
Layout
=
12
,
tblPrChange
=
13
tblPrChange
=
13
,
TableCellSpacing
=
14
};}
namespace
c_oSer_tblpPrType
{
enum
c_oSer_tblpPrType
{
...
...
ASCOfficeDocxFile2/BinWriter/BinWriters.h
View file @
6982b1d3
...
...
@@ -1706,6 +1706,20 @@ namespace BinDocxRW
WriteTblPrChange
(
tblPr
.
m_oTblPrChange
.
get
());
m_oBcw
.
WriteItemEnd
(
nCurPos
);
}
if
(
tblPr
.
m_oTblCellSpacing
.
IsInit
())
{
const
ComplexTypes
::
Word
::
CTblWidth
&
cs
=
tblPr
.
m_oTblCellSpacing
.
get
();
if
(
cs
.
m_oW
.
IsInit
()
&&
false
==
cs
.
m_oW
->
IsPercent
()
&&
cs
.
m_oType
.
IsInit
()
&&
SimpleTypes
::
tblwidthDxa
==
cs
.
m_oType
->
GetValue
())
{
SimpleTypes
::
CPoint
oPoint
;
oPoint
.
FromTwips
(
cs
.
m_oW
->
GetValue
());
nCurPos
=
m_oBcw
.
WriteItemStart
(
c_oSerProp_tblPrType
::
TableCellSpacing
);
m_oBcw
.
m_oStream
.
WriteDouble
(
oPoint
.
ToMm
()
*
2
);
//Умножаем на 2 из-за разного понимания cellSpacing
m_oBcw
.
WriteItemEnd
(
nCurPos
);
}
}
};
void
WriteTblMar
(
const
OOX
::
Logic
::
CTblCellMar
&
cellMar
)
{
...
...
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