oox/source/helper/graphichelper.cxx |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

New commits:
commit c6bf16909db054ec5467ebdc0ea0c9dc07307048
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Mon Mar 8 11:03:11 2021 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Thu Mar 11 15:01:40 2021 +0100

    Revert "tdf#118133 DOCX import: disable lazy-loading of tiff images"
    
    This reverts commit fa356008b08a8a5b5556aa8f89ca8f7989c53516
    
    Similar to 1238ca8d100c107656b707ed3a6b662f0a1867fb <Revert
    "tdf#126310 Disable lazy loading of WMF images> it seems this
    workaround is no longer needed and lazy-loading works with
    tiff images.
    The unittest has not been reverted
    
    Change-Id: Ie8debfc2978a4b57aa035679116472c98db89e33
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112162
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/oox/source/helper/graphichelper.cxx 
b/oox/source/helper/graphichelper.cxx
index 17cf66c92e44..522ffff73f6f 100644
--- a/oox/source/helper/graphichelper.cxx
+++ b/oox/source/helper/graphichelper.cxx
@@ -251,8 +251,7 @@ Reference< XGraphic > GraphicHelper::importGraphic( const 
Reference< XInputStrea
         aArgs[ 0 ].Name = "InputStream";
         aArgs[ 0 ].Value <<= rxInStrm;
         aArgs[ 1 ].Name = "LazyRead";
-        bool bLazyRead = !pExtHeader;
-        aArgs[ 1 ].Value <<= bLazyRead;
+        aArgs[ 1 ].Value <<= true;
 
         if ( pExtHeader && pExtHeader->mapMode > 0 )
         {
@@ -301,11 +300,6 @@ Reference< XGraphic > 
GraphicHelper::importEmbeddedGraphic( const OUString& rStr
         xGraphic = mxGraphicMapper->findGraphic(rStreamName);
         if (!xGraphic.is())
         {
-            // Lazy-loading doesn't work with TIFF at the moment.
-            WmfExternal aHeader;
-            if (rStreamName.endsWith(".tiff") && !pExtHeader)
-                pExtHeader = &aHeader;
-
             auto xStream = mxStorage->openInputStream(rStreamName);
             xGraphic = importGraphic(xStream, pExtHeader);
             if (xGraphic.is())
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to