summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-12-16 23:45:15 +0100
committerMichael Stahl <mstahl@redhat.com>2014-12-16 23:55:34 +0100
commit1dd1dfc152c7cbeb374fe4f38b08c6af9cef2c06 (patch)
tree6bef520f06cf57099f5386e323ecc656ae261b39 /sw
parentf14e6e06b9e3c82c267649d63512a3538e5ee2f5 (diff)
(related fdo#84685): writerfilter: RTF import: support \tc TOC entry
Change-Id: Icda252e1f092707728d3a24df50fba7080e759bb
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/rtfimport/data/fdo84685.rtf2
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx8
2 files changed, 10 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/fdo84685.rtf b/sw/qa/extras/rtfimport/data/fdo84685.rtf
index 431dbd3fea22..af73b1a57bf0 100644
--- a/sw/qa/extras/rtfimport/data/fdo84685.rtf
+++ b/sw/qa/extras/rtfimport/data/fdo84685.rtf
@@ -2,4 +2,6 @@
\pard
{\v {\xe {\v {\f0\fs20 Key the 1st}}}} Some text
\par
+{\v {\tc {\v {\f0\fs20 foo}}}} Some text
+\par
}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index e80f727aa0fe..0e651d003829 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -2093,6 +2093,14 @@ DECLARE_RTFIMPORT_TEST(testFdo84685, "fdo84685.rtf")
"DocumentIndexMark"));
CPPUNIT_ASSERT(xMark.is());
CPPUNIT_ASSERT_EQUAL(OUString("Key the 1st"), getProperty<OUString>(xMark, "PrimaryKey"));
+ // let's test toc entry too
+ uno::Reference<text::XDocumentIndexMark> xTOCMark(
+ getProperty<uno::Reference<text::XDocumentIndexMark>>(
+ getRun(getParagraph(2), 1),
+ "DocumentIndexMark"));
+ CPPUNIT_ASSERT(xTOCMark.is());
+ uno::Reference<lang::XServiceInfo> xTOCSI(xTOCMark, uno::UNO_QUERY);
+ CPPUNIT_ASSERT(xTOCSI->supportsService("com.sun.star.text.ContentIndexMark"));
}
DECLARE_RTFIMPORT_TEST(testFdo83204, "fdo83204.rtf")