[Libreoffice-commits] .: Branch 'libreoffice-3-6' - writerfilter/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Oct 4 01:50:40 PDT 2012
writerfilter/source/dmapper/GraphicImport.cxx | 4 ++++
1 file changed, 4 insertions(+)
New commits:
commit 9e553fcf085149dcaec15541278d910e59b04676
Author: Cédric Bosdonnat <cedric.bosdonnat at 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 <vmiklos at 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 & )
More information about the Libreoffice-commits
mailing list