summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/rtfimport/data/fdo49655.rtf5
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx15
2 files changed, 20 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/fdo49655.rtf b/sw/qa/extras/rtfimport/data/fdo49655.rtf
new file mode 100644
index 000000000000..60f90fc527c0
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/fdo49655.rtf
@@ -0,0 +1,5 @@
+{\rtf1
+{\colortbl \red0\green0\blue0;\red128\green128\blue128;\red255\green255\blue255;}
+\trowd \clvertalt \clbrdrt\brdrw15\brdrs \clbrdrl\brdrw15\brdrs \clbrdrb\brdrw15\brdrs \clbrdrr\brdrw15\brdrs \clcbpat1\cellx9600 \intbl\qc\cf2\b Travaux Exceptionnels de Jardinage N 12.03.0005.TEJ \b0\cell \row
+}
+\pard\par
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 9d5676157a63..873213b66315 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -111,6 +111,7 @@ public:
void testFdo52052();
void testInk();
void testFdo52389();
+ void testFdo49655();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -161,6 +162,7 @@ public:
CPPUNIT_TEST(testFdo52052);
CPPUNIT_TEST(testInk);
CPPUNIT_TEST(testFdo52389);
+ CPPUNIT_TEST(testFdo49655);
#endif
CPPUNIT_TEST_SUITE_END();
@@ -970,6 +972,19 @@ void Test::testFdo52389()
CPPUNIT_ASSERT_EQUAL(6, getLength());
}
+void Test::testFdo49655()
+{
+ /*
+ * The problem was that the table was not imported due to the ' ' string in the middle of the table definition.
+ *
+ * xray ThisComponent.TextTables.Count 'was 0
+ */
+ load("fdo49655.rtf");
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();