summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@gmail.com>2015-03-25 21:35:55 +0100
committerMatúš Kukan <matus.kukan@gmail.com>2015-03-25 22:32:40 +0100
commitca5ff4559726455d0c8fbdd08cb35af3308492bf (patch)
tree1a5b7a3bad8b09a5c739cf537fa43f36d561bf75 /package
parentb33788cb6b6d91657ea21eda8cb4925c4b628045 (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
Diffstat (limited to 'package')
-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 9b5eb6926e7a..8e2bbb07dadf 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);