summaryrefslogtreecommitdiff
path: root/sw/qa/extras/rtfimport/rtfimport.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-07-24 14:40:53 +0200
committerMichael Stahl <mstahl@redhat.com>2015-07-24 15:15:57 +0200
commita61fd02c819433a1206b3b3e61017ba2d0d3d467 (patch)
tree7a78ffde13e7d083b3a754b65c903de4cf7ad2de /sw/qa/extras/rtfimport/rtfimport.cxx
parent9618f6af2d97006fd532adb798e64a773a56978b (diff)
tdf#90046: RTF import: ensure that a run is started before \footnote
Avoids crashing with empty context stacks. Change-Id: I0ee8b457fdbb19b55f5c15876b7253680cde6e23
Diffstat (limited to 'sw/qa/extras/rtfimport/rtfimport.cxx')
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 7ec1931d53b9..feb2e0aad45b 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -2173,6 +2173,15 @@ DECLARE_RTFIMPORT_TEST(testFdo85889pca, "fdo85889-pca.rtf")
CPPUNIT_ASSERT_EQUAL(aExpected, xTextRange->getString());
}
+DECLARE_RTFIMPORT_TEST(testTdf90046, "tdf90046.rtf")
+{
+ // this was crashing on importing the footnote
+ uno::Reference<text::XFootnotesSupplier> xFootnotesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xFootnotes(xFootnotesSupplier->getFootnotes(), uno::UNO_QUERY);
+ uno::Reference<text::XTextRange> xTextRange(xFootnotes->getByIndex(0), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(OUString("Ma"), xTextRange->getString());
+}
+
DECLARE_RTFIMPORT_TEST(testFdo85889mac, "fdo85889-mac.rtf")
{
uno::Reference<text::XTextRange> xTextRange = getRun(getParagraph(1), 1);