summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/ooxmltok/data/fdo49940.docxbin0 -> 9909 bytes
-rw-r--r--sw/qa/extras/ooxmltok/ooxmltok.cxx15
2 files changed, 15 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmltok/data/fdo49940.docx b/sw/qa/extras/ooxmltok/data/fdo49940.docx
new file mode 100644
index 000000000000..242284463632
--- /dev/null
+++ b/sw/qa/extras/ooxmltok/data/fdo49940.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmltok/ooxmltok.cxx b/sw/qa/extras/ooxmltok/ooxmltok.cxx
index 2c672d2c41b3..9e0473c34ec5 100644
--- a/sw/qa/extras/ooxmltok/ooxmltok.cxx
+++ b/sw/qa/extras/ooxmltok/ooxmltok.cxx
@@ -53,6 +53,7 @@ public:
void testN751017();
void testN750935();
void testN757890();
+ void testFdo49940();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -61,6 +62,7 @@ public:
CPPUNIT_TEST(testN751017);
CPPUNIT_TEST(testN750935);
CPPUNIT_TEST(testN757890);
+ CPPUNIT_TEST(testFdo49940);
#endif
CPPUNIT_TEST_SUITE_END();
@@ -191,6 +193,19 @@ void Test::testN757890()
CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::CENTER, nValue);
}
+void Test::testFdo49940()
+{
+ load("fdo49940.docx");
+
+ 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();
+ uno::Reference<beans::XPropertySet> xPara(xParaEnum->nextElement(), uno::UNO_QUERY);
+ OUString aValue;
+ xPara->getPropertyValue("PageStyleName") >>= aValue;
+ CPPUNIT_ASSERT_EQUAL(OUString("First Page"), aValue);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();