summaryrefslogtreecommitdiff
path: root/sw/qa/extras/rtfimport/rtfimport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/rtfimport/rtfimport.cxx')
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 367df3ea5cb6..68b7aa5c6144 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -134,6 +134,7 @@ public:
void testFdo57678();
void testFdo45183();
void testFdo54612();
+ void testFdo58933();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -218,6 +219,7 @@ void Test::run()
{"fdo57678.rtf", &Test::testFdo57678},
{"fdo45183.rtf", &Test::testFdo45183},
{"fdo54612.rtf", &Test::testFdo54612},
+ {"fdo58933.rtf", &Test::testFdo58933},
};
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
{
@@ -1013,6 +1015,16 @@ void Test::testFdo54612()
CPPUNIT_ASSERT_EQUAL(sal_Int32(8), xDraws->getCount());
}
+void Test::testFdo58933()
+{
+ // The problem was that the table had an additional cell in its first line.
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ // This was 4.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xTable->getCellNames().getLength());
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();