[Libreoffice-commits] .: writerfilter/source

Noel Power noelp at kemper.freedesktop.org
Wed Nov 9 06:39:05 PST 2011


 writerfilter/source/rtftok/rtfdocumentimpl.cxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit 02c6f5c74b346f1e3a095d99a36ece6b603bc26b
Author: Noel Power <noel.power at novell.com>
Date:   Wed Nov 9 14:36:28 2011 +0000

    fix rtf image import ( causing wrong image sometimes displayed ) fdo#42640

diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 50664df..96c0add 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -44,6 +44,8 @@
 #include <svl/lngmisc.hxx>
 #include <unotools/ucbstreamhelper.hxx>
 #include <unotools/streamwrap.hxx>
+#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
+#include <com/sun/star/drawing/XDrawPage.hpp>
 
 #include <doctok/sprmids.hxx> // NS_sprm namespace
 #include <doctok/resourceids.hxx> // 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<beans::XPropertySet> xPropertySet(xShape, uno::UNO_QUERY);
+    uno::Reference<drawing::XDrawPageSupplier> 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


More information about the Libreoffice-commits mailing list