summaryrefslogtreecommitdiff
path: root/package/source/zippackage
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2015-03-25 21:35:55 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2015-03-25 21:54:26 +0000
commitda651b6ccb47e82f71d890fc8bb9d6cf0201f289 (patch)
treea28c9bef4d1dfec914ee7c3b1e27ac5a8acc4c2c /package/source/zippackage
parentdb8000919e91492feaf234deb5ec8fc7cbe64458 (diff)
tdf#90010 Partially revert "package: Do not bother with deflating jpeg images"
This reverts commit 0843ade74e5848c0babad509b10c334b01847be2 for the case, when the document is protected by password. Would be nice to fix properly later. Change-Id: If159639d6f74de4e106e9dad382faac9d5de4a09 (cherry picked from commit ca5ff4559726455d0c8fbdd08cb35af3308492bf) Reviewed-on: https://gerrit.libreoffice.org/15006 Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'package/source/zippackage')
-rw-r--r--package/source/zippackage/ZipPackageStream.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index e22b234ee24a..c34ba01bf7dc 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -775,7 +775,8 @@ 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
- if (xSeek.is() && msMediaType.endsWith("/jpeg"))
+ // Unfortunately, does not work for streams protected by password
+ if (xSeek.is() && msMediaType.endsWith("/jpeg") && !m_bToBeEncrypted)
{
ImplSetStoredData(*pTempEntry, xStream);
xSeek->seek(0);