Kaydet (Commit) e7df7c09 authored tarafından Miklos Vajna's avatar Miklos Vajna

RTF import: handle \objclass

Change-Id: I771c83d0ed8a06a2eeec57a40a80092b537d9b84
üst 3617548b
...@@ -74,6 +74,7 @@ enum class Destination ...@@ -74,6 +74,7 @@ enum class Destination
COMMENT, COMMENT,
OBJECT, OBJECT,
OBJDATA, OBJDATA,
OBJCLASS,
RESULT, RESULT,
ANNOTATIONDATE, ANNOTATIONDATE,
ANNOTATIONAUTHOR, ANNOTATIONAUTHOR,
......
...@@ -1245,6 +1245,7 @@ void RTFDocumentImpl::text(OUString& rString) ...@@ -1245,6 +1245,7 @@ void RTFDocumentImpl::text(OUString& rString)
case Destination::COMPANY: case Destination::COMPANY:
case Destination::COMMENT: case Destination::COMMENT:
case Destination::OBJDATA: case Destination::OBJDATA:
case Destination::OBJCLASS:
case Destination::ANNOTATIONDATE: case Destination::ANNOTATIONDATE:
case Destination::ANNOTATIONAUTHOR: case Destination::ANNOTATIONAUTHOR:
case Destination::ANNOTATIONREFERENCE: case Destination::ANNOTATIONREFERENCE:
...@@ -1868,6 +1869,9 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword) ...@@ -1868,6 +1869,9 @@ RTFError RTFDocumentImpl::dispatchDestination(RTFKeyword nKeyword)
m_aStates.top().eDestination = Destination::OBJDATA; m_aStates.top().eDestination = Destination::OBJDATA;
} }
break; break;
case RTF_OBJCLASS:
m_aStates.top().eDestination = Destination::OBJCLASS;
break;
case RTF_RESULT: case RTF_RESULT:
m_aStates.top().eDestination = Destination::RESULT; m_aStates.top().eDestination = Destination::RESULT;
break; break;
...@@ -5394,6 +5398,12 @@ RTFError RTFDocumentImpl::popState() ...@@ -5394,6 +5398,12 @@ RTFError RTFDocumentImpl::popState()
m_aOLEAttributes.set(NS_ooxml::LN_inputstream, pStreamValue); m_aOLEAttributes.set(NS_ooxml::LN_inputstream, pStreamValue);
} }
break; 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: case Destination::OBJECT:
{ {
if (!m_bObject) if (!m_bObject)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment