summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-12-08 12:19:27 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-12-08 13:38:42 +0100
commitfc8c4606e0834cd2128a228c2c95fc7c8f9eb7b1 (patch)
tree5d0ba9963fc72db9897bd3298d41996f971ee92a /writerfilter
parenta66731982e93cdcc5beaa5b0586a7f12a7fc0ef6 (diff)
RTF filter: handle user-defined document properties of type number
Previously only strings were handled. Change-Id: I2452cbabf48bfaa9f1a3044be4b8cbe4aa9dd0d9
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/rtftok/rtfdispatchvalue.cxx3
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx2
2 files changed, 5 insertions, 0 deletions
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<sal_Int32>::get();
+ break;
case 30:
m_aStates.top().aPropType = cppu::UnoType<OUString>::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<OUString>::get())
aAny = uno::makeAny(aStaticVal);
+ else if (m_aStates.top().aPropType == cppu::UnoType<sal_Int32>::get())
+ aAny = uno::makeAny(aStaticVal.toInt32());
xPropertyContainer->addProperty(rKey, beans::PropertyAttribute::REMOVABLE, aAny);
}