[Libreoffice-commits] core.git: Branch 'libreoffice-4-3' - sw/qa writerfilter/source
Miklos Vajna
vmiklos at collabora.co.uk
Mon Aug 4 05:53:22 PDT 2014
sw/qa/extras/rtfimport/data/fdo80742.rtf | 6 ++++++
sw/qa/extras/rtfimport/rtfimport.cxx | 7 +++++++
writerfilter/source/rtftok/rtfdocumentimpl.cxx | 3 +++
3 files changed, 16 insertions(+)
New commits:
commit 6ce5eaf63f2bcc3f61abd20bbf84751c3ba4741e
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Sat Aug 2 21:44:02 2014 +0200
fdo#80742 RTF filter: import RTF_OUTLINELEVEL
(cherry picked from commit c3657be928732f1b3b3b238f625de304a90a1ae1)
Change-Id: I49d94bd72af610e88128cd405e4786d2e9ba65ed
Reviewed-on: https://gerrit.libreoffice.org/10727
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
diff --git a/sw/qa/extras/rtfimport/data/fdo80742.rtf b/sw/qa/extras/rtfimport/data/fdo80742.rtf
new file mode 100644
index 0000000..6055d13
--- /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 5ed5d36..21458df 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -1813,6 +1813,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: */
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 5823b70..1917276 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -4550,6 +4550,9 @@ int RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam)
case RTF_RIN:
lcl_putNestedAttribute(m_aStates.top().aParagraphSprms, NS_ooxml::LN_CT_PPrBase_ind, NS_ooxml::LN_CT_Ind_end, pIntValue);
break;
+ case RTF_OUTLINELEVEL:
+ m_aStates.top().aParagraphSprms.set(NS_ooxml::LN_CT_PPrBase_outlineLvl, pIntValue);
+ break;
default:
{
SAL_INFO("writerfilter", "TODO handle value '" << lcl_RtfToString(nKeyword) << "'");
More information about the Libreoffice-commits
mailing list