From 2e8aad6d45c53d554ccaf26de998ede708cfc289 Mon Sep 17 00:00:00 2001 From: Vinaya Mandke Date: Fri, 18 Apr 2014 15:50:51 +0530 Subject: fdo#39056 fdo#75431 Section Properties if section starts with table Section properties are not imported if the section starts with a table for DOCX, and also for a few RTF files with combination of tables and section breaks. SwXBodyText::createTextCursorByRange is not able to find the start of section and hence section properties are not applied. As a workaround added an empty paragraph at the beginning of every section which has the the first element as a table. And then removed it when the section ends ( DomainMapper::lcl_endSectionGroup is called). Also handled to add the paragraph earlier, if there is a bookmark so that the bookmark is not attached to the dummy paragraph. Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport.cxx Reviewed on: https://gerrit.libreoffice.org/9097 Change-Id: I717ba40e22b055d974bc83d4414aeb2945e16d26 --- sw/qa/extras/ooxmlexport/data/fdo75431.docx | Bin 0 -> 13275 bytes sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 12 ++++++++++++ 2 files changed, 12 insertions(+) create mode 100644 sw/qa/extras/ooxmlexport/data/fdo75431.docx (limited to 'sw/qa') diff --git a/sw/qa/extras/ooxmlexport/data/fdo75431.docx b/sw/qa/extras/ooxmlexport/data/fdo75431.docx new file mode 100644 index 000000000000..492278403686 Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/fdo75431.docx differ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index ebc6500a8f98..631f415d2c86 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -3181,6 +3181,18 @@ DECLARE_OOXMLEXPORT_TEST(testFDO77117, "fdo77117.docx") // This checks textbox textrun size of font which is in group shape. CPPUNIT_ASSERT_EQUAL(11.f, getProperty(xShape, "CharHeight")); } + +DECLARE_OOXMLEXPORT_TEST(testFDO75431, "fdo75431.docx") +{ + xmlDocPtr pXmlDoc = parseExport("word/document.xml"); + + if (!pXmlDoc) + return; + + assertXPath(pXmlDoc, "//w:tbl", 2); + assertXPath(pXmlDoc, "//w:p/w:pPr/w:sectPr/w:type", "val", "nextPage"); +} + #endif CPPUNIT_PLUGIN_IMPLEMENT(); -- cgit