Namespace ZipUtils for the Inflater / Deflater classes.
This commit is contained in:
@@ -31,13 +31,14 @@
|
|||||||
#include <com/sun/star/uno/Sequence.hxx>
|
#include <com/sun/star/uno/Sequence.hxx>
|
||||||
#include "packagedllapi.hxx"
|
#include "packagedllapi.hxx"
|
||||||
|
|
||||||
extern "C"
|
struct z_stream_s;
|
||||||
{
|
|
||||||
typedef struct z_stream_s z_stream;
|
namespace ZipUtils {
|
||||||
}
|
|
||||||
|
|
||||||
class DLLPUBLIC_PACKAGE Deflater
|
class DLLPUBLIC_PACKAGE Deflater
|
||||||
{
|
{
|
||||||
|
typedef struct z_stream_s z_stream;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
com::sun::star::uno::Sequence< sal_Int8 > sInBuffer;
|
com::sun::star::uno::Sequence< sal_Int8 > sInBuffer;
|
||||||
sal_Bool bFinish;
|
sal_Bool bFinish;
|
||||||
@@ -65,6 +66,8 @@ public:
|
|||||||
void SAL_CALL end( );
|
void SAL_CALL end( );
|
||||||
};
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@@ -31,12 +31,14 @@
|
|||||||
#include <com/sun/star/uno/Sequence.hxx>
|
#include <com/sun/star/uno/Sequence.hxx>
|
||||||
#include "packagedllapi.hxx"
|
#include "packagedllapi.hxx"
|
||||||
|
|
||||||
extern "C"
|
struct z_stream_s;
|
||||||
{
|
|
||||||
typedef struct z_stream_s z_stream;
|
namespace ZipUtils {
|
||||||
}
|
|
||||||
class DLLPUBLIC_PACKAGE Inflater
|
class DLLPUBLIC_PACKAGE Inflater
|
||||||
{
|
{
|
||||||
|
typedef struct z_stream_s z_stream;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
sal_Bool bFinish, bFinished, bSetParams, bNeedDict;
|
sal_Bool bFinish, bFinished, bSetParams, bNeedDict;
|
||||||
sal_Int32 nOffset, nLength, nLastInflateError;
|
sal_Int32 nOffset, nLength, nLastInflateError;
|
||||||
@@ -56,6 +58,8 @@ public:
|
|||||||
sal_Int32 getLastInflateError() { return nLastInflateError; }
|
sal_Int32 getLastInflateError() { return nLastInflateError; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
@@ -66,7 +66,7 @@ protected:
|
|||||||
::rtl::OUString sComment; /* zip file comment */
|
::rtl::OUString sComment; /* zip file comment */
|
||||||
EntryHash aEntries;
|
EntryHash aEntries;
|
||||||
ByteGrabber aGrabber;
|
ByteGrabber aGrabber;
|
||||||
Inflater aInflater;
|
ZipUtils::Inflater aInflater;
|
||||||
com::sun::star::uno::Reference < com::sun::star::io::XInputStream > xStream;
|
com::sun::star::uno::Reference < com::sun::star::io::XInputStream > xStream;
|
||||||
com::sun::star::uno::Reference < com::sun::star::io::XSeekable > xSeek;
|
com::sun::star::uno::Reference < com::sun::star::io::XSeekable > xSeek;
|
||||||
const ::com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > xFactory;
|
const ::com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > xFactory;
|
||||||
|
@@ -49,7 +49,7 @@ protected:
|
|||||||
::std::vector < ZipEntry * > aZipList;
|
::std::vector < ZipEntry * > aZipList;
|
||||||
com::sun::star::uno::Sequence < sal_Int8 > aBuffer, aEncryptionBuffer;
|
com::sun::star::uno::Sequence < sal_Int8 > aBuffer, aEncryptionBuffer;
|
||||||
::rtl::OUString sComment;
|
::rtl::OUString sComment;
|
||||||
Deflater aDeflater;
|
ZipUtils::Deflater aDeflater;
|
||||||
rtlCipher aCipher;
|
rtlCipher aCipher;
|
||||||
rtlDigest aDigest;
|
rtlDigest aDigest;
|
||||||
CRC32 aCRC;
|
CRC32 aCRC;
|
||||||
|
@@ -41,6 +41,7 @@
|
|||||||
|
|
||||||
using namespace com::sun::star::packages::zip::ZipConstants;
|
using namespace com::sun::star::packages::zip::ZipConstants;
|
||||||
using namespace com::sun::star;
|
using namespace com::sun::star;
|
||||||
|
using namespace ZipUtils;
|
||||||
|
|
||||||
/** Provides general purpose compression using the ZLIB compression
|
/** Provides general purpose compression using the ZLIB compression
|
||||||
* library.
|
* library.
|
||||||
|
@@ -39,6 +39,7 @@
|
|||||||
#include <string.h> // for memset
|
#include <string.h> // for memset
|
||||||
|
|
||||||
using namespace com::sun::star::uno;
|
using namespace com::sun::star::uno;
|
||||||
|
using namespace ZipUtils;
|
||||||
|
|
||||||
/** Provides general purpose decompression using the ZLIB library */
|
/** Provides general purpose decompression using the ZLIB library */
|
||||||
|
|
||||||
|
@@ -59,7 +59,7 @@ protected:
|
|||||||
ZipEntry maEntry;
|
ZipEntry maEntry;
|
||||||
rtl::Reference < EncryptionData > mxData;
|
rtl::Reference < EncryptionData > mxData;
|
||||||
rtlCipher maCipher;
|
rtlCipher maCipher;
|
||||||
Inflater maInflater;
|
ZipUtils::Inflater maInflater;
|
||||||
sal_Bool mbRawStream, mbWrappedRaw, mbFinished;
|
sal_Bool mbRawStream, mbWrappedRaw, mbFinished;
|
||||||
sal_Int16 mnHeaderToRead;
|
sal_Int16 mnHeaderToRead;
|
||||||
sal_Int64 mnZipCurrent, mnZipEnd, mnZipSize, mnMyCurrent;
|
sal_Int64 mnZipCurrent, mnZipEnd, mnZipSize, mnMyCurrent;
|
||||||
|
@@ -62,6 +62,7 @@ using namespace com::sun::star::packages::zip;
|
|||||||
using namespace com::sun::star::packages::zip::ZipConstants;
|
using namespace com::sun::star::packages::zip::ZipConstants;
|
||||||
|
|
||||||
using rtl::OUString;
|
using rtl::OUString;
|
||||||
|
using ZipUtils::Inflater;
|
||||||
|
|
||||||
/** This class is used to read entries from a zip file
|
/** This class is used to read entries from a zip file
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user