summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/rtfexport/data/page-border.rtf4
-rw-r--r--sw/qa/extras/rtfexport/rtfexport4.cxx17
2 files changed, 21 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfexport/data/page-border.rtf b/sw/qa/extras/rtfexport/data/page-border.rtf
new file mode 100644
index 000000000000..a5bb78c48b5f
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/page-border.rtf
@@ -0,0 +1,4 @@
+{\rtf1
+\pgbrdrt\brdrs\brdrw10\brsp480 \pgbrdrl\brdrs\brdrw20\brsp480 \pgbrdrb\brdrs\brdrw30\brsp480 \pgbrdrr\brdrs\brdrw40\brsp480
+hello\par
+}
diff --git a/sw/qa/extras/rtfexport/rtfexport4.cxx b/sw/qa/extras/rtfexport/rtfexport4.cxx
index f26f558267b2..0d86a00df960 100644
--- a/sw/qa/extras/rtfexport/rtfexport4.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport4.cxx
@@ -129,6 +129,23 @@ DECLARE_RTFEXPORT_TEST(testBtlrCell, "btlr-cell.rtf")
CPPUNIT_ASSERT_EQUAL(text::WritingMode2::TB_RL, getProperty<sal_Int16>(xC1, "WritingMode"));
}
+DECLARE_RTFIMPORT_TEST(testPageBorder, "page-border.rtf")
+{
+ uno::Reference<beans::XPropertySet> xPageStyle(getStyles("PageStyles")->getByName("Standard"),
+ uno::UNO_QUERY);
+ auto aTopBorder = getProperty<table::BorderLine2>(xPageStyle, "TopBorder");
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(18), aTopBorder.LineWidth);
+
+ auto aLeftBorder = getProperty<table::BorderLine2>(xPageStyle, "LeftBorder");
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(35), aLeftBorder.LineWidth);
+
+ auto aBottomBorder = getProperty<table::BorderLine2>(xPageStyle, "BottomBorder");
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(53), aBottomBorder.LineWidth);
+
+ auto aRightBorder = getProperty<table::BorderLine2>(xPageStyle, "RightBorder");
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32>(71), aRightBorder.LineWidth);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */