diff --git a/package/inc/ZipOutputStream.hxx b/package/inc/ZipOutputStream.hxx index 371dff12de3e..fb0ebf09f6db 100644 --- a/package/inc/ZipOutputStream.hxx +++ b/package/inc/ZipOutputStream.hxx @@ -2,9 +2,9 @@ * * $RCSfile: ZipOutputStream.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: mtg $ $Date: 2000-11-24 10:34:26 $ + * last change: $Author: mtg $ $Date: 2000-11-28 11:02:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -113,7 +113,7 @@ private: CRC32 aCRC; sal_Bool bFinished; ByteChucker aChucker; - ::std::vector < ::com::sun::star::package::ZipEntry > aZipList; + ::std::vector < ::com::sun::star::package::ZipEntry* > aZipList; public: ZipOutputStream( com::sun::star::uno::Reference < com::sun::star::io::XOutputStream > &xOStream, sal_Int32 nNewBufferSize); diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index 5beeeb9d66c8..79bc990c50bc 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ZipPackage.cxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: mtg $ $Date: 2000-11-28 10:12:00 $ + * last change: $Author: mtg $ $Date: 2000-11-28 11:00:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -457,17 +457,20 @@ void SAL_CALL ZipPackage::commitChanges( ) ZipPackageBuffer *pBuffer = new ZipPackageBuffer(65535); Reference < XOutputStream > xOutStream = pBuffer; pEntry->nVersion = -1; - pEntry->nFlag = -1; + pEntry->nFlag = 0; pEntry->nMethod = STORED; pEntry->nTime = -1; - pEntry->nCrc = -1; + pEntry->nCrc = 0; pEntry->nOffset = -1; pEntry->sName = OUString::createFromAscii("META-INF/manifest.xml"); - pZipOut->putNextEntry(*pEntry); ManifestWriter aWriter ( xOutStream, xFactory, aManList); aWriter.Write(); pEntry->nSize = pEntry->nCompressedSize = pBuffer->getPosition(); pBuffer->aBuffer.realloc(pBuffer->getPosition()); + CRC32 aCRC; + aCRC.update(pBuffer->aBuffer); + pEntry->nCrc = aCRC.getValue(); + pZipOut->putNextEntry(*pEntry); pZipOut->write(pBuffer->aBuffer, 0, pBuffer->getPosition()); pZipOut->closeEntry(); pZipOut->finish(); diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx index 1e28f73f3bf1..4c16484d30c1 100644 --- a/package/source/zippackage/ZipPackageFolder.cxx +++ b/package/source/zippackage/ZipPackageFolder.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ZipPackageFolder.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: mtg $ $Date: 2000-11-27 16:55:07 $ + * last change: $Author: mtg $ $Date: 2000-11-28 11:00:27 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -333,6 +333,9 @@ void ZipPackageFolder::saveContents(rtl::OUString &rPath, std::vector < Manifest rFoo.writeBytes(bSeq); #endif uno::Reference < io::XInputStream > xStream = pStream->getInputStream(); + pStream->aEntry.nCrc = -1; + pStream->aEntry.nSize = -1; + pStream->aEntry.nCompressedSize = -1; rZipOut.putNextEntry(pStream->aEntry); while (1) {