summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/source/xstor/owriteablestream.cxx2
-rw-r--r--package/source/xstor/xfactory.cxx2
-rw-r--r--package/source/xstor/xstorage.cxx8
-rw-r--r--package/source/zippackage/ZipPackageFolder.cxx17
4 files changed, 18 insertions, 11 deletions
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx
index 2e81c80c4321..be11586bc4fb 100644
--- a/package/source/xstor/owriteablestream.cxx
+++ b/package/source/xstor/owriteablestream.cxx
@@ -3280,7 +3280,7 @@ uno::Any SAL_CALL OWriteStream::getPropertyValue( const ::rtl::OUString& aProp )
if ( ( ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE || m_pData->m_nStorageType == embed::StorageFormats::OFOPXML )
&& aPropertyName.equalsAscii( "MediaType" ) )
- || m_pData->m_nStorageType == embed::StorageFormats::PACKAGE && aPropertyName.equalsAscii( "Encrypted" )
+ || ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE && aPropertyName.equalsAscii( "Encrypted" ) )
|| aPropertyName.equalsAscii( "Compressed" ) )
{
m_pImpl->GetStreamProperties();
diff --git a/package/source/xstor/xfactory.cxx b/package/source/xstor/xfactory.cxx
index 68c393fed08b..12aa89e03db0 100644
--- a/package/source/xstor/xfactory.cxx
+++ b/package/source/xstor/xfactory.cxx
@@ -273,7 +273,7 @@ uno::Reference< uno::XInterface > SAL_CALL OStorageFactory::createInstanceWithAr
}
else if ( xStream.is() )
{
- if ( ( nStorageMode & embed::ElementModes::WRITE ) && !xStream->getOutputStream().is()
+ if ( ( ( nStorageMode & embed::ElementModes::WRITE ) && !xStream->getOutputStream().is() )
|| !xStream->getInputStream().is() )
throw uno::Exception(); // TODO: access denied
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx
index 007f199332c5..9c90c4ce35dd 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -4808,11 +4808,11 @@ void SAL_CALL OStorage::setPropertyValue( const ::rtl::OUString& aPropertyName,
m_pImpl->m_bIsModified = sal_True;
}
}
- else if ( m_pData->m_bIsRoot && ( aPropertyName.equalsAscii( "HasEncryptedEntries" )
+ else if ( ( m_pData->m_bIsRoot && ( aPropertyName.equalsAscii( "HasEncryptedEntries" )
|| aPropertyName.equalsAscii( "HasNonEncryptedEntries" )
|| aPropertyName.equalsAscii( "IsInconsistent" )
|| aPropertyName.equalsAscii( "URL" )
- || aPropertyName.equalsAscii( "RepairPackage" ) )
+ || aPropertyName.equalsAscii( "RepairPackage" ) ) )
|| aPropertyName.equalsAscii( "IsRoot" )
|| aPropertyName.equalsAscii( "MediaTypeFallbackUsed" ) )
throw beans::PropertyVetoException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() );
@@ -4856,8 +4856,8 @@ void SAL_CALL OStorage::setPropertyValue( const ::rtl::OUString& aPropertyName,
else
throw lang::IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >(), 0 );
}
- else if ( m_pData->m_bIsRoot && ( aPropertyName.equalsAscii( "URL" )
- || aPropertyName.equalsAscii( "RepairPackage" ) )
+ else if ( ( m_pData->m_bIsRoot && ( aPropertyName.equalsAscii( "URL" )
+ || aPropertyName.equalsAscii( "RepairPackage" ) ) )
|| aPropertyName.equalsAscii( "IsRoot" ) )
throw beans::PropertyVetoException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() );
else
diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx
index b4648426049e..f0c4a11d22f4 100644
--- a/package/source/zippackage/ZipPackageFolder.cxx
+++ b/package/source/zippackage/ZipPackageFolder.cxx
@@ -776,11 +776,18 @@ Any SAL_CALL ZipPackageFolder::getPropertyValue( const OUString& PropertyName )
void ZipPackageFolder::doInsertByName ( ZipPackageEntry *pEntry, sal_Bool bSetParent )
throw(IllegalArgumentException, ElementExistException, WrappedTargetException, RuntimeException)
{
- if ( pEntry->IsFolder() )
- maContents[pEntry->getName()] = new ContentInfo ( static_cast < ZipPackageFolder *> ( pEntry ) );
- else
- maContents[pEntry->getName()] = new ContentInfo ( static_cast < ZipPackageStream *> ( pEntry ) );
-
+ try
+ {
+ if ( pEntry->IsFolder() )
+ maContents[pEntry->getName()] = new ContentInfo ( static_cast < ZipPackageFolder *> ( pEntry ) );
+ else
+ maContents[pEntry->getName()] = new ContentInfo ( static_cast < ZipPackageStream *> ( pEntry ) );
+ }
+ catch(const uno::Exception& rEx)
+ {
+ (void)rEx;
+ throw;
+ }
if ( bSetParent )
pEntry->setParent ( *this );
}