summaryrefslogtreecommitdiff
path: root/package/inc
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2003-03-26 13:16:07 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2003-03-26 13:16:07 +0000
commitfa66eeb587f11bea88ab5950ffd94aee221d6b31 (patch)
treefcf83a2077cad967959ca83f04613be41b1f9ff3 /package/inc
parentcaa2a9eb27f7e266bc844a3ad215ec35bd804b1a (diff)
MWS_SRX644: migrate branch mws_srx644 -> HEAD
Diffstat (limited to 'package/inc')
-rw-r--r--package/inc/ZipEntry.hxx6
-rw-r--r--package/inc/ZipFile.hxx28
-rw-r--r--package/inc/ZipPackage.hxx5
3 files changed, 32 insertions, 7 deletions
diff --git a/package/inc/ZipEntry.hxx b/package/inc/ZipEntry.hxx
index d181105f9108..5aa7b9bb626d 100644
--- a/package/inc/ZipEntry.hxx
+++ b/package/inc/ZipEntry.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ZipEntry.hxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: mtg $ $Date: 2001-10-30 13:53:22 $
+ * last change: $Author: hr $ $Date: 2003-03-26 14:13:41 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -75,6 +75,8 @@ struct ZipEntry
sal_Int32 nCompressedSize;
sal_Int32 nSize;
sal_Int32 nOffset;
+ sal_Int16 nNameLen;
+ sal_Int16 nExtraLen;
::rtl::OUString sName;
};
#endif
diff --git a/package/inc/ZipFile.hxx b/package/inc/ZipFile.hxx
index de09b30aae03..edc6ad166a0d 100644
--- a/package/inc/ZipFile.hxx
+++ b/package/inc/ZipFile.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ZipFile.hxx,v $
*
- * $Revision: 1.17 $
+ * $Revision: 1.18 $
*
- * last change: $Author: mtg $ $Date: 2001-12-04 17:44:39 $
+ * last change: $Author: hr $ $Date: 2003-03-26 14:13:41 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -76,6 +76,7 @@
namespace com { namespace sun { namespace star {
namespace lang { class XMultiServiceFactory; }
+ namespace ucb { class XProgressHandler; }
} } }
namespace vos
{
@@ -104,6 +105,7 @@ protected:
com::sun::star::uno::Reference < com::sun::star::io::XInputStream > xStream;
com::sun::star::uno::Reference < com::sun::star::io::XSeekable > xSeek;
const ::com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > xFactory;
+ ::com::sun::star::uno::Reference < ::com::sun::star::ucb::XProgressHandler > xProgressHandler;
com::sun::star::uno::Reference < com::sun::star::io::XInputStream > createMemoryStream(
ZipEntry & rEntry,
@@ -124,10 +126,27 @@ protected:
sal_Bool bDecrypt );
sal_Bool hasValidPassword ( ZipEntry & rEntry, const vos::ORef < EncryptionData > &rData );
+
+ sal_Bool checkSizeAndCRC( const ZipEntry& aEntry );
+
+ sal_Int32 getCRC( sal_Int32 nOffset, sal_Int32 nSize );
+
+ void getSizeAndCRC( sal_Int32 nOffset, sal_Int32 nCompressedSize, sal_Int32 *nSize, sal_Int32 *nCRC );
+
public:
+
ZipFile( com::sun::star::uno::Reference < com::sun::star::io::XInputStream > &xInput,
const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > &xNewFactory,
- sal_Bool bInitialise)
+ sal_Bool bInitialise
+ )
+ throw(::com::sun::star::io::IOException, com::sun::star::packages::zip::ZipException, com::sun::star::uno::RuntimeException);
+
+ ZipFile( com::sun::star::uno::Reference < com::sun::star::io::XInputStream > &xInput,
+ const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > &xNewFactory,
+ sal_Bool bInitialise,
+ sal_Bool bForceRecover,
+ ::com::sun::star::uno::Reference < ::com::sun::star::ucb::XProgressHandler > xProgress
+ )
throw(::com::sun::star::io::IOException, com::sun::star::packages::zip::ZipException, com::sun::star::uno::RuntimeException);
~ZipFile();
@@ -161,6 +180,9 @@ protected:
throw(::com::sun::star::io::IOException, com::sun::star::packages::zip::ZipException, com::sun::star::uno::RuntimeException);
sal_Int32 findEND()
throw(::com::sun::star::io::IOException, com::sun::star::packages::zip::ZipException, com::sun::star::uno::RuntimeException);
+ sal_Int32 recover()
+ throw(::com::sun::star::io::IOException, com::sun::star::packages::zip::ZipException, com::sun::star::uno::RuntimeException);
+
};
#endif
diff --git a/package/inc/ZipPackage.hxx b/package/inc/ZipPackage.hxx
index 25161b3df069..eb60e7c60e7b 100644
--- a/package/inc/ZipPackage.hxx
+++ b/package/inc/ZipPackage.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ZipPackage.hxx,v $
*
- * $Revision: 1.33 $
+ * $Revision: 1.34 $
*
- * last change: $Author: cl $ $Date: 2002-09-25 09:49:05 $
+ * last change: $Author: hr $ $Date: 2003-03-26 14:13:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -137,6 +137,7 @@ protected:
::rtl::OUString sURL;
sal_Bool bHasEncryptedEntries;
sal_Bool bUseManifest;
+ sal_Bool bForceRecovery;
InitialisationMode eMode;
::com::sun::star::uno::Reference < com::sun::star::container::XNameContainer > xRootFolder;