summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPriyankaGaikwad <priyanka.gaikwad@synerzip.com>2014-05-30 17:23:45 +0530
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-10-01 14:51:26 +0200
commit4e41b9b6e3da0b29f213df7745ac286bcbab6270 (patch)
tree27e4cd1703259f1326b647d9e070e5b59220e2b1
parentResolves: fdo#79129 Crash in oox::drawingml::LayoutNode::setupShape (diff)
downloadcore-4e41b9b6e3da0b29f213df7745ac286bcbab6270.tar.gz
core-4e41b9b6e3da0b29f213df7745ac286bcbab6270.zip
fdo#78907 fdo#82895 : 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. Reviewed-on: https://gerrit.libreoffice.org/9568 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 2df0d9d32d05f08ccf673fd0f61f650438511acb) Change-Id: I2ccc4e48a26253716253a7280a244f06e172770a
-rw-r--r--sw/qa/extras/ooxmlexport/data/fdo78907.docxbin0 -> 38642 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport.cxx13
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx2
3 files changed, 14 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/fdo78907.docx b/sw/qa/extras/ooxmlexport/data/fdo78907.docx
new file mode 100644
index 000000000000..abae6b4be042
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/fdo78907.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
index 18c15fafa0b9..6c46d9800be7 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx
@@ -3656,6 +3656,19 @@ DECLARE_OOXMLEXPORT_TEST(testFooterBodyDistance, "footer-body-distance.docx")
assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:r/w:br", 1);
}
+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
DECLARE_OOXMLEXPORT_TEST(testMsoPosition, "bnc884615-mso-position.docx")
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 6065d1956344..c364d20672c3 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -478,7 +478,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 )