diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-03 08:39:03 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-05-04 12:39:40 +0200 |
commit | 58a32075ca4f457f570af75aef368dd6c389aca7 (patch) | |
tree | e437dcbdeb248b4316cb8a9281d1543419853f6d /package/source/zippackage/ZipPackageStream.cxx | |
parent | 7d47700972d267fe7c5270c5dadd45a523a2baec (diff) |
use Any constructor instead of temporaries
Change-Id: Iffb82a2cee1a28d89eeea2b905aaa14086ee475a
Diffstat (limited to 'package/source/zippackage/ZipPackageStream.cxx')
-rw-r--r-- | package/source/zippackage/ZipPackageStream.cxx | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx index 8ecb31fbc551..79c42b11be43 100644 --- a/package/source/zippackage/ZipPackageStream.cxx +++ b/package/source/zippackage/ZipPackageStream.cxx @@ -1339,41 +1339,33 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName, Any SAL_CALL ZipPackageStream::getPropertyValue( const OUString& PropertyName ) throw( beans::UnknownPropertyException, WrappedTargetException, RuntimeException, std::exception ) { - Any aAny; if ( PropertyName == "MediaType" ) { - aAny <<= msMediaType; - return aAny; + return Any(msMediaType); } else if ( PropertyName == "Size" ) { - aAny <<= aEntry.nSize; - return aAny; + return Any(aEntry.nSize); } else if ( PropertyName == "Encrypted" ) { - aAny <<= ((m_nStreamMode == PACKAGE_STREAM_RAW) || m_bToBeEncrypted); - return aAny; + return Any((m_nStreamMode == PACKAGE_STREAM_RAW) || m_bToBeEncrypted); } else if ( PropertyName == "WasEncrypted" ) { - aAny <<= m_bIsEncrypted; - return aAny; + return Any(m_bIsEncrypted); } else if ( PropertyName == "Compressed" ) { - aAny <<= m_bToBeCompressed; - return aAny; + return Any(m_bToBeCompressed); } else if ( PropertyName == ENCRYPTION_KEY_PROPERTY ) { - aAny <<= m_aEncryptionKey; - return aAny; + return Any(m_aEncryptionKey); } else if ( PropertyName == STORAGE_ENCRYPTION_KEYS_PROPERTY ) { - aAny <<= m_aStorageEncryptionKeys; - return aAny; + return Any(m_aStorageEncryptionKeys); } else throw beans::UnknownPropertyException(THROW_WHERE ); |