diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-10-21 10:37:02 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-11-17 10:49:22 +0100 |
commit | db5552631b13e5a1d330929cd5093bd0f9894ec8 (patch) | |
tree | 869afbb9d5a9f52919058ac2f22b4b1955cb7cfc /package/inc | |
parent | 30f80f12fb1db4c9c6f19fcfda4e796891b6e03c (diff) |
package: Call writeLOC always after putNextEntry explicitly
Preparation step to parallel deflating.
Rename putNextEntry to setEntry and make it a static function.
We need to call setEntry before starting thread but writeLOC after.
Change-Id: I99a9ffa7dc4c18b47c621847b48bf8469bfb789a
Diffstat (limited to 'package/inc')
-rw-r--r-- | package/inc/ZipOutputStream.hxx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/package/inc/ZipOutputStream.hxx b/package/inc/ZipOutputStream.hxx index 2d78eb78c567..f11b8833d146 100644 --- a/package/inc/ZipOutputStream.hxx +++ b/package/inc/ZipOutputStream.hxx @@ -37,33 +37,30 @@ class ZipOutputStream ByteChucker m_aChucker; bool m_bFinished; ZipEntry *m_pCurrentEntry; - bool m_bEncrypt; public: ZipOutputStream( const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > &xOStream ); ~ZipOutputStream(); - // rawWrite to support a direct write to the output stream + void writeLOC( ZipEntry *pEntry, bool bEncrypt = false ) + throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); void rawWrite( ::com::sun::star::uno::Sequence< sal_Int8 >& rBuffer, sal_Int32 nNewOffset, sal_Int32 nNewLength ) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); - void rawCloseEntry() + void rawCloseEntry( bool bEncrypt = false ) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); - void putNextEntry( ZipEntry& rEntry, bool bEncrypt = false ) - throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); void finish() throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); static sal_uInt32 getCurrentDosTime(); + static void setEntry( ZipEntry *pEntry ); private: void writeEND(sal_uInt32 nOffset, sal_uInt32 nLength) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); void writeCEN( const ZipEntry &rEntry ) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); - sal_Int32 writeLOC( const ZipEntry &rEntry ) - throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); void writeEXT( const ZipEntry &rEntry ) throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException); }; |