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:56:45 +0100
commit6631b46dfb894ff8f2bbb09c92f1786c756ee352 (patch)
treeb6a0ac0ca0aa858c4c2a9d7891df95314343f710 /sw
parent6b2cb891eb415f94ad54237e6e8c42acef513f45 (diff)
(related fdo#84685): writerfilter: RTF import: support \tc TOC entry
Change-Id: Icda252e1f092707728d3a24df50fba7080e759bb (cherry picked from commit 1dd1dfc152c7cbeb374fe4f38b08c6af9cef2c06)
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 fafb2b07d9d0..e6a36196875c 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -2092,6 +2092,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")