diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-06-22 09:05:30 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-06-22 09:10:54 +0200 |
commit | 7b08304b55cf2284a3c583426c60baef618ba206 (patch) | |
tree | 028ab69c566b8351321e2dabe62bc52c0983ba5d /sw | |
parent | 16c2b60fc10b5fdfd36df64f8fca50b95d81871b (diff) |
tdf#92061 RTF import: fix missing body text after footnote
A missing seek in the \footnote handler could result in a situation that
the missed text contained a "{" but not its matching "}", which resulted
in the parser terminating earlier than the end of the document.
Change-Id: I6df476b2d6397dfa918111b33854dc2f95fbe81d
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/rtfimport/data/tdf92061.rtf | 5 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/tdf92061.rtf b/sw/qa/extras/rtfimport/data/tdf92061.rtf new file mode 100644 index 000000000000..03978b483673 --- /dev/null +++ b/sw/qa/extras/rtfimport/data/tdf92061.rtf @@ -0,0 +1,5 @@ +{\rtf1 +body-before +{\footnote AAAAA {B} C} +body-after\par +} diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index 8171b6dd2041..8a223584722e 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -2307,6 +2307,12 @@ DECLARE_RTFIMPORT_TEST(testBinSkipping, "bin-skipping.rtf") CPPUNIT_ASSERT_EQUAL(OUString("text"), getRun(getParagraph(1), 1)->getString()); } +DECLARE_RTFIMPORT_TEST(testTdf92061, "tdf92061.rtf") +{ + // This was "C", i.e. part of the footnote ended up in the body text. + CPPUNIT_ASSERT_EQUAL(OUString("body-after"), getRun(getParagraph(1), 3)->getString()); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |