summaryrefslogtreecommitdiff
path: root/sw/qa/extras/rtftok/rtftok.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/rtftok/rtftok.cxx')
-rw-r--r--sw/qa/extras/rtftok/rtftok.cxx13
1 files changed, 13 insertions, 0 deletions
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();