INTEGRATION: CWS mav18 (1.97.10); FILE MERGED
2005/06/07 15:51:11 mav 1.97.10.2: RESYNC: (1.97-1.98); FILE MERGED 2005/05/27 14:52:20 mav 1.97.10.1: #i49755# fix incoplete commit problem
This commit is contained in:
parent
a1323b2dca
commit
fc00485608
1 changed files with 14 additions and 8 deletions
|
@ -2,9 +2,9 @@
|
||||||
*
|
*
|
||||||
* $RCSfile: ZipPackage.cxx,v $
|
* $RCSfile: ZipPackage.cxx,v $
|
||||||
*
|
*
|
||||||
* $Revision: 1.98 $
|
* $Revision: 1.99 $
|
||||||
*
|
*
|
||||||
* last change: $Author: obo $ $Date: 2005-05-03 13:56:10 $
|
* last change: $Author: kz $ $Date: 2005-07-12 12:30:54 $
|
||||||
*
|
*
|
||||||
* 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
|
||||||
|
@ -312,10 +312,11 @@ ZipPackage::ZipPackage (const Reference < XMultiServiceFactory > &xNewFactory)
|
||||||
, bUseManifest ( sal_True )
|
, bUseManifest ( sal_True )
|
||||||
, m_bMediaTypeFallbackUsed ( sal_False )
|
, m_bMediaTypeFallbackUsed ( sal_False )
|
||||||
, m_bPackageFormat( sal_True )
|
, m_bPackageFormat( sal_True )
|
||||||
|
, m_bAllowRemoveOnInsert( sal_True )
|
||||||
, bForceRecovery ( sal_False )
|
, bForceRecovery ( sal_False )
|
||||||
, eMode ( e_IMode_None )
|
, eMode ( e_IMode_None )
|
||||||
{
|
{
|
||||||
xRootFolder = pRootFolder = new ZipPackageFolder( xFactory, m_bPackageFormat );
|
xRootFolder = pRootFolder = new ZipPackageFolder( xFactory, m_bPackageFormat, m_bAllowRemoveOnInsert );
|
||||||
}
|
}
|
||||||
|
|
||||||
ZipPackage::~ZipPackage( void )
|
ZipPackage::~ZipPackage( void )
|
||||||
|
@ -374,7 +375,7 @@ void ZipPackage::getZipFileContents()
|
||||||
break;
|
break;
|
||||||
if ( !pCurrent->hasByName( sTemp ) )
|
if ( !pCurrent->hasByName( sTemp ) )
|
||||||
{
|
{
|
||||||
pPkgFolder = new ZipPackageFolder( xFactory, m_bPackageFormat );
|
pPkgFolder = new ZipPackageFolder( xFactory, m_bPackageFormat, m_bAllowRemoveOnInsert );
|
||||||
pPkgFolder->setName( sTemp );
|
pPkgFolder->setName( sTemp );
|
||||||
pPkgFolder->doSetParent( pCurrent, sal_True );
|
pPkgFolder->doSetParent( pCurrent, sal_True );
|
||||||
pCurrent = pPkgFolder;
|
pCurrent = pPkgFolder;
|
||||||
|
@ -390,7 +391,7 @@ void ZipPackage::getZipFileContents()
|
||||||
{
|
{
|
||||||
nStreamIndex++;
|
nStreamIndex++;
|
||||||
sTemp = rName.copy( nStreamIndex, rName.getLength() - nStreamIndex);
|
sTemp = rName.copy( nStreamIndex, rName.getLength() - nStreamIndex);
|
||||||
pPkgStream = new ZipPackageStream( *this, xFactory );
|
pPkgStream = new ZipPackageStream( *this, xFactory, m_bAllowRemoveOnInsert );
|
||||||
pPkgStream->SetPackageMember( sal_True );
|
pPkgStream->SetPackageMember( sal_True );
|
||||||
pPkgStream->setZipEntry( rEntry );
|
pPkgStream->setZipEntry( rEntry );
|
||||||
pPkgStream->setName( sTemp );
|
pPkgStream->setName( sTemp );
|
||||||
|
@ -650,6 +651,11 @@ void SAL_CALL ZipPackage::initialize( const Sequence< Any >& aArguments )
|
||||||
aNamedValue.Value >>= m_bPackageFormat;
|
aNamedValue.Value >>= m_bPackageFormat;
|
||||||
pRootFolder->setPackageFormat_Impl( m_bPackageFormat );
|
pRootFolder->setPackageFormat_Impl( m_bPackageFormat );
|
||||||
}
|
}
|
||||||
|
else if ( aNamedValue.Name.equalsAscii( "AllowRemoveOnInsert" ) )
|
||||||
|
{
|
||||||
|
aNamedValue.Value >>= m_bAllowRemoveOnInsert;
|
||||||
|
pRootFolder->setRemoveOnInsertMode_Impl( m_bAllowRemoveOnInsert );
|
||||||
|
}
|
||||||
|
|
||||||
// for now the progress handler is not used, probably it will never be
|
// for now the progress handler is not used, probably it will never be
|
||||||
// if ( aNamedValue.Name.equalsAscii( "ProgressHandler" )
|
// if ( aNamedValue.Name.equalsAscii( "ProgressHandler" )
|
||||||
|
@ -886,7 +892,7 @@ sal_Bool SAL_CALL ZipPackage::hasByHierarchicalName( const OUString& aName )
|
||||||
Reference< XInterface > SAL_CALL ZipPackage::createInstance( )
|
Reference< XInterface > SAL_CALL ZipPackage::createInstance( )
|
||||||
throw(Exception, RuntimeException)
|
throw(Exception, RuntimeException)
|
||||||
{
|
{
|
||||||
Reference < XInterface > xRef = *(new ZipPackageStream ( *this, xFactory ));
|
Reference < XInterface > xRef = *(new ZipPackageStream ( *this, xFactory, m_bAllowRemoveOnInsert ));
|
||||||
return xRef;
|
return xRef;
|
||||||
}
|
}
|
||||||
Reference< XInterface > SAL_CALL ZipPackage::createInstanceWithArguments( const Sequence< Any >& aArguments )
|
Reference< XInterface > SAL_CALL ZipPackage::createInstanceWithArguments( const Sequence< Any >& aArguments )
|
||||||
|
@ -897,9 +903,9 @@ Reference< XInterface > SAL_CALL ZipPackage::createInstanceWithArguments( const
|
||||||
if ( aArguments.getLength() )
|
if ( aArguments.getLength() )
|
||||||
aArguments[0] >>= bArg;
|
aArguments[0] >>= bArg;
|
||||||
if (bArg)
|
if (bArg)
|
||||||
xRef = *new ZipPackageFolder ( xFactory, m_bPackageFormat );
|
xRef = *new ZipPackageFolder ( xFactory, m_bPackageFormat, m_bAllowRemoveOnInsert );
|
||||||
else
|
else
|
||||||
xRef = *new ZipPackageStream ( *this, xFactory );
|
xRef = *new ZipPackageStream ( *this, xFactory, m_bAllowRemoveOnInsert );
|
||||||
|
|
||||||
return xRef;
|
return xRef;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue