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
5869c7a0
Commit
5869c7a0
authored
Feb 06, 2017
by
ElenaSubbotina
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RtfFormatWriter - fix table cell width (auto)
parent
bbd429a9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
4 deletions
+17
-4
ASCOfficeRtfFile/RtfFormatLib/source/DestinationCommand.cpp
ASCOfficeRtfFile/RtfFormatLib/source/DestinationCommand.cpp
+1
-1
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXTableReader.cpp
...ficeRtfFile/RtfFormatLib/source/Reader/OOXTableReader.cpp
+3
-1
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXtcPrReader.h
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXtcPrReader.h
+13
-2
No files found.
ASCOfficeRtfFile/RtfFormatLib/source/DestinationCommand.cpp
View file @
5869c7a0
...
...
@@ -1140,7 +1140,7 @@ bool RtfTableCellPropsCommand::ExecuteCommand(RtfDocument& oDocument, RtfReader&
}
}
COMMAND_RTF_INT
(
"clwWidth"
,
cellProps
->
m_nWidth
,
sCommand
,
hasParameter
,
parameter
)
COMMAND_RTF_BOOL
(
"clhidemark"
,
cellProps
->
m_bHideMark
,
sCommand
,
hasParameter
,
parameter
)
COMMAND_RTF_BOOL
(
"clhidemark"
,
cellProps
->
m_bHideMark
,
sCommand
,
hasParameter
,
parameter
)
COMMAND_RTF_INT
(
"clvertalt"
,
cellProps
->
m_eAlign
,
sCommand
,
true
,
RtfCellProperty
::
ca_Top
)
COMMAND_RTF_INT
(
"clvertalc"
,
cellProps
->
m_eAlign
,
sCommand
,
true
,
RtfCellProperty
::
ca_Center
)
COMMAND_RTF_INT
(
"clvertalb"
,
cellProps
->
m_eAlign
,
sCommand
,
true
,
RtfCellProperty
::
ca_Bottom
)
...
...
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXTableReader.cpp
View file @
5869c7a0
...
...
@@ -164,7 +164,9 @@ bool OOXTableReader::Parse( ReaderParameter oParam, RtfTable& oOutputTable )
for
(
int
i
=
0
;
i
<
m_ooxTable
->
m_oTblGrid
->
m_arrGridCol
.
size
();
i
++
)
{
if
(
m_ooxTable
->
m_oTblGrid
->
m_arrGridCol
[
i
]
&&
m_ooxTable
->
m_oTblGrid
->
m_arrGridCol
[
i
]
->
m_oW
.
IsInit
())
oOutputTable
.
m_aTableGrid
.
push_back
(
m_ooxTable
->
m_oTblGrid
->
m_arrGridCol
[
i
]
->
m_oW
->
ToTwips
()
);
{
oOutputTable
.
m_aTableGrid
.
push_back
(
m_ooxTable
->
m_oTblGrid
->
m_arrGridCol
[
i
]
->
m_oW
->
ToTwips
()
);
}
}
}
...
...
ASCOfficeRtfFile/RtfFormatLib/source/Reader/OOXtcPrReader.h
View file @
5869c7a0
...
...
@@ -114,8 +114,19 @@ public:
if
(
m_ooxTableCellProps
->
m_oTcW
.
IsInit
()
&&
m_ooxTableCellProps
->
m_oTcW
->
m_oW
.
IsInit
())
{
oOutputProperty
.
m_nWidth
=
m_ooxTableCellProps
->
m_oTcW
->
m_oW
->
GetValue
();
oOutputProperty
.
m_eWidthUnits
=
m_ooxTableCellProps
->
m_oTcW
->
m_oW
->
IsPercent
()
?
mu_Percent
:
mu_Twips
;
bool
auto_
=
false
;
if
(
m_ooxTableCellProps
->
m_oTcW
->
m_oType
.
IsInit
()
&&
m_ooxTableCellProps
->
m_oTcW
->
m_oType
->
GetValue
()
==
SimpleTypes
::
tblwidthAuto
)
auto_
=
true
;
if
(
auto_
)
{
oOutputProperty
.
m_eWidthUnits
=
mu_Auto
;
}
else
{
oOutputProperty
.
m_nWidth
=
m_ooxTableCellProps
->
m_oTcW
->
m_oW
->
GetValue
();
oOutputProperty
.
m_eWidthUnits
=
m_ooxTableCellProps
->
m_oTcW
->
m_oW
->
IsPercent
()
?
mu_Percent
:
mu_Twips
;
}
}
if
(
m_ooxTableCellProps
->
m_oHideMark
.
IsInit
())
oOutputProperty
.
m_bHideMark
=
m_ooxTableCellProps
->
m_oHideMark
->
m_oVal
.
ToBool
()
?
1
:
0
;
...
...
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