diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-07-15 21:38:19 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-07-16 09:14:52 +0200 |
commit | 5521ac4e152dc9159ac7f7d86d9d2addef443cf4 (patch) | |
tree | d60e3c9ee52ce9994956987c36631af5aa45a91b /sw | |
parent | 40bb9ac690d979ef544d5aa759bd734a176912a0 (diff) |
RTF import: add tests for RTF_PGBRDRT/L/B/R
lcov points out these were not covered previously.
Change-Id: I0211cc35be99bf2487c73b4e63889a2af56d02c2
Reviewed-on: https://gerrit.libreoffice.org/75661
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/rtfexport/data/page-border.rtf | 4 | ||||
-rw-r--r-- | sw/qa/extras/rtfexport/rtfexport4.cxx | 17 |
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: */ |