summaryrefslogtreecommitdiffstats
path: root/oox
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-06-25 22:13:24 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-06-26 14:00:33 +0200
commitd647dc45b9ae0494e4f3185a6eb85e006b336b00 (patch)
tree64a9850ff2e5e392c1fad468923b19bcc75c4cc5 /oox
parenttdf#117175 wayland: Make popup windows not show off-screen (diff)
downloadcore-d647dc45b9ae0494e4f3185a6eb85e006b336b00.tar.gz
core-d647dc45b9ae0494e4f3185a6eb85e006b336b00.zip
tdf#118133 DOCX import: disable lazy-loading of tiff images
The same code that works for jpeg/png doesn't work for tiff, go back to synchronous loading there for now. (cherry picked from commit fa356008b08a8a5b5556aa8f89ca8f7989c53516) Change-Id: I9b16f40811f6d485c986bd06daa7d4d8c8a76178 Reviewed-on: https://gerrit.libreoffice.org/56444 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/helper/graphichelper.cxx8
1 files changed, 7 insertions, 1 deletions
diff --git a/oox/source/helper/graphichelper.cxx b/oox/source/helper/graphichelper.cxx
index 073cfe6d694f..6500f82e9a44 100644
--- a/oox/source/helper/graphichelper.cxx
+++ b/oox/source/helper/graphichelper.cxx
@@ -242,7 +242,8 @@ Reference< XGraphic > GraphicHelper::importGraphic( const Reference< XInputStrea
aArgs[ 0 ].Name = "InputStream";
aArgs[ 0 ].Value <<= rxInStrm;
aArgs[ 1 ].Name = "LazyRead";
- aArgs[ 1 ].Value <<= true;
+ bool bLazyRead = !pExtHeader;
+ aArgs[ 1 ].Value <<= bLazyRead;
if ( pExtHeader && pExtHeader->mapMode > 0 )
{
@@ -341,6 +342,11 @@ 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.
+ WmfExternal aHeader;
+ if (rStreamName.endsWith(".tiff") && !pExtHeader)
+ pExtHeader = &aHeader;
+
xGraphic = importGraphic(mxStorage->openInputStream(rStreamName), pExtHeader);
if( xGraphic.is() )
maEmbeddedGraphics[ rStreamName ] = xGraphic;