summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-04-15 18:37:57 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-04-16 15:32:26 +0200
commite7df7c098ed3a6dc1ecf5b20857835d16d1f9283 (patch)
tree55fb90bdb128fa16aed289f73d550e00c4685f68
parent3617548b24db8966193acfe9d720232c4fe1d56c (diff)
RTF import: handle \objclass
Change-Id: I771c83d0ed8a06a2eeec57a40a80092b537d9b84
-rw-r--r--writerfilter/source/rtftok/rtfcontrolwords.hxx1
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx10
2 files changed, 11 insertions, 0 deletions
diff --git a/writerfilter/source/rtftok/rtfcontrolwords.hxx b/writerfilter/source/rtftok/rtfcontrolwords.hxx
index 53608933b37e..dfbbabf5ba35 100644
--- a/writerfilter/source/rtftok/rtfcontrolwords.hxx
+++ b/writerfilter/source/rtftok/rtfcontrolwords.hxx
@@ -74,6 +74,7 @@ enum class Destination
COMMENT,
OBJECT,
OBJDATA,
+ OBJCLASS,
RESULT,
ANNOTATIONDATE,
ANNOTATIONAUTHOR,
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 591945751cad..c74399c79090 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1245,6 +1245,7 @@ void RTFDocumentImpl::text(OUString& rString)
case Destination::COMPANY:
case Destination::COMMENT:
case Destination::OBJDATA:
+ case Destination::OBJCLASS:
case Destination::ANNOTATIONDATE:
case Destination::ANNOTATIONAUTHOR:
case Destination::ANNOTATIONREFERENCE:
@@ -1868,6 +1869,9 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
m_aStates.top().eDestination = Destination::OBJDATA;
}
break;
+ case RTF_OBJCLASS:
+ m_aStates.top().eDestination = Destination::OBJCLASS;
+ break;
case RTF_RESULT:
m_aStates.top().eDestination = Destination::RESULT;
break;
@@ -5394,6 +5398,12 @@ RTFError RTFDocumentImpl::popState()
m_aOLEAttributes.set(NS_ooxml::LN_inputstream, pStreamValue);
}
break;
+ case Destination::OBJCLASS:
+ {
+ auto pValue = std::make_shared<RTFValue>(m_aStates.top().pDestinationText->makeStringAndClear());
+ m_aOLEAttributes.set(NS_ooxml::LN_CT_OLEObject_ProgID, pValue);
+ break;
+ }
case Destination::OBJECT:
{
if (!m_bObject)