diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-09-21 07:31:33 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-01 09:22:00 +0000 |
commit | f624559bbfa2cfb8cc2a081174be2ac6b0ed9dcb (patch) | |
tree | 1791c39357c87004284cf7f93c4bbf8a880137ba /sw/qa | |
parent | 950cfbd75a216527d850351e4b3e0be4f8870a7d (diff) |
tdf#92521 DOCX export: handle section break right after a table
DocxAttributeOutput::SectionBreaks() previously only handled the
text-text and text-table node transitions; implement support for
table-text to avoid loosing a page break on export for the bugdoc.
(View this commit with whitespace ignored to filter out the noise about
SectionBreaks() now accepting non-text nodes, too.)
(cherry picked from commit c916152d8562cab868d4c522748ac30029fad179)
Conflicts:
sw/source/filter/ww8/attributeoutputbase.hxx
sw/source/filter/ww8/docxattributeoutput.cxx
sw/source/filter/ww8/docxattributeoutput.hxx
sw/source/filter/ww8/rtfattributeoutput.cxx
sw/source/filter/ww8/rtfattributeoutput.hxx
sw/source/filter/ww8/ww8attributeoutput.hxx
Change-Id: Ie8a1575374a207399351635bda8c0c076ce7268d
Reviewed-on: https://gerrit.libreoffice.org/18901
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf92521.odt | bin | 0 -> 8891 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport4.cxx | 7 |
2 files changed, 7 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf92521.odt b/sw/qa/extras/ooxmlexport/data/tdf92521.odt Binary files differnew file mode 100644 index 000000000000..8148e49a2275 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf92521.odt diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx index 56905077b4a2..ea3c6af338fa 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx @@ -810,6 +810,13 @@ DECLARE_OOXMLEXPORT_TEST(testTdf83227, "tdf83227.docx") CPPUNIT_ASSERT_EQUAL(false, bool(xNameAccess->hasByName("word/media/image2.png"))); } +DECLARE_OOXMLEXPORT_TEST(testTdf92521, "tdf92521.odt") +{ + if (xmlDocPtr pXmlDoc = parseExport("word/document.xml")) + // There should be a section break that's in the middle of the document: right after the table. + assertXPath(pXmlDoc, "/w:document/w:body/w:p/w:pPr/w:sectPr", 1); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |