diff options
author | Martin Gallwey <mtg@openoffice.org> | 2001-05-16 15:23:48 +0000 |
---|---|---|
committer | Martin Gallwey <mtg@openoffice.org> | 2001-05-16 15:23:48 +0000 |
commit | 0f928c494cab095d55c4e67b43432847868fb774 (patch) | |
tree | f3846ad969f52ad526ae5a4cd19a3a52e4d381fa /package | |
parent | 3801b870562990212730c14dab08c5e9e0e4e697 (diff) |
#86409# Add parantheses to clarify when exceptions should be thrown
Diffstat (limited to 'package')
-rw-r--r-- | package/source/zippackage/ZipPackage.cxx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index 579997264843..aac37918bfac 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ZipPackage.cxx,v $ * - * $Revision: 1.43 $ + * $Revision: 1.44 $ * - * last change: $Author: mtg $ $Date: 2001-05-15 15:18:49 $ + * last change: $Author: mtg $ $Date: 2001-05-16 16:23:48 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -755,11 +755,13 @@ Reference< XPropertySetInfo > SAL_CALL ZipPackage::getPropertySetInfo( ) void SAL_CALL ZipPackage::setPropertyValue( const OUString& aPropertyName, const Any& aValue ) throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException, RuntimeException) { - if (aPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("EncryptionKey") ) ) + if (aPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HasEncryptedEntries") ) ) + throw IllegalArgumentException (); // This property is read-only + else if (aPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("EncryptionKey") ) ) + { if (!( aValue >>= aEncryptionKey ) ) throw IllegalArgumentException(); - else if (aPropertyName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HasEncryptedEntries") ) ) - throw IllegalArgumentException (); // This property is read-only + } else throw UnknownPropertyException(); } @@ -777,8 +779,7 @@ Any SAL_CALL ZipPackage::getPropertyValue( const OUString& PropertyName ) aAny <<= bHasEncryptedEntries; return aAny; } - else - throw UnknownPropertyException(); + throw UnknownPropertyException(); } void SAL_CALL ZipPackage::addPropertyChangeListener( const OUString& aPropertyName, const Reference< XPropertyChangeListener >& xListener ) throw(UnknownPropertyException, WrappedTargetException, RuntimeException) |