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

PriyankaGaikwad priyanka.gaikwad at synerzip.com
Wed Jun 4 01:05:25 PDT 2014


 sw/qa/extras/ooxmlexport/data/fdo78907.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport.cxx    |   13 +++++++++++++
 sw/source/filter/ww8/ww8atr.cxx             |    2 +-
 3 files changed, 14 insertions(+), 1 deletion(-)

New commits:
commit 2df0d9d32d05f08ccf673fd0f61f650438511acb
Author: PriyankaGaikwad <priyanka.gaikwad at synerzip.com>
Date:   Fri May 30 17:23:45 2014 +0530

    fdo#78907 : File crashed while saving.
    
       - There is pagebreak in file and footer has nested table.
       - While exporting LO write section break instead of PAGE_BREAK.
       - Due to this it was writing two sections in file and same footer
         for both sections.
       - This was causing wrong table depth values due to this it was crashing
         while writing table.
       - So in MSWordExportBase::OutputSectionBreaks if next node has
         RES_BREAK(page break) then bNewPageDesc value should be false.
    
    Change-Id: I2ccc4e48a26253716253a7280a244f06e172770a
    Reviewed-on: https://gerrit.libreoffice.org/9568
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sw/qa/extras/ooxmlexport/data/fdo78907.docx b/sw/qa/extras/ooxmlexport/data/fdo78907.docx
new file mode 100644
index 0000000..abae6b4
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo78907.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 9c115a1..4c6dcda 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -3460,6 +3460,19 @@ DECLARE_OOXMLEXPORT_TEST(testFDO79062, "fdo79062.docx")
     assertXPath(pXmlEndNotes, "/w:endnotes", "Ignorable", "w14 wp14");
 }
 
+DECLARE_OOXMLEXPORT_TEST(testfdo78907,"fdo78907.docx")
+{
+    xmlDocPtr pXmlDoc = parseExport("word/document.xml");
+    if (!pXmlDoc)
+        return;
+    assertXPath ( pXmlDoc, "/w:document/w:body/w:p[1]/w:r[2]/w:br", "type", "page" );
+
+    xmlDocPtr pXmlDoc1 = parseExport("word/footer1.xml");
+    if (!pXmlDoc1)
+        return;
+    assertXPath ( pXmlDoc1, "/w:ftr[1]/w:tbl[1]/w:tr[1]/w:tc[1]/w:tbl[1]/w:tr[1]/w:tc[1]/w:tbl", 0 );
+}
+
 #endif
 
 CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 3ddec91..2f8959d 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -483,7 +483,7 @@ void MSWordExportBase::OutputSectionBreaks( const SfxItemSet *pSet, const SwNode
                     }
                 }
             }
-
+            bNewPageDesc = false; // if next node has RES_BREAK(page break) then bNewPageDesc value should be false.
             bBreakSet = true;
 
             if ( !bRemoveHardBreakInsideTable )


More information about the Libreoffice-commits mailing list