From 458ff29ac36b4a99b14fab99ddc14090cbbfb199 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 31 Oct 2013 17:43:07 +0200 Subject: remove unnecessary use of OUString constructor in SVL module Change-Id: Ib3c2f2b43895fe45e9efff888bbd81d8be5969e4 --- svl/source/fsstor/fsfactory.cxx | 4 ++-- svl/source/fsstor/fsstorage.cxx | 9 ++++----- svl/source/passwordcontainer/passwordcontainer.cxx | 18 +++++++++--------- svl/source/uno/pathservice.cxx | 2 +- 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/svl/source/fsstor/fsfactory.cxx b/svl/source/fsstor/fsfactory.cxx index c10b445495ff..8a42548912e7 100644 --- a/svl/source/fsstor/fsfactory.cxx +++ b/svl/source/fsstor/fsfactory.cxx @@ -40,8 +40,8 @@ using namespace ::com::sun::star; uno::Sequence< OUString > SAL_CALL FSStorageFactory::impl_staticGetSupportedServiceNames() { uno::Sequence< OUString > aRet(2); - aRet[0] = OUString("com.sun.star.embed.FileSystemStorageFactory"); - aRet[1] = OUString("com.sun.star.comp.embed.FileSystemStorageFactory"); + aRet[0] = "com.sun.star.embed.FileSystemStorageFactory"; + aRet[1] = "com.sun.star.comp.embed.FileSystemStorageFactory"; return aRet; } diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx index fd8dd260528a..a1a7d40667de 100644 --- a/svl/source/fsstor/fsstorage.cxx +++ b/svl/source/fsstor/fsstorage.cxx @@ -233,8 +233,8 @@ void FSStorage::CopyContentToStorage_Impl( ::ucbhelper::Content* pContent, const // create cursor for access to children uno::Sequence< OUString > aProps( 2 ); OUString* pProps = aProps.getArray(); - pProps[0] = OUString("TargetURL"); - pProps[1] = OUString("IsFolder"); + pProps[0] = "TargetURL"; + pProps[1] = "IsFolder"; ::ucbhelper::ResultSetInclude eInclude = ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS; try @@ -1064,8 +1064,7 @@ uno::Sequence< OUString > SAL_CALL FSStorage::getElementNames() throw io::IOException(); // TODO: error handling uno::Sequence< OUString > aProps( 1 ); - OUString* pProps = aProps.getArray(); - pProps[0] = OUString("Title"); + aProps[0] = "Title"; ::ucbhelper::ResultSetInclude eInclude = ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS; uno::Sequence< OUString > aResult; @@ -1177,7 +1176,7 @@ sal_Bool SAL_CALL FSStorage::hasElements() throw io::IOException(); // TODO: error handling uno::Sequence< OUString > aProps( 1 ); - aProps[0] = OUString("TargetURL"); + aProps[0] = "TargetURL"; ::ucbhelper::ResultSetInclude eInclude = ::ucbhelper::INCLUDE_FOLDERS_AND_DOCUMENTS; try diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx index 09d82dc1f8e6..293ad9fb347c 100644 --- a/svl/source/passwordcontainer/passwordcontainer.cxx +++ b/svl/source/passwordcontainer/passwordcontainer.cxx @@ -253,7 +253,7 @@ void StorageItem::setUseStorage( bool bUse ) Sequence< OUString > sendNames(1); Sequence< uno::Any > sendVals(1); - sendNames[0] = OUString("UseStorage"); + sendNames[0] = "UseStorage"; sendVals[0] <<= bUse; @@ -265,7 +265,7 @@ void StorageItem::setUseStorage( bool bUse ) bool StorageItem::useStorage() { Sequence< OUString > aNodeNames( 1 ); - aNodeNames[0] = OUString("UseStorage"); + aNodeNames[0] = "UseStorage"; Sequence< Any > aPropertyValues = ConfigItem::GetProperties( aNodeNames ); @@ -291,8 +291,8 @@ bool StorageItem::getEncodedMP( OUString& aResult ) } Sequence< OUString > aNodeNames( 2 ); - aNodeNames[0] = OUString("HasMaster"); - aNodeNames[1] = OUString("Master"); + aNodeNames[0] = "HasMaster"; + aNodeNames[1] = "Master"; Sequence< Any > aPropertyValues = ConfigItem::GetProperties( aNodeNames ); @@ -316,8 +316,8 @@ void StorageItem::setEncodedMP( const OUString& aEncoded, bool bAcceptEmpty ) Sequence< OUString > sendNames(2); Sequence< uno::Any > sendVals(2); - sendNames[0] = OUString("HasMaster"); - sendNames[1] = OUString("Master"); + sendNames[0] = "HasMaster"; + sendNames[1] = "Master"; sal_Bool bHasMaster = ( !aEncoded.isEmpty() || bAcceptEmpty ); sendVals[0] <<= bHasMaster; @@ -537,7 +537,7 @@ OUString PasswordContainer::EncodePasswords( vector< OUString > lines, const OUS { for( int ind = 0; ind < aSeq1.getLength(); ind++ ) if( resSeq[ind] != aSeq1[ind] ) - testOU = OUString(); + testOU = ""; } result = rtl_cipher_decode ( aEncoder, (sal_uInt8*)aSeq1.getArray(), aSeq1.getLength(), @@ -1175,7 +1175,7 @@ void SAL_CALL PasswordContainer::removeMasterPassword() ::osl::MutexGuard aGuard( mMutex ); if ( m_pStorageFile ) { - m_aMasterPasswd = OUString(); + m_aMasterPasswd = ""; m_pStorageFile->setEncodedMP( OUString() ); // let the master password be removed from configuration } } @@ -1384,7 +1384,7 @@ Sequence< OUString > SAL_CALL PasswordContainer::getSupportedServiceNames( ) th Sequence< OUString > SAL_CALL PasswordContainer::impl_getStaticSupportedServiceNames( ) throw(uno::RuntimeException) { Sequence< OUString > aRet(1); - *aRet.getArray() = OUString("com.sun.star.task.PasswordContainer"); + aRet[0] = "com.sun.star.task.PasswordContainer"; return aRet; } diff --git a/svl/source/uno/pathservice.cxx b/svl/source/uno/pathservice.cxx index 012d2baec6d8..07b57a1257b5 100644 --- a/svl/source/uno/pathservice.cxx +++ b/svl/source/uno/pathservice.cxx @@ -53,7 +53,7 @@ public: throw(css::uno::RuntimeException) { css::uno::Sequence< OUString > aRet(1); - aRet.getArray()[0] = OUString("com.sun.star.config.SpecialConfigManager"); + aRet.getArray()[0] = "com.sun.star.config.SpecialConfigManager"; return aRet; } -- cgit