summaryrefslogtreecommitdiff
path: root/writerfilter/source/rtftok/rtfdocumentimpl.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-04-15 18:32:30 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-04-16 15:32:25 +0200
commit3617548b24db8966193acfe9d720232c4fe1d56c (patch)
treec9e3ac7e27a684a78ffc9972eac1a6811aaca7c9 /writerfilter/source/rtftok/rtfdocumentimpl.cxx
parent581314958f0ddd6c3a0536ce2d7e7e6f0c53a8ec (diff)
RTF import: allow multiple children for ooxml:OLEObject_OLEObject
Change-Id: Iec84588daf5555d1207827efb0f26d8354ad462b
Diffstat (limited to 'writerfilter/source/rtftok/rtfdocumentimpl.cxx')
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx15
1 files changed, 8 insertions, 7 deletions
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 2e1fd4e88f3f..591945751cad 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -250,7 +250,7 @@ RTFDocumentImpl::RTFDocumentImpl(uno::Reference<uno::XComponentContext> const& x
m_aFormfieldSprms(),
m_aFormfieldAttributes(),
m_nFormFieldType(RTFFormFieldType::NONE),
- m_aObjectSprms(),
+ m_aOLEAttributes(),
m_aObjectAttributes(),
m_bObject(false),
m_aFontTableEntries(),
@@ -5391,10 +5391,7 @@ RTFError RTFDocumentImpl::popState()
uno::Reference<io::XInputStream> xInputStream(new utl::OInputStreamWrapper(m_pObjectData.get()));
auto pStreamValue = std::make_shared<RTFValue>(xInputStream);
- RTFSprms aOLEAttributes;
- aOLEAttributes.set(NS_ooxml::LN_inputstream, pStreamValue);
- auto pValue = std::make_shared<RTFValue>(aOLEAttributes);
- m_aObjectSprms.set(NS_ooxml::LN_OLEObject_OLEObject, pValue);
+ m_aOLEAttributes.set(NS_ooxml::LN_inputstream, pStreamValue);
}
break;
case Destination::OBJECT:
@@ -5407,9 +5404,13 @@ RTFError RTFDocumentImpl::popState()
break;
}
+ RTFSprms aObjectSprms;
+ auto pOLEValue = std::make_shared<RTFValue>(m_aOLEAttributes);
+ aObjectSprms.set(NS_ooxml::LN_OLEObject_OLEObject, pOLEValue);
+
RTFSprms aObjAttributes;
RTFSprms aObjSprms;
- auto pValue = std::make_shared<RTFValue>(m_aObjectAttributes, m_aObjectSprms);
+ auto pValue = std::make_shared<RTFValue>(m_aObjectAttributes, aObjectSprms);
aObjSprms.set(NS_ooxml::LN_object, pValue);
writerfilter::Reference<Properties>::Pointer_t pProperties = std::make_shared<RTFReferenceProperties>(aObjAttributes, aObjSprms);
uno::Reference<drawing::XShape> xShape;
@@ -5421,7 +5422,7 @@ RTFError RTFDocumentImpl::popState()
Mapper().props(pProperties);
Mapper().endShape();
m_aObjectAttributes.clear();
- m_aObjectSprms.clear();
+ m_aOLEAttributes.clear();
m_bObject = false;
}
break;