summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-12-18 12:06:16 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-12-18 12:34:40 +0100
commit180f0791daa3d3f959f4f70b9f83012bcbf47a64 (patch)
treeae1509f2bfaa697ec613032c4f26fc4b0e841c60 /package
parent783ba49aa0cd068c7e3dacdd3c13e9c37cf52e22 (diff)
comphelper: Use appropriate OUString functions on string constants
Change-Id: Id1d5c3cf2f76dbb33606cec1c0f17d4a1f282247
Diffstat (limited to 'package')
-rw-r--r--package/source/xstor/xfactory.cxx6
-rw-r--r--package/source/zippackage/ZipPackage.cxx10
-rw-r--r--package/source/zippackage/ZipPackageStream.cxx2
3 files changed, 9 insertions, 9 deletions
diff --git a/package/source/xstor/xfactory.cxx b/package/source/xstor/xfactory.cxx
index 54905ab305dc..11391e4897e9 100644
--- a/package/source/xstor/xfactory.cxx
+++ b/package/source/xstor/xfactory.cxx
@@ -203,11 +203,11 @@ uno::Reference< uno::XInterface > SAL_CALL OStorageFactory::createInstanceWithAr
sal_Int32 nFormatID = 0;
if ( aDescr[nInd].Value >>= aFormatName )
{
- if ( aFormatName.equals( PACKAGE_STORAGE_FORMAT_STRING ) )
+ if ( aFormatName == PACKAGE_STORAGE_FORMAT_STRING )
nStorageType = embed::StorageFormats::PACKAGE;
- else if ( aFormatName.equals( ZIP_STORAGE_FORMAT_STRING ) )
+ else if ( aFormatName == ZIP_STORAGE_FORMAT_STRING )
nStorageType = embed::StorageFormats::ZIP;
- else if ( aFormatName.equals( OFOPXML_STORAGE_FORMAT_STRING ) )
+ else if ( aFormatName == OFOPXML_STORAGE_FORMAT_STRING )
nStorageType = embed::StorageFormats::OFOPXML;
else
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 );
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 5f9c179820bc..c30ca99a66ad 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -679,11 +679,11 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments )
sal_Int32 nFormatID = 0;
if ( aNamedValue.Value >>= aFormatName )
{
- if ( aFormatName.equals( PACKAGE_STORAGE_FORMAT_STRING ) )
+ if ( aFormatName == PACKAGE_STORAGE_FORMAT_STRING )
m_nFormat = embed::StorageFormats::PACKAGE;
- else if ( aFormatName.equals( ZIP_STORAGE_FORMAT_STRING ) )
+ else if ( aFormatName == ZIP_STORAGE_FORMAT_STRING )
m_nFormat = embed::StorageFormats::ZIP;
- else if ( aFormatName.equals( OFOPXML_STORAGE_FORMAT_STRING ) )
+ else if ( aFormatName == OFOPXML_STORAGE_FORMAT_STRING )
m_nFormat = embed::StorageFormats::OFOPXML;
else
throw lang::IllegalArgumentException(THROW_WHERE, uno::Reference< uno::XInterface >(), 1 );
@@ -1709,9 +1709,9 @@ void SAL_CALL ZipPackage::setPropertyValue( const OUString& aPropertyName, const
bool bHasSHA1 = false;
for ( sal_Int32 nInd = 0; nInd < aKeys.getLength(); nInd++ )
{
- if ( aKeys[nInd].Name.equals( PACKAGE_ENCRYPTIONDATA_SHA256UTF8 ) )
+ if ( aKeys[nInd].Name == PACKAGE_ENCRYPTIONDATA_SHA256UTF8 )
bHasSHA256 = true;
- if ( aKeys[nInd].Name.equals( PACKAGE_ENCRYPTIONDATA_SHA1UTF8 ) )
+ if ( aKeys[nInd].Name == PACKAGE_ENCRYPTIONDATA_SHA1UTF8 )
bHasSHA1 = true;
}
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index e22b234ee24a..9b5eb6926e7a 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -232,7 +232,7 @@ uno::Sequence< sal_Int8 > ZipPackageStream::GetEncryptionKey( bool bUseWinEncodi
aNameToFind = PACKAGE_ENCRYPTIONDATA_SHA256UTF8;
else if ( nKeyGenID == xml::crypto::DigestID::SHA1 )
{
- aNameToFind = bUseWinEncoding ? PACKAGE_ENCRYPTIONDATA_SHA1MS1252 : PACKAGE_ENCRYPTIONDATA_SHA1UTF8;
+ aNameToFind = bUseWinEncoding ? OUString(PACKAGE_ENCRYPTIONDATA_SHA1MS1252) : OUString(PACKAGE_ENCRYPTIONDATA_SHA1UTF8);
}
else
throw uno::RuntimeException(THROW_WHERE "No expected key is provided!" );