summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorSzabolcs Toth <toth.szabolcs@nisz.hu>2020-10-15 16:13:08 +0200
committerLászló Németh <nemeth@numbertext.org>2020-10-29 17:52:48 +0100
commitbc9049851fd7e914fd695bcfb3c9a94a19634ce0 (patch)
tree2bc56c13a71ff0e8125b569c2a290a6474fa5cac /sw
parentec7feef1bcd055098e49e55df3737148e62b75cb (diff)
tdf#137627 sw top page border orientation: add ODF
Map between RelOrientation::PAGE_PRINT_AREA_TOP and loext:vertical-rel="page-content-top". Follow-up of commit 1c593e1916c9164c7db71da2017cfc26972f8e9f (tdf#133045 sw: add shape alignment to the top page border). See also commit 65b7873aab5deec7157328047e869a6385e0a74a (sw from-bottom relative orientation: add ODF filter). Change-Id: I9bff7a9507152262dda7d126fa3e7e1bee6a8276 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104554 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/odfexport/data/page-content-top.odtbin0 -> 8561 bytes
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx9
2 files changed, 9 insertions, 0 deletions
diff --git a/sw/qa/extras/odfexport/data/page-content-top.odt b/sw/qa/extras/odfexport/data/page-content-top.odt
new file mode 100644
index 000000000000..755d50242e4e
--- /dev/null
+++ b/sw/qa/extras/odfexport/data/page-content-top.odt
Binary files differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 6c1f2d6ccff8..8767b76110bb 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -2624,6 +2624,15 @@ DECLARE_ODFEXPORT_TEST(testRovasNumbering, "rovas-numbering.odt")
aMap["NumberingType"].get<sal_uInt16>());
}
+DECLARE_ODFEXPORT_TEST(testPageContentTop, "page-content-top.odt")
+{
+ CPPUNIT_ASSERT_EQUAL(1, getShapes());
+ CPPUNIT_ASSERT_EQUAL(1, getPages());
+ uno::Reference<beans::XPropertySet> xShape(getShape(1), uno::UNO_QUERY);
+ sal_Int16 nExpected = text::RelOrientation::PAGE_PRINT_AREA_TOP;
+ CPPUNIT_ASSERT_EQUAL(nExpected, getProperty<sal_Int16>(xShape, "VertOrientRelation"));
+}
+
DECLARE_ODFEXPORT_TEST(testPageContentBottom, "page-content-bottom.odt")
{
CPPUNIT_ASSERT_EQUAL(1, getShapes());