diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 50664df49917..96c0adddaf75 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -44,6 +44,8 @@ #include #include #include +#include +#include #include // NS_sprm namespace #include // NS_rtf namespace @@ -590,6 +592,13 @@ int RTFDocumentImpl::resolvePict(bool bInline) if (m_xModelFactory.is()) xShape.set(m_xModelFactory->createInstance(aService), uno::UNO_QUERY); uno::Reference xPropertySet(xShape, uno::UNO_QUERY); + uno::Reference xDrawSupplier( m_xDstDoc, uno::UNO_QUERY); + if ( xDrawSupplier.is() ) + { + uno::Reference< drawing::XShapes > xShapes( xDrawSupplier->getDrawPage(), uno::UNO_QUERY ); + if ( xShapes.is() ) + xShapes->add( xShape ); + } if (m_bObject) { // Set bitmap