summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-02-03 15:36:03 +0100
committerMiklos Vajna <vmiklos@collabora.com>2021-02-09 14:10:44 +0100
commit4e544c7776207d2c7725e10a13896c9eb3265370 (patch)
tree0b1a3b7136a15866f1afc012208df82d3a22ed7d /sw
parentabcb758941d955bd5f822ae164fdcdd7870d1d55 (diff)
tdf#91920 sw page gutter margin: add ODF filter
Note that the context filter is not set, since fo:margin affects left margin, but should not affect the gutter margin. Also put the new entry at the end, but before the header and footer sections, so the attribute is written to the correct XML element. (cherry picked from commit 11e91719ef362e38b3b92e525763a5a89f4eeecb) Conflicts: schema/libreoffice/OpenDocument-schema-v1.3+libreoffice.rng Change-Id: I3588d4e76cd713efed168eb93b9456bba96727fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110627 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/odfexport/data/gutter-left.odtbin0 -> 19355 bytes
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx13
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/odfexport/data/gutter-left.odt b/sw/qa/extras/odfexport/data/gutter-left.odt
new file mode 100644
index 000000000000..a5ce541ef078
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/gutter-left.odt
Binary files differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index a9cc169a6116..7bdb9163e372 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -2442,5 +2442,18 @@ DECLARE_ODFEXPORT_TEST(tdf135942, "nestedTableInFooter.odt")
}
}
+DECLARE_ODFEXPORT_TEST(testGutterLeft, "gutter-left.odt")
+{
+ uno::Reference<beans::XPropertySet> xPageStyle;
+ getStyles("PageStyles")->getByName("Standard") >>= xPageStyle;
+ sal_Int32 nGutterMargin{};
+ xPageStyle->getPropertyValue("GutterMargin") >>= nGutterMargin;
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 1270
+ // - Actual : 0
+ // i.e. gutter margin was lost.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1270), nGutterMargin);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */