sw/qa/extras/ooxmlimport/data/tableborder-finedash.docx |binary sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 15 +++++++++++++++ 2 files changed, 15 insertions(+)
New commits: commit acef2d6cd075705eab015a4125badeca39078ef1 Author: Eilidh McAdam <eil...@lanedo.com> Date: Tue Nov 20 00:45:25 2012 +0000 docx fine dashed table border import test case. Change-Id: I27ee8e360b8fd530f8cfefc58c8a0f96d706b979 Reviewed-on: https://gerrit.libreoffice.org/1125 Reviewed-by: Fridrich Strba <fridr...@documentfoundation.org> Tested-by: Fridrich Strba <fridr...@documentfoundation.org> diff --git a/sw/qa/extras/ooxmlimport/data/tableborder-finedash.docx b/sw/qa/extras/ooxmlimport/data/tableborder-finedash.docx new file mode 100644 index 0000000..003167a Binary files /dev/null and b/sw/qa/extras/ooxmlimport/data/tableborder-finedash.docx differ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 8071f48..7f78cfe 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -50,6 +50,7 @@ #include <com/sun/star/table/ShadowFormat.hpp> #include <com/sun/star/view/XSelectionSupplier.hpp> #include <com/sun/star/table/BorderLine2.hpp> +#include <com/sun/star/table/TableBorder2.hpp> #include <vcl/svapp.hxx> @@ -108,6 +109,7 @@ public: void testN785767(); void testN773061(); void testN780645(); + void testFineTableDash(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -169,6 +171,7 @@ void Test::run() {"n785767.docx", &Test::testN785767}, {"n773061.docx", &Test::testN773061}, {"n780645.docx", &Test::testN780645}, + {"tableborder-finedash.docx", &Test::testFineTableDash} }; for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) { @@ -1009,6 +1012,7 @@ void Test::testFdo52208() CPPUNIT_ASSERT_EQUAL(sal_Int16(1), xCursor->getPage()); } + void Test::testN785767() { uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY); @@ -1043,6 +1047,17 @@ void Test::testN780645() CPPUNIT_ASSERT_EQUAL(sal_Int16(2135), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(1), "TableColumnSeparators")[0].Position); // was 1999 } +void Test::testFineTableDash() +{ + // The problem was that finely dashed borders on tables were unsupported + uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xTableProperties(xTables->getByIndex(0), uno::UNO_QUERY); + table::TableBorder2 aBorder; + xTableProperties->getPropertyValue("TableBorder2") >>= aBorder; + CPPUNIT_ASSERT_EQUAL(aBorder.RightLine.LineStyle, table::BorderLineStyle::FINE_DASHED); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits