summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmltok/data/n760764.docxbin0 -> 10079 bytes
-rw-r--r--sw/qa/extras/ooxmltok/ooxmltok.cxx21
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
new file mode 100644
index 000000000000..5e479e2bf31b
--- /dev/null
+++ b/sw/qa/extras/ooxmltok/data/n760764.docx
Binary files differ
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();