summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-02-03 14:37:38 +0100
committerMiklos Vajna <vmiklos@suse.cz>2013-02-03 14:50:19 +0100
commitf593a2e4179b05ae1019372cde612cb242d1d27f (patch)
tree90d887a1457eef3099a848dba6f8affab2968306 /sw/qa/extras
parentc8956344af6d5ffd443b44808f34841e70ffaac0 (diff)
fdo#59419 fix RTF import of hex form of \r and \n
Change-Id: Ic700cdc67f756cafc454c326b73f680a8a47a6e8
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/rtfimport/data/fdo59419.rtf5
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx10
2 files changed, 15 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/fdo59419.rtf b/sw/qa/extras/rtfimport/data/fdo59419.rtf
new file mode 100644
index 000000000000..ec52508b312d
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/fdo59419.rtf
@@ -0,0 +1,5 @@
+{\rtf1
+\trowd\cellx3000\pard\plain\intbl the next cell will be empty\cell\row
+\pard\trowd\cellx3000\pard\plain\intbl\'0d\cell\row
+\pard\par
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index ab8ac50e4817..c321ba675c72 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -139,6 +139,7 @@ public:
void testFdo44053();
void testFdo48440();
void testFdo58646();
+ void testFdo59419();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -249,6 +250,7 @@ void Test::run()
{"fdo44053.rtf", &Test::testFdo44053},
{"fdo48440.rtf", &Test::testFdo48440},
{"fdo58646.rtf", &Test::testFdo58646},
+ {"fdo59419.rtf", &Test::testFdo59419},
};
header();
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -1078,6 +1080,14 @@ void Test::testFdo58646()
CPPUNIT_ASSERT_EQUAL(2, getPages());
}
+void Test::testFdo59419()
+{
+ // Junk to be ignored broke import of the table.
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();