diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-10-12 16:17:40 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-10-12 16:26:01 +0200 |
commit | f99ebf4681ceb8803ea32f70835dafa368d74722 (patch) | |
tree | 33d885f74dd6de1468b48995a0dc9d5cc37d0e1a /sw/qa | |
parent | 997ce52eb7ef5d1418784bc16afb495ec43fe64c (diff) |
RTF filter: fix \acc* handling
The exporter didn't write circle and underdot at all.
Change-Id: Ia8f45f2b03fb14e9a0027ec24ee7f36adc8c018d
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/rtfexport/data/em.rtf | 8 | ||||
-rw-r--r-- | sw/qa/extras/rtfexport/rtfexport.cxx | 13 |
2 files changed, 21 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfexport/data/em.rtf b/sw/qa/extras/rtfexport/data/em.rtf new file mode 100644 index 000000000000..c255105d6f32 --- /dev/null +++ b/sw/qa/extras/rtfexport/data/em.rtf @@ -0,0 +1,8 @@ +{\rtf1 +none +{\accdot dot} +{\acccomma comma} +{\acccircle circle} +{\accunderdot underDot} +\par +} diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx index 954dc2fac3ab..5c74c5385b68 100644 --- a/sw/qa/extras/rtfexport/rtfexport.cxx +++ b/sw/qa/extras/rtfexport/rtfexport.cxx @@ -16,6 +16,7 @@ #include <com/sun/star/frame/XStorable.hpp> #include <com/sun/star/table/BorderLine2.hpp> #include <com/sun/star/table/ShadowFormat.hpp> +#include <com/sun/star/text/FontEmphasis.hpp> #include <com/sun/star/text/RelOrientation.hpp> #include <com/sun/star/text/TextContentAnchorType.hpp> #include <com/sun/star/text/XFootnotesSupplier.hpp> @@ -689,6 +690,18 @@ DECLARE_RTFEXPORT_TEST(testAbi10076, "abi10076.odt") // Just make sure that we don't crash after exporting a fully calculated layout. } +DECLARE_RTFEXPORT_TEST(testEm, "em.rtf") +{ + // Test all possible \acc* control words. + CPPUNIT_ASSERT_EQUAL(text::FontEmphasis::NONE, getProperty<sal_Int16>(getRun(getParagraph(1), 1), "CharEmphasis")); + CPPUNIT_ASSERT_EQUAL(text::FontEmphasis::DOT_ABOVE, getProperty<sal_Int16>(getRun(getParagraph(1), 2), "CharEmphasis")); + CPPUNIT_ASSERT_EQUAL(text::FontEmphasis::ACCENT_ABOVE, getProperty<sal_Int16>(getRun(getParagraph(1), 3), "CharEmphasis")); + // This was missing. + CPPUNIT_ASSERT_EQUAL(text::FontEmphasis::CIRCLE_ABOVE, getProperty<sal_Int16>(getRun(getParagraph(1), 4), "CharEmphasis")); + // This one, too. + CPPUNIT_ASSERT_EQUAL(text::FontEmphasis::DOT_BELOW, getProperty<sal_Int16>(getRun(getParagraph(1), 5), "CharEmphasis")); +} + DECLARE_RTFEXPORT_TEST(testNumberingFont, "numbering-font.rtf") { uno::Reference<beans::XPropertySet> xStyle(getStyles("CharacterStyles")->getByName("ListLabel 1"), uno::UNO_QUERY); |