summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-05-07 09:50:02 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-05-07 09:50:02 +0200
commit116016d5160302413d5c2c97c436c5e4f6383338 (patch)
tree13074548fb17c62fbfd5e01c4c159158d128db1f /sw/qa
parentc450ea69921001621a1114369b3508bfa69bd088 (diff)
fdo#38786 implement RTF_CHPGN
Change-Id: I0ae693193b4fc8ed155e2d71b06daa80d46da47c
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/rtftok/data/fdo38786.rtf2
-rw-r--r--sw/qa/extras/rtftok/rtftok.cxx13
2 files changed, 15 insertions, 0 deletions
diff --git a/sw/qa/extras/rtftok/data/fdo38786.rtf b/sw/qa/extras/rtftok/data/fdo38786.rtf
new file mode 100644
index 000000000000..6397cee7a670
--- /dev/null
+++ b/sw/qa/extras/rtftok/data/fdo38786.rtf
@@ -0,0 +1,2 @@
+{\rtf1\chpgn
+\par}
diff --git a/sw/qa/extras/rtftok/rtftok.cxx b/sw/qa/extras/rtftok/rtftok.cxx
index 137062a43670..1f340b51f16e 100644
--- a/sw/qa/extras/rtftok/rtftok.cxx
+++ b/sw/qa/extras/rtftok/rtftok.cxx
@@ -92,6 +92,7 @@ public:
void testFdo44211();
void testFdo48037();
void testFdo47764();
+ void testFdo38786();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -122,6 +123,7 @@ public:
CPPUNIT_TEST(testFdo44211);
CPPUNIT_TEST(testFdo48037);
CPPUNIT_TEST(testFdo47764);
+ CPPUNIT_TEST(testFdo38786);
#endif
CPPUNIT_TEST_SUITE_END();
@@ -676,6 +678,17 @@ void Test::testFdo47764()
CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), nValue);
}
+void Test::testFdo38786()
+{
+ load("fdo38786.rtf");
+
+ uno::Reference<text::XTextFieldsSupplier> xTextFieldsSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XEnumerationAccess> xFieldsAccess(xTextFieldsSupplier->getTextFields());
+ uno::Reference<container::XEnumeration> xFields(xFieldsAccess->createEnumeration());
+ // \chpgn was ignored, so exception was thrown
+ xFields->nextElement();
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();