Kaydet (Commit) f1fc7c56 authored tarafından Cédric Bosdonnat's avatar Cédric Bosdonnat

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
üst d8253f42
...@@ -922,6 +922,10 @@ void GraphicImport::lcl_attribute(Id nName, Value & val) ...@@ -922,6 +922,10 @@ void GraphicImport::lcl_attribute(Id nName, Value & val)
uno::makeAny( aSize.Height ) ); uno::makeAny( aSize.Height ) );
xGraphProps->setPropertyValue("Width", xGraphProps->setPropertyValue("Width",
uno::makeAny( aSize.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 & ) catch( const beans::UnknownPropertyException & )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment