Kaydet (Commit) 67880a55 authored tarafından Oliver Bolte's avatar Oliver Bolte

INTEGRATION: CWS mav17 (1.41.84); FILE MERGED

2005/03/01 10:02:52 mav 1.41.84.1: #i23531# improve document repairing
üst 662dae05
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
* *
* $RCSfile: ZipFile.cxx,v $ * $RCSfile: ZipFile.cxx,v $
* *
* $Revision: 1.41 $ * $Revision: 1.42 $
* *
* last change: $Author: hr $ $Date: 2004-02-04 12:28:06 $ * last change: $Author: obo $ $Date: 2005-03-15 11:50:19 $
* *
* The Contents of this file are made available subject to the terms of * The Contents of this file are made available subject to the terms of
* either of the following licenses * either of the following licenses
...@@ -131,6 +131,7 @@ ZipFile::ZipFile( Reference < XInputStream > &xInput, const Reference < XMultiSe ...@@ -131,6 +131,7 @@ ZipFile::ZipFile( Reference < XInputStream > &xInput, const Reference < XMultiSe
, aGrabber(xInput) , aGrabber(xInput)
, aInflater (sal_True) , aInflater (sal_True)
, xFactory ( xNewFactory ) , xFactory ( xNewFactory )
, bRecoveryMode( sal_False )
{ {
if (bInitialise) if (bInitialise)
{ {
...@@ -152,6 +153,7 @@ ZipFile::ZipFile( Reference < XInputStream > &xInput, const Reference < XMultiSe ...@@ -152,6 +153,7 @@ ZipFile::ZipFile( Reference < XInputStream > &xInput, const Reference < XMultiSe
, aInflater (sal_True) , aInflater (sal_True)
, xFactory ( xNewFactory ) , xFactory ( xNewFactory )
, xProgressHandler( xProgress ) , xProgressHandler( xProgress )
, bRecoveryMode( bForceRecovery )
{ {
if (bInitialise) if (bInitialise)
{ {
...@@ -543,7 +545,7 @@ Reference < XInputStream > ZipFile::createUnbufferedStream( ...@@ -543,7 +545,7 @@ Reference < XInputStream > ZipFile::createUnbufferedStream(
sal_Bool bIsEncrypted, sal_Bool bIsEncrypted,
::rtl::OUString aMediaType ) ::rtl::OUString aMediaType )
{ {
return new XUnbufferedStream ( rEntry, xStream, rData, nStreamMode, bIsEncrypted, aMediaType ); return new XUnbufferedStream ( rEntry, xStream, rData, nStreamMode, bIsEncrypted, aMediaType, bRecoveryMode );
} }
...@@ -665,7 +667,7 @@ sal_Bool ZipFile::readLOC( ZipEntry &rEntry ) ...@@ -665,7 +667,7 @@ sal_Bool ZipFile::readLOC( ZipEntry &rEntry )
aGrabber >> nTestSig; aGrabber >> nTestSig;
if (nTestSig != LOCSIG) if (nTestSig != LOCSIG)
throw ZipException( OUString( RTL_CONSTASCII_USTRINGPARAM ( "Invalid LOC header (bad signature") ), Reference < XInterface > () ); throw ZipIOException( OUString( RTL_CONSTASCII_USTRINGPARAM ( "Invalid LOC header (bad signature") ), Reference < XInterface > () );
aGrabber >> nVersion; aGrabber >> nVersion;
aGrabber >> nFlag; aGrabber >> nFlag;
aGrabber >> nHow; aGrabber >> nHow;
...@@ -686,8 +688,8 @@ sal_Bool ZipFile::readLOC( ZipEntry &rEntry ) ...@@ -686,8 +688,8 @@ sal_Bool ZipFile::readLOC( ZipEntry &rEntry )
|| rEntry.nTime != nTime || rEntry.nTime != nTime
|| rEntry.nNameLen != nNameLen; || rEntry.nNameLen != nNameLen;
if ( bBroken ) if ( bBroken && !bRecoveryMode )
throw ZipException( OUString( RTL_CONSTASCII_USTRINGPARAM( "The stream seems to be broken!" ) ), throw ZipIOException( OUString( RTL_CONSTASCII_USTRINGPARAM( "The stream seems to be broken!" ) ),
Reference< XInterface >() ); Reference< XInterface >() );
return sal_True; return sal_True;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment