summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-10-27 19:05:07 +0100
committerMatúš Kukan <matus.kukan@collabora.com>2014-11-05 23:02:17 +0100
commit094c325110bb849d413a60dc600845bf3535d195 (patch)
treeb48a7a5bee1e1c43735e49d6ed4a34ae844a3c57
parentdb22872e395bdfd8ad323ef5b4a384e050d8bc42 (diff)
Revert "HACK to avoid expensive and pointless deflating of jpeg files"
-rw-r--r--package/source/zippackage/ZipPackageStream.cxx12
1 files changed, 1 insertions, 11 deletions
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index bbdb18d8e91e..8d61c6bcc894 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -773,18 +773,8 @@ bool ZipPackageStream::saveChild(
// the entry is provided to the ZipOutputStream that will delete it
pAutoTempEntry.release();
- if (pTempEntry->nMethod == STORED || rPath.endsWith(".jpeg"))
+ if (pTempEntry->nMethod == STORED)
{
- // Do not try to deflate jpeg files, pretend they are compressed already
- // Unfortunately we don't know CRC value
- if (rPath.endsWith(".jpeg"))
- {
- uno::Reference< io::XSeekable > xSeek(xStream, uno::UNO_QUERY);
- pTempEntry->nSize = pTempEntry->nCompressedSize = xSeek->getLength();
- pTempEntry->nCrc = 0;
- pTempEntry->nMethod = STORED;
- pTempEntry->nFlag &= ~(pTempEntry->nFlag & 8);
- }
sal_Int32 nLength;
uno::Sequence< sal_Int8 > aSeq(n_ConstBufferSize);
rZipOut.writeLOC(pTempEntry, bToBeEncrypted);