summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-12-16 23:17:28 +0100
committerMichael Stahl <mstahl@redhat.com>2014-12-16 23:55:33 +0100
commitf14e6e06b9e3c82c267649d63512a3538e5ee2f5 (patch)
tree863a5610ebe2f8763647cbbc41ac2e508e82e5f9 /sw
parent38b8c1e8804c8556e71e1ec7c1f1350d75dc04bf (diff)
fdo#84685: writerfilter: RTF import: support \xe index entry
Change-Id: Ia957541a5997961aa86b2eb8537ebd29d3092691
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/rtfimport/data/fdo84685.rtf5
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx12
2 files changed, 17 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/fdo84685.rtf b/sw/qa/extras/rtfimport/data/fdo84685.rtf
new file mode 100644
index 000000000000..431dbd3fea22
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/fdo84685.rtf
@@ -0,0 +1,5 @@
+{\rtf1\ansi\ansicpg1252\uc1
+\pard
+{\v {\xe {\v {\f0\fs20 Key the 1st}}}} Some text
+\par
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index 0a688efbc2be..e80f727aa0fe 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -33,6 +33,7 @@
#include <com/sun/star/text/SizeType.hpp>
#include <com/sun/star/text/TableColumnSeparator.hpp>
#include <com/sun/star/text/TextContentAnchorType.hpp>
+#include <com/sun/star/text/XDocumentIndexMark.hpp>
#include <com/sun/star/text/XFootnotesSupplier.hpp>
#include <com/sun/star/text/XPageCursor.hpp>
#include <com/sun/star/text/XTextGraphicObjectsSupplier.hpp>
@@ -2083,6 +2084,17 @@ DECLARE_RTFIMPORT_TEST(testUnbalancedColumns, "unbalanced-columns.rtf")
CPPUNIT_ASSERT_EQUAL(true, getProperty<bool>(xTextSections->getByIndex(0), "DontBalanceTextColumns"));
}
+DECLARE_RTFIMPORT_TEST(testFdo84685, "fdo84685.rtf")
+{
+ // index mark was not imported
+ uno::Reference<text::XDocumentIndexMark> xMark(
+ getProperty<uno::Reference<text::XDocumentIndexMark>>(
+ getRun(getParagraph(1), 1),
+ "DocumentIndexMark"));
+ CPPUNIT_ASSERT(xMark.is());
+ CPPUNIT_ASSERT_EQUAL(OUString("Key the 1st"), getProperty<OUString>(xMark, "PrimaryKey"));
+}
+
DECLARE_RTFIMPORT_TEST(testFdo83204, "fdo83204.rtf")
{
// This was Standard, \sN was ignored after \bkmkstart and \pard.