summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-05-15 10:36:53 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-05-15 10:39:00 +0200
commit163e136650adba01382ec47e017d4b426aa49112 (patch)
tree6416cc0f00f0dfa88e2f40374a6465d47ceb73e3 /sw
parent7d8077f2aea1f42ca19d5c685e64f597293f89bc (diff)
fdo#49940 testcase
Change-Id: I3a6fc3bf2915699d886f3b8e966ae2718517d7bd
Diffstat (limited to 'sw')
-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();