diff options
author | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-10-03 14:11:31 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-10-04 10:50:14 +0200 |
commit | 9e553fcf085149dcaec15541278d910e59b04676 (patch) | |
tree | 013e64a63ddaba32ca1ae7ce914c46489d9e64ac | |
parent | c3064a250a912cb9b02419981a3f6a0b55899f2b (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
(cherry picked from commit f1fc7c5655dde547b721b3afffabcd8bdbe0add2)
Signed-off-by: Miklos Vajna <vmiklos@suse.cz>
-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 6d16a8dcef73..73cc3410df3a 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 & ) |