summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2016-09-07 19:26:30 +0300
committerAndras Timar <andras.timar@collabora.com>2016-10-10 17:35:46 +0200
commitf483fd582b5d5e628865d32342a297909ea0a958 (patch)
tree73888138daef99b1a4a4cbff31e6ea97bdd04a89 /sw/qa/extras
parentae1f7a09d5f9e54bceff926c6a0ddbf778353e20 (diff)
tdf#81345 docx import fix default page break regression
"regression" from 4e653d15eff26aa5283d8ba20611893f4c573f57 If there are new style elements, then don't treat a default break in columns as a continuous break. This fixes both round-tripping, and initial import of columns and headers on this particular document. Since MS and LO treat sections so differently, it is a balancing act of what to change. Reviewed-on: https://gerrit.libreoffice.org/28728 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> (cherry picked from commit 3870c0555aa461268a6d056543f4545d562769ce) Change-Id: I9c79bc1246108da6a5ebbf744acbcfcbb9d33d48
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf81345.docxbin0 -> 221506 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport4.cxx12
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf81345.docx b/sw/qa/extras/ooxmlexport/data/tdf81345.docx
new file mode 100644
index 000000000000..4f18b1eeade5
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf81345.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
index ecff7f37f262..9751b2a9c784 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx
@@ -959,6 +959,18 @@ DECLARE_OOXMLEXPORT_TEST(testTdf96750_landscapeFollow, "tdf96750_landscapeFollow
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xStyle, "IsLandscape"));
}
+DECLARE_OOXMLEXPORT_TEST(testTdf81345_045Original,"tdf81345.docx")
+{
+ //Header wasn't replaced and columns were missing because no new style was created.
+ uno::Reference<frame::XModel> xModel(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextViewCursorSupplier> xTextViewCursorSupplier(xModel->getCurrentController(), uno::UNO_QUERY);
+ uno::Reference<text::XPageCursor> xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY);
+
+ xCursor->jumpToPage(2);
+ OUString pageStyleName = getProperty<OUString>(xCursor, "PageStyleName");
+ CPPUNIT_ASSERT(pageStyleName != "Standard");
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */