diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-03-19 10:45:28 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-03-19 10:56:47 +0100 |
commit | 9415e8c6c3089be3c4c78e3878163eda3e2bd873 (patch) | |
tree | 69ff635872c3420dfd4af98bea767eb523d0b5eb /sw | |
parent | c08e789d3a6449e4abf946b77894a72aedd1dc53 (diff) |
testcase for n#751020
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/rtftok/data/n751020.rtf | 8 | ||||
-rw-r--r-- | sw/qa/extras/rtftok/rtftok.cxx | 15 |
2 files changed, 23 insertions, 0 deletions
diff --git a/sw/qa/extras/rtftok/data/n751020.rtf b/sw/qa/extras/rtftok/data/n751020.rtf new file mode 100644 index 000000000000..66175cf8b901 --- /dev/null +++ b/sw/qa/extras/rtftok/data/n751020.rtf @@ -0,0 +1,8 @@ +{\rtf1 +{\stylesheet +{Normal;} +} +\linkstyles +first\par +second\par +} diff --git a/sw/qa/extras/rtftok/rtftok.cxx b/sw/qa/extras/rtftok/rtftok.cxx index c376779d5b0d..74836343717d 100644 --- a/sw/qa/extras/rtftok/rtftok.cxx +++ b/sw/qa/extras/rtftok/rtftok.cxx @@ -67,6 +67,7 @@ public: void testN750757(); void testFdo45563(); void testFdo43965(); + void testN751020(); CPPUNIT_TEST_SUITE(RtfModelTest); #if !defined(MACOSX) && !defined(WNT) @@ -80,6 +81,7 @@ public: CPPUNIT_TEST(testN750757); CPPUNIT_TEST(testFdo45563); CPPUNIT_TEST(testFdo43965); + CPPUNIT_TEST(testN751020); #endif CPPUNIT_TEST_SUITE_END(); @@ -374,6 +376,19 @@ void RtfModelTest::testFdo43965() CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xCursor->getPage()); } +void RtfModelTest::testN751020() +{ + load(OUString(RTL_CONSTASCII_USTRINGPARAM("n751020.rtf"))); + 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(); + CPPUNIT_ASSERT(xParaEnum->hasMoreElements()); + uno::Reference<beans::XPropertySet> xPropertySet(xParaEnum->nextElement(), uno::UNO_QUERY); + sal_Int32 nValue = 0; + xPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParaBottomMargin"))) >>= nValue; + CPPUNIT_ASSERT_EQUAL(sal_Int32(TWIP_TO_MM100(200)), nValue); +} + CPPUNIT_TEST_SUITE_REGISTRATION(RtfModelTest); CPPUNIT_PLUGIN_IMPLEMENT(); |