writerfilter/source/dmapper/GraphicImport.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 9e553fcf085149dcaec15541278d910e59b04676
Author: Cédric Bosdonnat <cedric.bosdon...@free.fr>
Date:   Wed Oct 3 14:11:31 2012 +0200

    fdo#44278: fix leaked image when import docx
    
    Unused temporary XShape need to be disposed to avoid remaining garbage
    in the document.
    
    Change-Id: Iaf6e720a1c47605136f7f9ccafb605cab6dc260a
    (cherry picked from commit f1fc7c5655dde547b721b3afffabcd8bdbe0add2)
    
    Signed-off-by: Miklos Vajna <vmik...@suse.cz>

diff --git a/writerfilter/source/dmapper/GraphicImport.cxx 
b/writerfilter/source/dmapper/GraphicImport.cxx
index 6d16a8d..73cc341 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -916,6 +916,10 @@ void GraphicImport::lcl_attribute(Id nName, Value & val)
                                    uno::makeAny( aSize.Height ) );
                             xGraphProps->setPropertyValue( 
rtl::OUString("Width"),
                                    uno::makeAny( aSize.Width ) );
+
+                            // We need to drop the shape here somehow
+                            uno::Reference< lang::XComponent > 
xShapeComponent( xShape, uno::UNO_QUERY );
+                            xShapeComponent->dispose( );
                         }
                     }
                     catch( const beans::UnknownPropertyException & )
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to