summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ww8export
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-02-05 17:03:08 +0100
committerMiklos Vajna <vmiklos@collabora.com>2021-02-06 15:16:13 +0100
commite1d217b086e8c47efc5ced4c490062956d564e3f (patch)
treedc381e1a8bf00659f386b3ce64cc2e2a76697e9f /sw/qa/extras/ww8export
parentca387c4b7b21e4f6b28b82f42b6c7f859c7e324a (diff)
tdf#91920 sw page gutter margin, from top: add DOC filter
But leave the fRTLGutter case alone for now, I can't find the Word UI for that. Change-Id: I1d97e85308aa13892f50c0fcd3680cec514ef566 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110471 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/qa/extras/ww8export')
-rw-r--r--sw/qa/extras/ww8export/data/gutter-top.docbin0 -> 22528 bytes
-rw-r--r--sw/qa/extras/ww8export/ww8export3.cxx14
2 files changed, 14 insertions, 0 deletions
diff --git a/sw/qa/extras/ww8export/data/gutter-top.doc b/sw/qa/extras/ww8export/data/gutter-top.doc
new file mode 100644
index 000000000000..07ffa3945ac5
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/gutter-top.doc
Binary files differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index 2eb5c361f8ac..a4e4c552a93a 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -106,6 +106,20 @@ DECLARE_WW8EXPORT_TEST(testGutterLeft, "gutter-left.doc")
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1270), nGutterMargin);
}
+CPPUNIT_TEST_FIXTURE(Test, testGutterTop)
+{
+ load(mpTestDocumentPath, "gutter-top.doc");
+ reload(mpFilter, "gutter-top.doc");
+ uno::Reference<lang::XMultiServiceFactory> xFactory(mxComponent, uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xSettings(
+ xFactory->createInstance("com.sun.star.document.Settings"), uno::UNO_QUERY);
+ bool bGutterAtTop{};
+ xSettings->getPropertyValue("GutterAtTop") >>= bGutterAtTop;
+ // Without the accompanying fix in place, this test would have failed, becase the gutter was
+ // at the left.
+ CPPUNIT_ASSERT(bGutterAtTop);
+}
+
DECLARE_WW8EXPORT_TEST(testArabicZeroNumbering, "arabic-zero-numbering.doc")
{
auto xNumberingRules