summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2017-04-19 11:38:59 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-05-05 10:51:45 +0200
commit31e22b4bd961ed946bf8f0f4ccb330c699292ddb (patch)
treee21e6c4a64cb901d6b4c1e4cd0b01cda044e9d01
parentda8e35e190b96a2cbd26f848bcd2acd139618ebb (diff)
tdf#105942 Don't hang when file is protected and compressed
Change-Id: I762e6e6d457ea3f5a1f1fd706268b832a71ee550 Reviewed-on: https://gerrit.libreoffice.org/36672 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Xisco FaulĂ­ <xiscofauli@libreoffice.org> (cherry picked from commit f8fdc6417b4d023b7c75485754a0ab1b164a69d6) Reviewed-on: https://gerrit.libreoffice.org/37071 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--package/source/zippackage/ZipPackageStream.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index 2222f7b1f166..c66fbcf4642e 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -792,7 +792,7 @@ bool ZipPackageStream::saveChild(
uno::Reference< io::XSeekable > xSeek(xStream, uno::UNO_QUERY);
// It's not worth to deflate jpegs to save ~1% in a slow process
// Unfortunately, does not work for streams protected by password
- if (xSeek.is() && msMediaType.endsWith("/jpeg") && !m_bToBeEncrypted)
+ if (xSeek.is() && msMediaType.endsWith("/jpeg") && !m_bToBeEncrypted && !m_bToBeCompressed)
{
ImplSetStoredData(*pTempEntry, xStream);
xSeek->seek(0);