[Libreoffice-commits] core.git: sw/source

Miklos Vajna vmiklos at suse.cz
Wed May 15 03:04:30 PDT 2013


 sw/source/filter/ww8/wrtww8.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 335c264d508a9c73845b94483475435a0cebfe64
Author: Miklos Vajna <vmiklos at suse.cz>
Date:   Wed May 15 11:47:08 2013 +0200

    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.
    
    Change-Id: Ifeae93100ca80dcde34fc79f69a91064d44ea8f4

diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index b3e65223..82233b4 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -2158,7 +2158,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();
 


More information about the Libreoffice-commits mailing list