diff options
author | Vinaya Mandke <vinaya.mandke@synerzip.com> | 2014-04-18 15:50:51 +0530 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-08-26 02:46:16 -0700 |
commit | 2ba645fee8ea7e4c5e1ad9a81774a33e899cf18d (patch) | |
tree | a32a68aeb9bc7b2739aa8428b4f848a520a8b443 /sw | |
parent | db644424d663aca64c76bcbe5040846af5930741 (diff) |
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
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
writerfilter/source/dmapper/DomainMapper.cxx
Change-Id: I717ba40e22b055d974bc83d4414aeb2945e16d26
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/fdo75431.docx | bin | 0 -> 13275 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/fdo75431.docx b/sw/qa/extras/ooxmlexport/data/fdo75431.docx Binary files differnew file mode 100644 index 000000000000..492278403686 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/fdo75431.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 37fb1b5bf712..fb00ef3974c0 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -2098,6 +2098,18 @@ DECLARE_OOXMLEXPORT_TEST(testTestTitlePage, "testTitlePage.docx") // assertXPathChildren(pXmlDoc, "/w:document/w:body/w:sectPr/w:titlePg", 0); } + +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(); |