From 6d981f971774bb26fa269126ec890acec2171bd4 Mon Sep 17 00:00:00 2001 From: Gabor Kelemen Date: Sun, 14 Jul 2019 20:21:08 +0200 Subject: tdf#126310 Disable lazy loading of WMF images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I70d271e29bedc640cbfeab187ddb9ffce3e779e6 Reviewed-on: https://gerrit.libreoffice.org/75599 Tested-by: Jenkins Reviewed-by: Miklos Vajna (cherry picked from commit 184a4771dad448a37f80b29bc62ad62e0a6a4bb6) Reviewed-on: https://gerrit.libreoffice.org/75614 Reviewed-by: Xisco FaulĂ­ (cherry picked from commit 1c04b5c97ca3b12e52ec55572da77f7b6636e34c) Reviewed-on: https://gerrit.libreoffice.org/75623 Reviewed-by: Michael Stahl (cherry picked from commit f88d51e1f27896e5339033671bac158d2436abcf) Reviewed-on: https://gerrit.libreoffice.org/76924 Tested-by: Jenkins CollaboraOffice --- oox/source/helper/graphichelper.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oox/source/helper/graphichelper.cxx b/oox/source/helper/graphichelper.cxx index bb8d0d9a1929..00b805d61803 100644 --- a/oox/source/helper/graphichelper.cxx +++ b/oox/source/helper/graphichelper.cxx @@ -343,9 +343,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); -- cgit v1.2.3