summaryrefslogtreecommitdiff
path: root/sw/qa/extras/rtfexport/rtfexport.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-03-31 08:37:43 +0200
committerAndras Timar <andras.timar@collabora.com>2016-04-14 08:16:11 +0000
commit7dece94d6aa122d69e9740b93597d13347b5cb11 (patch)
treeec64510c86463c74985a707141812494111a7768 /sw/qa/extras/rtfexport/rtfexport.cxx
parent168e55d3d05224c790824ec71677ff787371ad48 (diff)
tdf#98806 RTF import: handle bookmarks in table text
Mapper().props() was called directly, so all bookmarks pointed to the start of the A1 cell instead of the correct text range. (cherry picked from commit 3d922d7da4fa11b8c22bbdffd141fa1398b2fcd4) Conflicts: sw/qa/extras/rtfexport/rtfexport.cxx Change-Id: I40eeb85b61d2ae9138cd666d4a6a3c08eda47da3 Reviewed-on: https://gerrit.libreoffice.org/23913 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sw/qa/extras/rtfexport/rtfexport.cxx')
-rw-r--r--sw/qa/extras/rtfexport/rtfexport.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index 08250349b44e..11b92e8c13af 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -983,6 +983,14 @@ DECLARE_RTFEXPORT_TEST(testTdf96175, "tdf96175.rtf")
CPPUNIT_ASSERT_EQUAL(OUString("foobar"), getProperty<OUString>(xUserDefinedProperties, "Company"));
}
+DECLARE_RTFEXPORT_TEST(testTdf98806, "tdf98806.rtf")
+{
+ uno::Reference<text::XBookmarksSupplier> xBookmarksSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<text::XTextContent> xBookmark(xBookmarksSupplier->getBookmarks()->getByName("bookmark"), uno::UNO_QUERY);
+ // This was empty, bookmark in table wasn't imported correctly.
+ CPPUNIT_ASSERT_EQUAL(OUString("BBB"), xBookmark->getAnchor()->getString());
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */