diff options
author | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-10-03 14:11:31 +0200 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-10-03 14:39:08 +0200 |
commit | f1fc7c5655dde547b721b3afffabcd8bdbe0add2 (patch) | |
tree | 0ac4728906918d44a54895e91c07ed0c64f8c6f2 | |
parent | d8253f42ac7ce665fe6f3235a0a55f33ce71c3de (diff) |
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
-rw-r--r-- | writerfilter/source/dmapper/GraphicImport.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index cbd59f943ebf..9042f808beb4 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -922,6 +922,10 @@ void GraphicImport::lcl_attribute(Id nName, Value & val) uno::makeAny( aSize.Height ) ); xGraphProps->setPropertyValue("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 & ) |