summaryrefslogtreecommitdiff
path: root/sw/qa/extras/rtfimport
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-08-02 21:44:02 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-08-02 21:44:02 +0200
commitc3657be928732f1b3b3b238f625de304a90a1ae1 (patch)
tree9f90b1bcee3c6e5c4c03ff0a167297235f38ea04 /sw/qa/extras/rtfimport
parent82e91af894fd257a7a197da487a5faecd7db90ca (diff)
fdo#80742 RTF filter: import RTF_OUTLINELEVEL
Change-Id: I49d94bd72af610e88128cd405e4786d2e9ba65ed
Diffstat (limited to 'sw/qa/extras/rtfimport')
-rw-r--r--sw/qa/extras/rtfimport/data/fdo80742.rtf6
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx7
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/fdo80742.rtf b/sw/qa/extras/rtfimport/data/fdo80742.rtf
new file mode 100644
index 000000000000..6055d13da0c1
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/fdo80742.rtf
@@ -0,0 +1,6 @@
+{\rtf1
+{\stylesheet
+{\s13\outlinelevel1 Heading 2;}
+}
+\pard\s13\plain hello\par
+}
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index e9cf28d1aec0..b36f96d1dcee 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -1880,6 +1880,13 @@ DECLARE_RTFIMPORT_TEST(testOleInline, "ole-inline.rtf")
CPPUNIT_ASSERT_EQUAL(text::TextContentAnchorType_AS_CHARACTER, getProperty<text::TextContentAnchorType>(getShape(1), "AnchorType"));
}
+DECLARE_RTFIMPORT_TEST(testFdo80742, "fdo80742.rtf")
+{
+ uno::Reference<beans::XPropertySet> xPropertySet(getStyles("ParagraphStyles")->getByName("Heading 2"), uno::UNO_QUERY);
+ // This was 0, outline level was body text.
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), getProperty<sal_Int32>(xPropertySet, "OutlineLevel"));
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */