summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-10-15 13:00:24 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-10-15 13:19:08 +0200
commit5a5d55a8a0f82406a8001015a723596f21d3562c (patch)
treeed05c894f717b340c42e336d5f6e589fc9b51c7a /sw
parentecc5cbc69e4c2df4ddbe46bbc2f973cc60a10772 (diff)
fdo#82860 RTF import: fix handling of SHAPE fields
No need to use fieldmarks for these. Change-Id: I8d2c797f2b00be88e445dab0dd69cb1a9556c02c
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/rtfexport/data/fdo82860.odtbin0 -> 9222 bytes
-rw-r--r--sw/qa/extras/rtfexport/rtfexport.cxx10
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfexport/data/fdo82860.odt b/sw/qa/extras/rtfexport/data/fdo82860.odt
new file mode 100644
index 000000000000..f6804103d073
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/fdo82860.odt
Binary files differ
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index 5c74c5385b68..2ffbb38c5ddf 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -709,6 +709,16 @@ DECLARE_RTFEXPORT_TEST(testNumberingFont, "numbering-font.rtf")
CPPUNIT_ASSERT_EQUAL(OUString("Verdana"), getProperty<OUString>(xStyle, "CharFontName"));
}
+DECLARE_RTFEXPORT_TEST(testFdo82860, "fdo82860.odt")
+{
+ // The problem was that:
+ // 1) The import tried to use fieldmarks for SHAPE fields
+ // 2) The exporter did not handle "shape with textbox" text.
+ uno::Reference<text::XTextRange> xTextRange(getShape(1), uno::UNO_QUERY);
+ uno::Reference<text::XText> xText = xTextRange->getText();
+ CPPUNIT_ASSERT_EQUAL(OUString("hello"), getParagraphOfText(1, xText)->getString());
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */