diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-11-22 20:08:42 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-11-22 20:57:00 +0100 |
commit | bb77fd64f9219f1b8f990f5041d81cfddd021213 (patch) | |
tree | 6e26c29b4a6348c90da5ff83a961ecb217ba02fb /sw | |
parent | 357011b5baef0b9b0b966e84ea2494aa81845e45 (diff) |
fdo#82006 RTF filter: import \sbauto and \saauto
Change-Id: Iabff543c8191fc86dceb9274ea1552f60d73dabd
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/rtfexport/data/fdo82006.rtf | 4 | ||||
-rw-r--r-- | sw/qa/extras/rtfexport/rtfexport.cxx | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfexport/data/fdo82006.rtf b/sw/qa/extras/rtfexport/data/fdo82006.rtf new file mode 100644 index 000000000000..0f5ee43ad2d5 --- /dev/null +++ b/sw/qa/extras/rtfexport/data/fdo82006.rtf @@ -0,0 +1,4 @@ +{\rtf1 +\pard\plain +\ql \sb100\sa100\sbauto1\saauto1 hello\par +} diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx index c4118c6ddf2e..221618d56ad7 100644 --- a/sw/qa/extras/rtfexport/rtfexport.cxx +++ b/sw/qa/extras/rtfexport/rtfexport.cxx @@ -843,6 +843,14 @@ DECLARE_RTFEXPORT_TEST(testNumOverrideStart, "num-override-start.rtf") CPPUNIT_ASSERT_EQUAL(sal_Int16(1), comphelper::SequenceAsHashMap(xRules->getByIndex(0))["StartWith"].get<sal_Int16>()); CPPUNIT_ASSERT_EQUAL(sal_Int16(3), comphelper::SequenceAsHashMap(xRules->getByIndex(1))["StartWith"].get<sal_Int16>()); } + +DECLARE_RTFEXPORT_TEST(testFdo82006, "fdo82006.rtf") +{ + // These were 176 (100 twips), as \sbauto and \sbbefore were ignored. + CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(280)), getProperty<sal_Int32>(getParagraph(0), "ParaTopMargin")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(convertTwipToMm100(280)), getProperty<sal_Int32>(getParagraph(0), "ParaBottomMargin")); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |