diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf139948.docx | bin | 0 -> 12765 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport17.cxx | 26 | ||||
-rw-r--r-- | sw/qa/extras/rtfexport/data/tdf139948.rtf | 8 | ||||
-rw-r--r-- | sw/qa/extras/rtfexport/rtfexport4.cxx | 32 |
4 files changed, 66 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf139948.docx b/sw/qa/extras/ooxmlexport/data/tdf139948.docx Binary files differnew file mode 100644 index 000000000000..1b3f7df00031 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf139948.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx index 69591c638fcc..f199b1fa6671 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport17.cxx @@ -397,6 +397,32 @@ DECLARE_OOXMLEXPORT_TEST(testTdf81507, "tdf81507.docx") xmlXPathFreeObject(pXmlObj); } +DECLARE_OOXMLEXPORT_TEST(testTdf139948, "tdf139948.docx") +{ + CPPUNIT_ASSERT_EQUAL(sal_uInt32(0), + getProperty<table::BorderLine2>(getParagraph(1, "No border"), "TopBorder").LineWidth); + CPPUNIT_ASSERT_EQUAL(sal_uInt32(0), + getProperty<table::BorderLine2>(getParagraph(2, "Border below"), "TopBorder").LineWidth); + CPPUNIT_ASSERT_EQUAL(sal_uInt32(88), + getProperty<table::BorderLine2>(getParagraph(3, "Borders below and above"), "TopBorder").LineWidth); + CPPUNIT_ASSERT_EQUAL(sal_uInt32(88), + getProperty<table::BorderLine2>(getParagraph(4, "Border above"), "TopBorder").LineWidth); + CPPUNIT_ASSERT_EQUAL(sal_uInt32(0), + getProperty<table::BorderLine2>(getParagraph(5, "No border"), "TopBorder").LineWidth); + + + CPPUNIT_ASSERT_EQUAL(sal_uInt32(0), + getProperty<table::BorderLine2>(getParagraph(1), "BottomBorder").LineWidth); + CPPUNIT_ASSERT_EQUAL(sal_uInt32(0), + getProperty<table::BorderLine2>(getParagraph(2), "BottomBorder").LineWidth); + CPPUNIT_ASSERT_EQUAL(sal_uInt32(0), + getProperty<table::BorderLine2>(getParagraph(3), "BottomBorder").LineWidth); + CPPUNIT_ASSERT_EQUAL(sal_uInt32(0), + getProperty<table::BorderLine2>(getParagraph(4), "BottomBorder").LineWidth); + CPPUNIT_ASSERT_EQUAL(sal_uInt32(0), + getProperty<table::BorderLine2>(getParagraph(5), "BottomBorder").LineWidth); +} + DECLARE_OOXMLEXPORT_TEST(testTdf144563, "tdf144563.docx") { uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY); diff --git a/sw/qa/extras/rtfexport/data/tdf139948.rtf b/sw/qa/extras/rtfexport/data/tdf139948.rtf new file mode 100644 index 000000000000..0b601a764adf --- /dev/null +++ b/sw/qa/extras/rtfexport/data/tdf139948.rtf @@ -0,0 +1,8 @@ +{\rtf1\ansi
+No border\par
+\pard\brdrbtw\brdrs\brdrw50
+Border below\par
+Borders below and above\par
+Border above\par
+\pard No border\par
+}
\ No newline at end of file diff --git a/sw/qa/extras/rtfexport/rtfexport4.cxx b/sw/qa/extras/rtfexport/rtfexport4.cxx index 123b3b31ae4d..8f81b1565695 100644 --- a/sw/qa/extras/rtfexport/rtfexport4.cxx +++ b/sw/qa/extras/rtfexport/rtfexport4.cxx @@ -528,6 +528,38 @@ DECLARE_RTFEXPORT_TEST(testTdf111851, "tdf111851.rtf") CPPUNIT_ASSERT_EQUAL(COL_BLACK, getProperty<Color>(xCell6, "BackColor")); } +DECLARE_RTFEXPORT_TEST(testTdf139948, "tdf139948.rtf") +{ + CPPUNIT_ASSERT_EQUAL( + sal_uInt32(0), + getProperty<table::BorderLine2>(getParagraph(1, "No border"), "TopBorder").LineWidth); + CPPUNIT_ASSERT_EQUAL( + sal_uInt32(0), + getProperty<table::BorderLine2>(getParagraph(2, "Border below"), "TopBorder").LineWidth); + CPPUNIT_ASSERT_EQUAL( + sal_uInt32(88), + getProperty<table::BorderLine2>(getParagraph(3, "Borders below and above"), "TopBorder") + .LineWidth); + CPPUNIT_ASSERT_EQUAL( + sal_uInt32(88), + getProperty<table::BorderLine2>(getParagraph(4, "Border above"), "TopBorder").LineWidth); + CPPUNIT_ASSERT_EQUAL( + sal_uInt32(0), + getProperty<table::BorderLine2>(getParagraph(5, "No border"), "TopBorder").LineWidth); + + // And let's ensure that there are no other horizontal borders + CPPUNIT_ASSERT_EQUAL( + sal_uInt32(0), getProperty<table::BorderLine2>(getParagraph(1), "BottomBorder").LineWidth); + CPPUNIT_ASSERT_EQUAL( + sal_uInt32(0), getProperty<table::BorderLine2>(getParagraph(2), "BottomBorder").LineWidth); + CPPUNIT_ASSERT_EQUAL( + sal_uInt32(0), getProperty<table::BorderLine2>(getParagraph(3), "BottomBorder").LineWidth); + CPPUNIT_ASSERT_EQUAL( + sal_uInt32(0), getProperty<table::BorderLine2>(getParagraph(4), "BottomBorder").LineWidth); + CPPUNIT_ASSERT_EQUAL( + sal_uInt32(0), getProperty<table::BorderLine2>(getParagraph(5), "BottomBorder").LineWidth); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |