diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-02-10 08:59:01 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-02-10 08:59:21 +0100 |
commit | 93faf178195ca974747849879266783884ae27c5 (patch) | |
tree | 2678e080eb53b728c6f80d1504a9e16065de03ce /sw | |
parent | 9e38d549b9099879ba98b9ad096347d5f9b6475a (diff) |
tdf#87034 RTF import: fix multiple superscripts after footnote ...
... in the same paragraph. The intention was to avoid replaying the
supertext buffer and using its contents as a custom footnote mark at the
same time. However, it's enough to check if the buffer is empty to do
so, and that avoids the mis-import of the bugdoc as well.
Change-Id: I1e3b0c7f0c6d8eb8250d8b1d0d7d196039c40e79
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/rtfimport/data/tdf87034.rtf | 13 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 7 |
2 files changed, 20 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/tdf87034.rtf b/sw/qa/extras/rtfimport/data/tdf87034.rtf new file mode 100644 index 000000000000..16f322c6ff28 --- /dev/null +++ b/sw/qa/extras/rtfimport/data/tdf87034.rtf @@ -0,0 +1,13 @@ +{\rtf1 +\pard\plain A +{\chftn +{\footnote\chftn F +} +} +B +{\super 3} +C +{\super 4} +D +\par +} diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index 1cb27c6bf3bb..b5216c98af48 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -2484,6 +2484,13 @@ DECLARE_RTFIMPORT_TEST(testTdf97035, "tdf97035.rtf") CPPUNIT_ASSERT_EQUAL(sal_Int16(2299), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(1), "TableColumnSeparators")[0].Position); } +DECLARE_RTFIMPORT_TEST(testTdf87034, "tdf87034.rtf") +{ + // This was A1BC34D, i.e. the first "super" text portion was mis-imported, + // and was inserted instead right before the second "super" text portion. + CPPUNIT_ASSERT_EQUAL(OUString("A1B3C4D"), getParagraph(1)->getString()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |