diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-05-11 14:45:59 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-05-11 15:09:15 +0200 |
commit | bf123eeffc05907dfcb0d355ab17359353b0ede5 (patch) | |
tree | 565a2f30c269455deb46e100953bd5022c4ac4df /sw/qa/extras | |
parent | 46f38ec48c938764ece51c262f4cc018c5c8ff8d (diff) |
fdo#45190 import of RTF_LI should reset inherited RTF_FI
Change-Id: I17c287fa4daa399876b34182c02d9cf928fe1b6f
Diffstat (limited to 'sw/qa/extras')
-rw-r--r-- | sw/qa/extras/rtftok/data/fdo45190.rtf | 10 | ||||
-rw-r--r-- | sw/qa/extras/rtftok/rtftok.cxx | 22 |
2 files changed, 32 insertions, 0 deletions
diff --git a/sw/qa/extras/rtftok/data/fdo45190.rtf b/sw/qa/extras/rtftok/data/fdo45190.rtf new file mode 100644 index 000000000000..613a283150f1 --- /dev/null +++ b/sw/qa/extras/rtftok/data/fdo45190.rtf @@ -0,0 +1,10 @@ +{\rtf1 +{\stylesheet +{\s1 \fi-100 style;} +} +\s1\li0 first +\par +\pard +\s1\fi-100\li0 second +\par +} diff --git a/sw/qa/extras/rtftok/rtftok.cxx b/sw/qa/extras/rtftok/rtftok.cxx index bff076a47954..29ea9be10ed4 100644 --- a/sw/qa/extras/rtftok/rtftok.cxx +++ b/sw/qa/extras/rtftok/rtftok.cxx @@ -92,6 +92,7 @@ public: void testFdo49501(); void testFdo49271(); void testFdo49692(); + void testFdo45190(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -127,6 +128,7 @@ public: CPPUNIT_TEST(testFdo49501); CPPUNIT_TEST(testFdo49271); CPPUNIT_TEST(testFdo49692); + CPPUNIT_TEST(testFdo45190); #endif CPPUNIT_TEST_SUITE_END(); @@ -721,6 +723,26 @@ void Test::testFdo49692() } } +void Test::testFdo45190() +{ + load("fdo45190.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(); + + // inherited \fi should be reset + uno::Reference<beans::XPropertySet> xPropertySet(xParaEnum->nextElement(), uno::UNO_QUERY); + sal_Int32 nValue = 0; + xPropertySet->getPropertyValue("ParaFirstLineIndent") >>= nValue; + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), nValue); + + // but direct one not + xPropertySet.set(xParaEnum->nextElement(), uno::UNO_QUERY); + xPropertySet->getPropertyValue("ParaFirstLineIndent") >>= nValue; + CPPUNIT_ASSERT_EQUAL(sal_Int32(TWIP_TO_MM100(-100)), nValue); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |