summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorEilidh McAdam <eilidh@lanedo.com>2012-11-20 00:45:25 +0000
committerFridrich Strba <fridrich@documentfoundation.org>2012-12-04 10:57:23 +0000
commitacef2d6cd075705eab015a4125badeca39078ef1 (patch)
treef0182c31238d12b4ec137bd8f84f8856ad1c1fcd /sw
parentab96b65e0d4fab541d8b31b46e3f37db0fb548b5 (diff)
docx fine dashed table border import test case.
Change-Id: I27ee8e360b8fd530f8cfefc58c8a0f96d706b979 Reviewed-on: https://gerrit.libreoffice.org/1125 Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlimport/data/tableborder-finedash.docxbin0 -> 10266 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx15
2 files changed, 15 insertions, 0 deletions
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 000000000000..003167ac3ade
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/tableborder-finedash.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 8071f48cb669..7f78cfeb68d3 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();