From fc8c4606e0834cd2128a228c2c95fc7c8f9eb7b1 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 8 Dec 2016 12:19:27 +0100 Subject: RTF filter: handle user-defined document properties of type number Previously only strings were handled. Change-Id: I2452cbabf48bfaa9f1a3044be4b8cbe4aa9dd0d9 --- writerfilter/source/rtftok/rtfdispatchvalue.cxx | 3 +++ writerfilter/source/rtftok/rtfdocumentimpl.cxx | 2 ++ 2 files changed, 5 insertions(+) (limited to 'writerfilter') diff --git a/writerfilter/source/rtftok/rtfdispatchvalue.cxx b/writerfilter/source/rtftok/rtfdispatchvalue.cxx index 0a77075a8f7c..dc49e6484ef6 100644 --- a/writerfilter/source/rtftok/rtfdispatchvalue.cxx +++ b/writerfilter/source/rtftok/rtfdispatchvalue.cxx @@ -1394,6 +1394,9 @@ RTFError RTFDocumentImpl::dispatchValue(RTFKeyword nKeyword, int nParam) { switch (nParam) { + case 3: + m_aStates.top().aPropType = cppu::UnoType::get(); + break; case 30: m_aStates.top().aPropType = cppu::UnoType::get(); break; diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index a65d7b649f8a..c92e3a9fd4a8 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -2683,6 +2683,8 @@ RTFError RTFDocumentImpl::popState() uno::Any aAny; if (m_aStates.top().aPropType == cppu::UnoType::get()) aAny = uno::makeAny(aStaticVal); + else if (m_aStates.top().aPropType == cppu::UnoType::get()) + aAny = uno::makeAny(aStaticVal.toInt32()); xPropertyContainer->addProperty(rKey, beans::PropertyAttribute::REMOVABLE, aAny); } -- cgit