diff options
author | Vinaya Mandke <vinaya.mandke@synerzip.com> | 2014-04-18 15:50:51 +0530 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-04-24 12:57:51 +0200 |
commit | 2e8aad6d45c53d554ccaf26de998ede708cfc289 (patch) | |
tree | 544798fb9fd2268356056ed12c5841bfd3b2616f /sw | |
parent | cf058da1e5664bc8c30a5777e2c1dbf059a6304f (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
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 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<float>(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(); |