diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-05-30 09:38:27 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-05-30 09:40:50 +0200 |
commit | 3784063afcc344273821503694467100d3913d2d (patch) | |
tree | 1a00fc8bb127025ff8d6a64bcc25cd86d6b7d625 /sw | |
parent | bb0eaf4f0e3129a496a861daf96da1e1907758d5 (diff) |
n#760764 testcase
Change-Id: I4d5cea0ae02fda751fb13b9c86684ccd70abf126
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmltok/data/n760764.docx | bin | 0 -> 10079 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmltok/ooxmltok.cxx | 21 |
2 files changed, 21 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmltok/data/n760764.docx b/sw/qa/extras/ooxmltok/data/n760764.docx Binary files differnew file mode 100644 index 000000000000..5e479e2bf31b --- /dev/null +++ b/sw/qa/extras/ooxmltok/data/n760764.docx diff --git a/sw/qa/extras/ooxmltok/ooxmltok.cxx b/sw/qa/extras/ooxmltok/ooxmltok.cxx index fb5e3d2a9298..67d18cef180e 100644 --- a/sw/qa/extras/ooxmltok/ooxmltok.cxx +++ b/sw/qa/extras/ooxmltok/ooxmltok.cxx @@ -61,6 +61,7 @@ public: void testN747461(); void testN750255(); void testN652364(); + void testN760764(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -76,6 +77,7 @@ public: CPPUNIT_TEST(testN747461); CPPUNIT_TEST(testN750255); CPPUNIT_TEST(testN652364); + CPPUNIT_TEST(testN760764); #endif CPPUNIT_TEST_SUITE_END(); @@ -403,6 +405,25 @@ xray para2.PageStyleName CPPUNIT_ASSERT_EQUAL( OUString( "Standard" ), pageStyle2 ); } +void Test::testN760764() +{ + load("n760764.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<container::XEnumerationAccess> xRunEnumAccess(xParaEnum->nextElement(), uno::UNO_QUERY); + uno::Reference<container::XEnumeration> xRunEnum(xRunEnumAccess->createEnumeration()); + + // Access the second run, which is a textfield + xRunEnum->nextElement(); + uno::Reference<beans::XPropertySet> xRun(xRunEnum->nextElement(), uno::UNO_QUERY); + float fValue; + xRun->getPropertyValue("CharHeight") >>= fValue; + // This used to be 11, as character properties were ignored. + CPPUNIT_ASSERT_EQUAL(8.f, fValue); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |