summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-12-08 12:19:27 +0100
committerMichael Stahl <mstahl@redhat.com>2017-02-06 22:54:38 +0000
commit6a537b3c44e79a389a8a8b7c10e53579c7ecf389 (patch)
treece4eb0d0f214f300693426324456d33fa8878fe3 /writerfilter
parentbf357ae90811edc101ff13774c2e28a16bb5420d (diff)
tdf#104082 RTF filter: handle user-defined document properties of type number
Previously only strings were handled, which resulted in not being able to open the bugdoc. (cherry picked from commit fc8c4606e0834cd2128a228c2c95fc7c8f9eb7b1) Change-Id: I2452cbabf48bfaa9f1a3044be4b8cbe4aa9dd0d9 Reviewed-on: https://gerrit.libreoffice.org/33952 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
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 9de22b7d447b..1c0ec1bd8401 100644
--- a/writerfilter/source/rtftok/rtfdispatchvalue.cxx
+++ b/writerfilter/source/rtftok/rtfdispatchvalue.cxx
@@ -1391,6 +1391,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 ddede5718c2c..2264493649e8 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -2687,6 +2687,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);
}