diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2012-08-17 22:06:10 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2012-08-17 22:07:30 +0200 |
commit | 2cbdaf677c0a1e88aa582c6a17b496dff61a78b0 (patch) | |
tree | 34ec2e77730c39dd055f901e589c8a975e95e6ab /package/source/zippackage/ZipPackageStream.cxx | |
parent | e704e4691186c23e52490817d6b710ef5bf68db6 (diff) |
package: no more RTL_CONSTASCII_USTRINGPARAM in zippackage
Change-Id: Ibd1fd59ed87ffc70f6b66290c48f95f6c3615102
Diffstat (limited to 'package/source/zippackage/ZipPackageStream.cxx')
-rw-r--r-- | package/source/zippackage/ZipPackageStream.cxx | 103 |
1 files changed, 51 insertions, 52 deletions
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx index d0e63fbda425..a8029ff9ec72 100644 --- a/package/source/zippackage/ZipPackageStream.cxx +++ b/package/source/zippackage/ZipPackageStream.cxx @@ -51,7 +51,6 @@ using namespace com::sun::star::lang; using namespace com::sun::star; using namespace cppu; -using rtl::OUString; namespace { struct lcl_CachedImplId : public rtl::Static< Sequence < sal_Int8 >, lcl_CachedImplId > {}; } const ::com::sun::star::uno::Sequence < sal_Int8 >& ZipPackageStream::static_getImplementationId() @@ -146,7 +145,7 @@ uno::Reference< io::XInputStream > ZipPackageStream::GetOwnSeekStream() xStream = ::comphelper::OSeekableInputWrapper::CheckSeekableCanWrap( xStream, m_xFactory ); uno::Reference< io::XSeekable > xSeek( xStream, UNO_QUERY ); if ( !xSeek.is() ) - throw RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "The stream must support XSeekable!" ) ), + throw RuntimeException( OSL_LOG_PREFIX "The stream must support XSeekable!", uno::Reference< XInterface >() ); m_bHasSeekable = sal_True; @@ -159,15 +158,15 @@ uno::Reference< io::XInputStream > ZipPackageStream::GetOwnSeekStream() uno::Reference< io::XInputStream > ZipPackageStream::GetRawEncrStreamNoHeaderCopy() { if ( m_nStreamMode != PACKAGE_STREAM_RAW || !GetOwnSeekStream().is() ) - throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw io::IOException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); if ( m_xBaseEncryptionData.is() ) - throw ZipIOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Encrypted stream without encryption data!\n" ) ), + throw ZipIOException(OSL_LOG_PREFIX "Encrypted stream without encryption data!\n", uno::Reference< XInterface >() ); uno::Reference< io::XSeekable > xSeek( GetOwnSeekStream(), UNO_QUERY ); if ( !xSeek.is() ) - throw ZipIOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "The stream must be seekable!\n" ) ), + throw ZipIOException(OSL_LOG_PREFIX "The stream must be seekable!\n", uno::Reference< XInterface >() ); // skip header @@ -176,12 +175,12 @@ uno::Reference< io::XInputStream > ZipPackageStream::GetRawEncrStreamNoHeaderCop // create temporary stream uno::Reference < io::XOutputStream > xTempOut( - m_xFactory->createInstance( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.TempFile" ) ) ), + m_xFactory->createInstance("com.sun.star.io.TempFile"), uno::UNO_QUERY ); uno::Reference < io::XInputStream > xTempIn( xTempOut, UNO_QUERY ); uno::Reference < io::XSeekable > xTempSeek( xTempOut, UNO_QUERY ); if ( !xTempOut.is() || !xTempIn.is() || !xTempSeek.is() ) - throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw io::IOException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // copy the raw stream to the temporary file starting from the current position ::comphelper::OStorageHelper::CopyInputToOutput( GetOwnSeekStream(), xTempOut ); @@ -228,7 +227,7 @@ uno::Sequence< sal_Int8 > ZipPackageStream::GetEncryptionKey( bool bUseWinEncodi if ( bHaveOwnKey && m_aStorageEncryptionKeys.getLength() ) { - ::rtl::OUString aNameToFind; + OUString aNameToFind; if ( nKeyGenID == xml::crypto::DigestID::SHA256 ) aNameToFind = PACKAGE_ENCRYPTIONDATA_SHA256UTF8; else if ( nKeyGenID == xml::crypto::DigestID::SHA1 ) @@ -236,7 +235,7 @@ uno::Sequence< sal_Int8 > ZipPackageStream::GetEncryptionKey( bool bUseWinEncodi aNameToFind = bUseWinEncoding ? PACKAGE_ENCRYPTIONDATA_SHA1MS1252 : PACKAGE_ENCRYPTIONDATA_SHA1UTF8; } else - throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "No expected key is provided!" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException(OSL_LOG_PREFIX "No expected key is provided!", uno::Reference< uno::XInterface >() ); for ( sal_Int32 nInd = 0; nInd < m_aStorageEncryptionKeys.getLength(); nInd++ ) if ( m_aStorageEncryptionKeys[nInd].Name.equals( aNameToFind ) ) @@ -245,7 +244,7 @@ uno::Sequence< sal_Int8 > ZipPackageStream::GetEncryptionKey( bool bUseWinEncodi // empty keys are not allowed here // so it is not important whether there is no key, or the key is empty, it is an error if ( !aResult.getLength() ) - throw uno::RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "No expected key is provided!" ) ), uno::Reference< uno::XInterface >() ); + throw uno::RuntimeException(OSL_LOG_PREFIX "No expected key is provided!", uno::Reference< uno::XInterface >() ); } else aResult = m_aEncryptionKey; @@ -268,7 +267,7 @@ sal_Int32 ZipPackageStream::GetStartKeyGenID() uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream( sal_Bool bAddHeaderForEncr ) { if ( m_nStreamMode != PACKAGE_STREAM_DATA || !GetOwnSeekStream().is() || ( bAddHeaderForEncr && !bToBeEncrypted ) ) - throw packages::NoEncryptionException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw packages::NoEncryptionException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); Sequence< sal_Int8 > aKey; @@ -276,23 +275,23 @@ uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream( { aKey = GetEncryptionKey(); if ( !aKey.getLength() ) - throw packages::NoEncryptionException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw packages::NoEncryptionException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); } try { // create temporary file uno::Reference < io::XStream > xTempStream( - m_xFactory->createInstance ( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.TempFile" ) ) ), + m_xFactory->createInstance ("com.sun.star.io.TempFile"), uno::UNO_QUERY ); if ( !xTempStream.is() ) - throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw io::IOException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // create a package based on it ZipPackage* pPackage = new ZipPackage( m_xFactory ); uno::Reference< XSingleServiceFactory > xPackageAsFactory( static_cast< XSingleServiceFactory* >( pPackage ) ); if ( !xPackageAsFactory.is() ) - throw RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw RuntimeException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); Sequence< Any > aArgs( 1 ); aArgs[0] <<= xTempStream; @@ -301,34 +300,34 @@ uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream( // create a new package stream uno::Reference< XDataSinkEncrSupport > xNewPackStream( xPackageAsFactory->createInstance(), UNO_QUERY ); if ( !xNewPackStream.is() ) - throw RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw RuntimeException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); xNewPackStream->setDataStream( static_cast< io::XInputStream* >( new WrapStreamForShare( GetOwnSeekStream(), rZipPackage.GetSharedMutexRef() ) ) ); uno::Reference< XPropertySet > xNewPSProps( xNewPackStream, UNO_QUERY ); if ( !xNewPSProps.is() ) - throw RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw RuntimeException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // copy all the properties of this stream to the new stream - xNewPSProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "MediaType" ) ), makeAny( sMediaType ) ); - xNewPSProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Compressed" ) ), makeAny( bToBeCompressed ) ); + xNewPSProps->setPropertyValue("MediaType", makeAny( sMediaType ) ); + xNewPSProps->setPropertyValue("Compressed", makeAny( bToBeCompressed ) ); if ( bToBeEncrypted ) { - xNewPSProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ENCRYPTION_KEY_PROPERTY ) ), makeAny( aKey ) ); - xNewPSProps->setPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Encrypted" ) ), makeAny( sal_True ) ); + xNewPSProps->setPropertyValue(ENCRYPTION_KEY_PROPERTY, makeAny( aKey ) ); + xNewPSProps->setPropertyValue("Encrypted", makeAny( sal_True ) ); } // insert a new stream in the package uno::Reference< XUnoTunnel > xTunnel; - Any aRoot = pPackage->getByHierarchicalName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ) ) ); + Any aRoot = pPackage->getByHierarchicalName("/"); aRoot >>= xTunnel; uno::Reference< container::XNameContainer > xRootNameContainer( xTunnel, UNO_QUERY ); if ( !xRootNameContainer.is() ) - throw RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw RuntimeException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); uno::Reference< XUnoTunnel > xNPSTunnel( xNewPackStream, UNO_QUERY ); - xRootNameContainer->insertByName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "dummy" ) ), makeAny( xNPSTunnel ) ); + xRootNameContainer->insertByName("dummy", makeAny( xNPSTunnel ) ); // commit the temporary package pPackage->commitChanges(); @@ -342,12 +341,12 @@ uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream( // create another temporary file uno::Reference < io::XOutputStream > xTempOut( - m_xFactory->createInstance ( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.io.TempFile" ) ) ), + m_xFactory->createInstance ("com.sun.star.io.TempFile"), uno::UNO_QUERY ); uno::Reference < io::XInputStream > xTempIn( xTempOut, UNO_QUERY ); uno::Reference < io::XSeekable > xTempSeek( xTempOut, UNO_QUERY ); if ( !xTempOut.is() || !xTempIn.is() || !xTempSeek.is() ) - throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw io::IOException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); // copy the raw stream to the temporary file ::comphelper::OStorageHelper::CopyInputToOutput( xInRaw, xTempOut ); @@ -373,7 +372,7 @@ uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream( { } - throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw io::IOException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); } //-------------------------------------------------------------------------- @@ -404,7 +403,7 @@ sal_Bool ZipPackageStream::ParsePackageRawStream() // this is one of our god-awful, but extremely devious hacks, everyone cheer xTempEncrData = new BaseEncryptionData; - ::rtl::OUString aMediaType; + OUString aMediaType; sal_Int32 nEncAlgorithm = 0; sal_Int32 nChecksumAlgorithm = 0; sal_Int32 nDerivedKeySize = 0; @@ -546,7 +545,7 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getDataStream() // this method can not be used together with old approach if ( m_nStreamMode == PACKAGE_STREAM_DETECT ) - throw packages::zip::ZipIOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw packages::zip::ZipIOException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); if ( IsPackageMember() ) { @@ -590,12 +589,12 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getRawStream() // this method can not be used together with old approach if ( m_nStreamMode == PACKAGE_STREAM_DETECT ) - throw packages::zip::ZipIOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw packages::zip::ZipIOException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); if ( IsPackageMember() ) { if ( !bIsEncrypted || !GetEncryptionData().is() ) - throw packages::NoEncryptionException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw packages::NoEncryptionException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); return rZipPackage.getZipFile().getWrappedRawStream( aEntry, GetEncryptionData(), sMediaType, rZipPackage.GetSharedMutexRef() ); } @@ -609,7 +608,7 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getRawStream() return TryToGetRawFromDataStream( sal_True ); } - throw packages::NoEncryptionException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw packages::NoEncryptionException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); } @@ -633,7 +632,7 @@ void SAL_CALL ZipPackageStream::setRawStream( const uno::Reference< io::XInputSt uno::Reference< io::XInputStream > xNewStream = ::comphelper::OSeekableInputWrapper::CheckSeekableCanWrap( aStream, m_xFactory ); uno::Reference< io::XSeekable > xSeek( xNewStream, UNO_QUERY ); if ( !xSeek.is() ) - throw RuntimeException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "The stream must support XSeekable!" ) ), + throw RuntimeException(OSL_LOG_PREFIX "The stream must support XSeekable!", uno::Reference< XInterface >() ); xSeek->seek( 0 ); @@ -642,7 +641,7 @@ void SAL_CALL ZipPackageStream::setRawStream( const uno::Reference< io::XInputSt if ( !ParsePackageRawStream() ) { xStream = xOldStream; - throw packages::NoRawFormatException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw packages::NoRawFormatException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); } // the raw stream MUST have seekable access @@ -664,7 +663,7 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getPlainRawStream( // this method can not be used together with old approach if ( m_nStreamMode == PACKAGE_STREAM_DETECT ) - throw packages::zip::ZipIOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw packages::zip::ZipIOException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); if ( IsPackageMember() ) { @@ -705,7 +704,7 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName, if ( aPropertyName == "MediaType" ) { if ( rZipPackage.getFormat() != embed::StorageFormats::PACKAGE && rZipPackage.getFormat() != embed::StorageFormats::OFOPXML ) - throw beans::PropertyVetoException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw beans::PropertyVetoException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); if ( aValue >>= sMediaType ) { @@ -719,7 +718,7 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName, } } else - throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "MediaType must be a string!\n" ) ), + throw IllegalArgumentException(OSL_LOG_PREFIX "MediaType must be a string!\n", uno::Reference< XInterface >(), 2 ); @@ -727,21 +726,21 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName, else if ( aPropertyName == "Size" ) { if ( !( aValue >>= aEntry.nSize ) ) - throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Wrong type for Size property!\n" ) ), + throw IllegalArgumentException(OSL_LOG_PREFIX "Wrong type for Size property!\n", uno::Reference< XInterface >(), 2 ); } else if ( aPropertyName == "Encrypted" ) { if ( rZipPackage.getFormat() != embed::StorageFormats::PACKAGE ) - throw beans::PropertyVetoException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw beans::PropertyVetoException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); sal_Bool bEnc = sal_False; if ( aValue >>= bEnc ) { // In case of new raw stream, the stream must not be encrypted on storing if ( bEnc && m_nStreamMode == PACKAGE_STREAM_RAW ) - throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Raw stream can not be encrypted on storing" ) ), + throw IllegalArgumentException(OSL_LOG_PREFIX "Raw stream can not be encrypted on storing", uno::Reference< XInterface >(), 2 ); @@ -750,7 +749,7 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName, m_xBaseEncryptionData = new BaseEncryptionData; } else - throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Wrong type for Encrypted property!\n" ) ), + throw IllegalArgumentException(OSL_LOG_PREFIX "Wrong type for Encrypted property!\n", uno::Reference< XInterface >(), 2 ); @@ -758,7 +757,7 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName, else if ( aPropertyName == ENCRYPTION_KEY_PROPERTY ) { if ( rZipPackage.getFormat() != embed::StorageFormats::PACKAGE ) - throw beans::PropertyVetoException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw beans::PropertyVetoException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); uno::Sequence< sal_Int8 > aNewKey; @@ -776,7 +775,7 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName, aNewKey = aSequence; } else - throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Wrong type for EncryptionKey property!\n" ) ), + throw IllegalArgumentException(OSL_LOG_PREFIX "Wrong type for EncryptionKey property!\n", uno::Reference< XInterface >(), 2 ); } @@ -803,12 +802,12 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName, else if ( aPropertyName == STORAGE_ENCRYPTION_KEYS_PROPERTY ) { if ( rZipPackage.getFormat() != embed::StorageFormats::PACKAGE ) - throw beans::PropertyVetoException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw beans::PropertyVetoException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); uno::Sequence< beans::NamedValue > aKeys; if ( !( aValue >>= aKeys ) ) { - throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Wrong type for StorageEncryptionKeys property!\n" ) ), + throw IllegalArgumentException(OSL_LOG_PREFIX "Wrong type for StorageEncryptionKeys property!\n", uno::Reference< XInterface >(), 2 ); } @@ -833,7 +832,7 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName, m_aEncryptionKey.realloc( 0 ); } - else if ( aPropertyName.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "Compressed" ) ) ) + else if ( aPropertyName == "Compressed" ) { sal_Bool bCompr = sal_False; @@ -841,7 +840,7 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName, { // In case of new raw stream, the stream must not be encrypted on storing if ( bCompr && m_nStreamMode == PACKAGE_STREAM_RAW ) - throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Raw stream can not be encrypted on storing" ) ), + throw IllegalArgumentException(OSL_LOG_PREFIX "Raw stream can not be encrypted on storing", uno::Reference< XInterface >(), 2 ); @@ -849,12 +848,12 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName, m_bCompressedIsSetFromOutside = sal_True; } else - throw IllegalArgumentException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX "Wrong type for Compressed property!\n" ) ), + throw IllegalArgumentException(OSL_LOG_PREFIX "Wrong type for Compressed property!\n", uno::Reference< XInterface >(), 2 ); } else - throw beans::UnknownPropertyException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw beans::UnknownPropertyException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); } //-------------------------------------------------------------------------- @@ -898,7 +897,7 @@ Any SAL_CALL ZipPackageStream::getPropertyValue( const OUString& PropertyName ) return aAny; } else - throw beans::UnknownPropertyException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() ); + throw beans::UnknownPropertyException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() ); } //-------------------------------------------------------------------------- @@ -912,7 +911,7 @@ void ZipPackageStream::setSize ( const sal_Int32 nNewSize ) OUString ZipPackageStream::getImplementationName() throw ( RuntimeException ) { - return OUString ( RTL_CONSTASCII_USTRINGPARAM ( "ZipPackageStream" ) ); + return OUString ("ZipPackageStream"); } //-------------------------------------------------------------------------- @@ -920,7 +919,7 @@ Sequence< OUString > ZipPackageStream::getSupportedServiceNames() throw ( RuntimeException ) { Sequence< OUString > aNames( 1 ); - aNames[0] = OUString( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.packages.PackageStream" ) ); + aNames[0] = "com.sun.star.packages.PackageStream"; return aNames; } //-------------------------------------------------------------------------- |