tdf#126310 Disable lazy loading of WMF images
Change-Id: I70d271e29bedc640cbfeab187ddb9ffce3e779e6
Reviewed-on: https://gerrit.libreoffice.org/75599
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
diff --git a/oox/source/helper/graphichelper.cxx b/oox/source/helper/graphichelper.cxx
index 6ada6cd..8e56f58 100644
--- a/oox/source/helper/graphichelper.cxx
+++ b/oox/source/helper/graphichelper.cxx
@@ -355,9 +355,9 @@ Reference< XGraphic > GraphicHelper::importEmbeddedGraphic( const OUString& rStr
EmbeddedGraphicMap::const_iterator aIt = maEmbeddedGraphics.find( rStreamName );
if( aIt == maEmbeddedGraphics.end() )
{
// Lazy-loading doesn't work with TIFF at the moment.
// Lazy-loading doesn't work with TIFF or WMF at the moment.
WmfExternal aHeader;
if (rStreamName.endsWith(".tiff") && !pExtHeader)
if ( (rStreamName.endsWith(".tiff") || rStreamName.endsWith(".wmf") ) && !pExtHeader)
pExtHeader = &aHeader;
xGraphic = importGraphic(mxStorage->openInputStream(rStreamName), pExtHeader);