summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-05-15 11:47:08 +0200
committerLuboš Luňák <l.lunak@suse.cz>2013-05-15 11:51:54 +0000
commitdc6c363f0c7fec8be700b272ea94eebc8e3534a9 (patch)
tree4c28298b8434b61dac7f05bbc4117e3802a9848d
parent4582d74fc3c55f05b77f64efc6c5500496439df0 (diff)
fdo#36876 WW8 filter: fix export of table margins
Actually no testcase, as the export bug does not affect our import filter. The problem was that we wrote SPRM's, which are properties of floating tables, so once the user edited the resulting document in Word and imported it back to Writer, frames around tables got created. Fix this by only writing floating table SPRM's for tables which are already in a fly frame. Regression from cbba191cf0fff148935f24d111cb124bd5a5328b. (cherry picked from commits 335c264d508a9c73845b94483475435a0cebfe64 and a935a154c3911b466a9b1c8da3c2cf0be2e0014d) Change-Id: Ifeae93100ca80dcde34fc79f69a91064d44ea8f4 Reviewed-on: https://gerrit.libreoffice.org/3915 Reviewed-by: Luboš Luňák <l.lunak@suse.cz> Tested-by: Luboš Luňák <l.lunak@suse.cz>
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 269b913bf93e..2ee4569c9a96 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -2121,7 +2121,9 @@ void WW8AttributeOutput::TableSpacing(ww8::WW8TableNodeInfoInner::Pointer_t pTab
const SwTable * pTable = pTableTextNodeInfoInner->getTable();
const SwTableFmt * pTableFmt = pTable->GetTableFmt();
- if (pTableFmt != NULL)
+ // Writing these SPRM's will make the table a floating one, so only write
+ // them in case the table is already inside a frame.
+ if (pTableFmt != NULL && pTable->GetTableNode()->GetFlyFmt())
{
const SvxULSpaceItem & rUL = pTableFmt->GetULSpace();