diff options
author | Justin Luth <justin_luth@sil.org> | 2017-11-07 09:29:30 +0300 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2017-12-18 11:25:14 +0100 |
commit | 2bdfe1355c4c571e71bd4197d5814c6e15fb8db7 (patch) | |
tree | ec32d8c273f38d84ea18f9d0281bec3cb2584db6 /sw | |
parent | 31c044e2501b9d4a0917e4e09133660bbe2a24dc (diff) |
tdf#112352 ooxmlimport: ALWAYS treat 1st nextpage w/cols as cont
fix 5.4 regression from 4605bd46984125a99b0e993b71efa6edb411699f.
When there are columns, if a nextpage section doesn't contain any
other "page style" details we treat it as a continuous break,
If we don't, the column info becomes part of the style itself,
and not just a section property.
However, the very first section is troublesome - by definition it DOES
contain page style details, and so if the document starts with columns,
the default style would gain the column attribute. Usually that
results in a mess, so lets make sure that we avoid that also in
the case where headers/footers are defined.
Reviewed-on: https://gerrit.libreoffice.org/44505
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Justin Luth <justin_luth@sil.org>
Tested-by: Justin Luth <justin_luth@sil.org>
(cherry picked from commit afc96d263959d10e457b54a574f0829d20e99df4)
Change-Id: I7e08a9218e4304206579ed064bc92c9604d4470e
Reviewed-on: https://gerrit.libreoffice.org/46638
Reviewed-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf112352_nextPageColumns.docx | bin | 0 -> 14346 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport9.cxx | 11 |
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf112352_nextPageColumns.docx b/sw/qa/extras/ooxmlexport/data/tdf112352_nextPageColumns.docx Binary files differnew file mode 100644 index 000000000000..f14681dd51c2 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf112352_nextPageColumns.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx index 8d125bea4910..7fef2cd0e199 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport9.cxx @@ -190,6 +190,17 @@ DECLARE_OOXMLEXPORT_TEST(testRhbz988516, "rhbz988516.docx") CPPUNIT_ASSERT_EQUAL( 2, getPages() ); } +DECLARE_OOXMLEXPORT_TEST(testTdf112352_nextPageColumns, "tdf112352_nextPageColumns.docx") +{ + uno::Reference<beans::XPropertySet> xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(2), "TextSection"); + uno::Reference<text::XTextColumns> xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns"); + CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xTextColumns->getColumnCount()); + + xTextSection = getProperty< uno::Reference<beans::XPropertySet> >(getParagraph(3), "TextSection"); + xTextColumns = getProperty< uno::Reference<text::XTextColumns> >(xTextSection, "TextColumns"); + CPPUNIT_ASSERT_EQUAL(sal_Int16(0), xTextColumns->getColumnCount()); +} + DECLARE_OOXMLEXPORT_TEST(testTdf103389, "tdf103389.docx") { xmlDocPtr pXmlDoc = parseExport("word/document.xml"); |