diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-08-29 17:40:51 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-09-08 12:57:17 +0200 |
commit | f16f40089db8ba59c6ac67f1b85438c8c62b5285 (patch) | |
tree | caa42df6954078817e2389bcf85fafeba53bf037 /sw | |
parent | ed0af187f9e9fb63b311684369e3f2fe1aba700b (diff) |
fdo#79959 RTF import: trim whitespace around style names
(cherry picked from commit 305ecd1848a802a6c43ecc6e76f4c6bc36a03418)
Conflicts:
writerfilter/source/rtftok/rtfdocumentimpl.cxx
Change-Id: Id23cbd62b057442c577fef124a5705e4d551076f
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/rtfimport/data/fdo79959.rtf | 4 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/fdo79959.rtf b/sw/qa/extras/rtfimport/data/fdo79959.rtf new file mode 100644 index 000000000000..231f39a4e123 --- /dev/null +++ b/sw/qa/extras/rtfimport/data/fdo79959.rtf @@ -0,0 +1,4 @@ +{\rtf1\ansi\ansicpg1251\deff0\deflang1049{\fonttbl{\f0\fnil\fcharset0 Calibri;}} +{\stylesheet{\s0 Test;}} +\viewkind4\uc1\pard\s0\slmult1\lang9\f0\fs22 Hello world!\par +} diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index a9c3cb8cd588..b3349f12f79f 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -1689,6 +1689,12 @@ DECLARE_RTFIMPORT_TEST(testFdo74229, "fdo74229.rtf") CPPUNIT_ASSERT_EQUAL(sal_Int32(TWIP_TO_MM100(67)), getProperty<sal_Int32>(xCell, "RightBorderDistance")); } +DECLARE_RTFIMPORT_TEST(testFdo79959, "fdo79959.rtf") +{ + // This was false, as the style was imported as " Test", i.e. no whitespace stripping. + CPPUNIT_ASSERT_EQUAL(true, static_cast<bool>(getStyles("ParagraphStyles")->hasByName("Test"))); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |