summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-03-13 10:16:27 +0100
committerMiklos Vajna <vmiklos@suse.cz>2012-03-13 10:19:46 +0100
commite5823e8513eee31fd96549a4b0273063ed31b192 (patch)
tree2f5d8039bd3edeefcd2767f88d0c6140eae8dc4f /sw
parent9f5dfe07794130a96b7c2056f468354cb8d750ff (diff)
testcase for fdo#45563
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/rtftok/data/fdo45563.rtf5
-rw-r--r--sw/qa/extras/rtftok/rtftok.cxx17
2 files changed, 22 insertions, 0 deletions
diff --git a/sw/qa/extras/rtftok/data/fdo45563.rtf b/sw/qa/extras/rtftok/data/fdo45563.rtf
new file mode 100644
index 000000000000..3dd3fd0b9956
--- /dev/null
+++ b/sw/qa/extras/rtftok/data/fdo45563.rtf
@@ -0,0 +1,5 @@
+{\rtf1
+only n\
+only r\ both r and n\
+last\par
+}
diff --git a/sw/qa/extras/rtftok/rtftok.cxx b/sw/qa/extras/rtftok/rtftok.cxx
index c11af2613b56..95fc51b74a1d 100644
--- a/sw/qa/extras/rtftok/rtftok.cxx
+++ b/sw/qa/extras/rtftok/rtftok.cxx
@@ -63,6 +63,7 @@ public:
void testFdo45187();
void testFdo46662();
void testN750757();
+ void testFdo45563();
CPPUNIT_TEST_SUITE(RtfModelTest);
#if !defined(MACOSX) && !defined(WNT)
@@ -74,6 +75,7 @@ public:
CPPUNIT_TEST(testFdo45187);
CPPUNIT_TEST(testFdo46662);
CPPUNIT_TEST(testN750757);
+ CPPUNIT_TEST(testFdo45563);
#endif
CPPUNIT_TEST_SUITE_END();
@@ -322,6 +324,21 @@ void RtfModelTest::testN750757()
CPPUNIT_ASSERT_EQUAL(sal_Bool(true), bValue);
}
+void RtfModelTest::testFdo45563()
+{
+ load(OUString(RTL_CONSTASCII_USTRINGPARAM("fdo45563.rtf")));
+ uno::Reference<text::XTextDocument> xTextDocument(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xParaEnumAccess(xTextDocument->getText(), uno::UNO_QUERY);
+ uno::Reference<container::XEnumeration> xParaEnum = xParaEnumAccess->createEnumeration();
+ int i = 0;
+ while (xParaEnum->hasMoreElements())
+ {
+ xParaEnum->nextElement();
+ i++;
+ }
+ CPPUNIT_ASSERT_EQUAL(4, i);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(RtfModelTest);
CPPUNIT_PLUGIN_IMPLEMENT();