From 212d2341609e2aa2fc362dc2c6980020b7360ae7 Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Tue, 29 May 2012 19:25:51 -0500 Subject: targeted string re-work Change-Id: I47c5edfd9448b1cb122550566cc9083c070f40d0 --- ucbhelper/source/client/content.cxx | 84 ++++++++++++------------- ucbhelper/source/client/contentbroker.cxx | 12 ++-- ucbhelper/source/client/proxydecider.cxx | 14 ++--- ucbhelper/source/provider/propertyvalueset.cxx | 4 +- ucbhelper/source/provider/providerhelper.cxx | 4 +- ucbhelper/source/provider/resultsethelper.cxx | 12 ++-- ucbhelper/source/provider/resultsetmetadata.cxx | 4 +- 7 files changed, 67 insertions(+), 67 deletions(-) (limited to 'ucbhelper') diff --git a/ucbhelper/source/client/content.cxx b/ucbhelper/source/client/content.cxx index c4e5d8dc9037..f3e8dfda6620 100644 --- a/ucbhelper/source/client/content.cxx +++ b/ucbhelper/source/client/content.cxx @@ -224,9 +224,9 @@ static void ensureContentProviderForURL( const ContentBroker & rBroker, if ( !xMgr.is() ) { throw RuntimeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + rtl::OUString( "UCB does not implement mandatory interface " - "XContentProviderManager!" )), + "XContentProviderManager!" ), Reference< XInterface >() ); } else @@ -236,8 +236,8 @@ static void ensureContentProviderForURL( const ContentBroker & rBroker, if ( !xProv.is() ) { throw ContentCreationException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "No Content Provider available for URL: ")) + rURL, + rtl::OUString( + "No Content Provider available for URL: ") + rURL, Reference< XInterface >(), ContentCreationError_NO_CONTENT_PROVIDER ); } @@ -254,7 +254,7 @@ static ContentBroker* getContentBroker( bool bThrow ) { if ( bThrow ) throw RuntimeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("No Content Broker!")), + rtl::OUString("No Content Broker!"), Reference< XInterface >() ); } else @@ -266,9 +266,9 @@ static ContentBroker* getContentBroker( bool bThrow ) { if ( bThrow ) throw RuntimeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + rtl::OUString( "UCB does not implement mandatory interface " - "XContentProviderManager!" )), + "XContentProviderManager!" ), Reference< XInterface >() ); } else @@ -304,8 +304,8 @@ static Reference< XContentIdentifier > getContentIdentifier( ensureContentProviderForURL( rBroker, rURL ); throw ContentCreationException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Unable to create Content Identifier!" )), + rtl::OUString( + "Unable to create Content Identifier!" ), Reference< XInterface >(), ContentCreationError_IDENTIFIER_CREATION_FAILED ); } @@ -314,9 +314,9 @@ static Reference< XContentIdentifier > getContentIdentifier( { if ( bThrow ) throw RuntimeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + rtl::OUString( "UCB does not implement mandatory interface " - "XContentIdentifierFactory!" )), + "XContentIdentifierFactory!" ), Reference< XInterface >() ); } @@ -354,8 +354,8 @@ static Reference< XContent > getContent( ensureContentProviderForURL( rBroker, xId->getContentIdentifier() ); throw ContentCreationException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Unable to create Content! " )) + msg, + rtl::OUString( + "Unable to create Content! " ) + msg, Reference< XInterface >(), ContentCreationError_CONTENT_CREATION_FAILED ); } @@ -364,9 +364,9 @@ static Reference< XContent > getContent( { if ( bThrow ) throw RuntimeException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + rtl::OUString( "UCB does not implement mandatory interface " - "XContentProvider!" )), + "XContentProvider!" ), Reference< XInterface >() ); } @@ -484,7 +484,7 @@ Reference< XCommandInfo > Content::getCommands() throw( CommandAbortedException, RuntimeException, Exception ) { Command aCommand; - aCommand.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getCommandInfo")); + aCommand.Name = rtl::OUString("getCommandInfo"); aCommand.Handle = -1; // n/a aCommand.Argument = Any(); @@ -500,7 +500,7 @@ Reference< XPropertySetInfo > Content::getProperties() throw( CommandAbortedException, RuntimeException, Exception ) { Command aCommand; - aCommand.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPropertySetInfo")); + aCommand.Name = rtl::OUString("getPropertySetInfo"); aCommand.Handle = -1; // n/a aCommand.Argument = Any(); @@ -580,7 +580,7 @@ Reference< XRow > Content::getPropertyValuesInterface( } Command aCommand; - aCommand.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("getPropertyValues")); + aCommand.Name = rtl::OUString("getPropertyValues"); aCommand.Handle = -1; // n/a aCommand.Argument <<= aProps; @@ -601,9 +601,9 @@ Sequence< Any > Content::setPropertyValues( { ucbhelper::cancelCommandExecution( makeAny( IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + rtl::OUString( "Length of property names sequence and value " - "sequence are unequal!" )), + "sequence are unequal!" ), get(), -1 ) ), m_xImpl->getEnvironment() ); @@ -628,7 +628,7 @@ Sequence< Any > Content::setPropertyValues( } Command aCommand; - aCommand.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("setPropertyValues")); + aCommand.Name = rtl::OUString("setPropertyValues"); aCommand.Handle = -1; // n/a aCommand.Argument <<= aProps; @@ -678,7 +678,7 @@ Any Content::createCursorAny( const Sequence< rtl::OUString >& rPropertyNames, aArg.Properties = aProps; Command aCommand; - aCommand.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("open")); + aCommand.Name = rtl::OUString("open"); aCommand.Handle = -1; // n/a aCommand.Argument <<= aArg; @@ -752,7 +752,7 @@ Reference< XResultSet > Content::createSortedCursor( if( aServiceManager.is() ) { Reference< XSortedDynamicResultSetFactory > aSortFactory( aServiceManager->createInstance( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SortedDynamicResultSetFactory"))), + rtl::OUString("com.sun.star.ucb.SortedDynamicResultSetFactory")), UNO_QUERY ); aDynResult = aSortFactory->createSortedDynamicResultSet( aDynSet, @@ -799,7 +799,7 @@ Reference< XInputStream > Content::openStream() aArg.Properties = Sequence< Property >( 0 ); // unused Command aCommand; - aCommand.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("open")); + aCommand.Name = rtl::OUString("open"); aCommand.Handle = -1; // n/a aCommand.Argument <<= aArg; @@ -824,7 +824,7 @@ Reference< XInputStream > Content::openStreamNoLock() aArg.Properties = Sequence< Property >( 0 ); // unused Command aCommand; - aCommand.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("open")); + aCommand.Name = rtl::OUString("open"); aCommand.Handle = -1; // n/a aCommand.Argument <<= aArg; @@ -849,7 +849,7 @@ Reference< XStream > Content::openWriteableStream() aArg.Properties = Sequence< Property >( 0 ); // unused Command aCommand; - aCommand.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("open")); + aCommand.Name = rtl::OUString("open"); aCommand.Handle = -1; // n/a aCommand.Argument <<= aArg; @@ -874,7 +874,7 @@ Reference< XStream > Content::openWriteableStreamNoLock() aArg.Properties = Sequence< Property >( 0 ); // unused Command aCommand; - aCommand.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("open")); + aCommand.Name = rtl::OUString("open"); aCommand.Handle = -1; // n/a aCommand.Argument <<= aArg; @@ -897,7 +897,7 @@ sal_Bool Content::openStream( const Reference< XActiveDataSink >& rSink ) aArg.Properties = Sequence< Property >( 0 ); // unused Command aCommand; - aCommand.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("open")); + aCommand.Name = rtl::OUString("open"); aCommand.Handle = -1; // n/a aCommand.Argument <<= aArg; @@ -920,7 +920,7 @@ sal_Bool Content::openStream( const Reference< XOutputStream >& rStream ) aArg.Properties = Sequence< Property >( 0 ); // unused Command aCommand; - aCommand.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("open")); + aCommand.Name = rtl::OUString("open"); aCommand.Handle = -1; // n/a aCommand.Argument <<= aArg; @@ -939,7 +939,7 @@ void Content::writeStream( const Reference< XInputStream >& rStream, aArg.ReplaceExisting = bReplaceExisting; Command aCommand; - aCommand.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("insert")); + aCommand.Name = rtl::OUString("insert"); aCommand.Handle = -1; // n/a aCommand.Argument <<= aArg; @@ -955,7 +955,7 @@ Sequence< ContentInfo > Content::queryCreatableContentsInfo() // First, try it using "CreatableContentsInfo" property -> the "new" way. Sequence< ContentInfo > aInfo; if ( getPropertyValue( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CreatableContentsInfo")) ) + rtl::OUString("CreatableContentsInfo") ) >>= aInfo ) return aInfo; @@ -1001,7 +1001,7 @@ sal_Bool Content::insertNewContent( const rtl::OUString& rContentType, aInfo.Attributes = 0; Command aCommand; - aCommand.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("createNewContent")); + aCommand.Name = rtl::OUString("createNewContent"); aCommand.Handle = -1; // n/a aCommand.Argument <<= aInfo; @@ -1035,7 +1035,7 @@ sal_Bool Content::insertNewContent( const rtl::OUString& rContentType, Content aNewContent( xNew, m_xImpl->getEnvironment() ); aNewContent.setPropertyValues( rPropertyNames, rPropertyValues ); - aNewContent.executeCommand( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("insert")), + aNewContent.executeCommand( rtl::OUString("insert"), makeAny( InsertCommandArgument( rData.is() ? rData : new EmptyInputStream, @@ -1088,8 +1088,8 @@ sal_Bool Content::transferContent( const Content& rSourceContent, default: ucbhelper::cancelCommandExecution( makeAny( IllegalArgumentException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Unknown transfer operation!" )), + rtl::OUString( + "Unknown transfer operation!" ), get(), -1 ) ), m_xImpl->getEnvironment() ); @@ -1103,7 +1103,7 @@ sal_Bool Content::transferContent( const Content& rSourceContent, rTitle, nNameClashAction ); Command aCommand; - aCommand.Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("globalTransfer")); + aCommand.Name = rtl::OUString("globalTransfer"); aCommand.Handle = -1; // n/a aCommand.Argument <<= aTransferArg; @@ -1116,14 +1116,14 @@ sal_Bool Content::isFolder() throw( CommandAbortedException, RuntimeException, Exception ) { sal_Bool bFolder = sal_False; - if ( getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsFolder")) ) + if ( getPropertyValue( rtl::OUString("IsFolder") ) >>= bFolder ) return bFolder; ucbhelper::cancelCommandExecution( makeAny( UnknownPropertyException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Unable to retreive value of property 'IsFolder'!" )), + rtl::OUString( + "Unable to retreive value of property 'IsFolder'!" ), get() ) ), m_xImpl->getEnvironment() ); @@ -1137,14 +1137,14 @@ sal_Bool Content::isDocument() throw( CommandAbortedException, RuntimeException, Exception ) { sal_Bool bDoc = sal_False; - if ( getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("IsDocument")) ) + if ( getPropertyValue( rtl::OUString("IsDocument") ) >>= bDoc ) return bDoc; ucbhelper::cancelCommandExecution( makeAny( UnknownPropertyException( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "Unable to retreive value of property 'IsDocument'!" )), + rtl::OUString( + "Unable to retreive value of property 'IsDocument'!" ), get() ) ), m_xImpl->getEnvironment() ); diff --git a/ucbhelper/source/client/contentbroker.cxx b/ucbhelper/source/client/contentbroker.cxx index 3d217f8fe206..b059dc9931df 100644 --- a/ucbhelper/source/client/contentbroker.cxx +++ b/ucbhelper/source/client/contentbroker.cxx @@ -225,8 +225,8 @@ InitUCBHelper() // Create UCB. Sequence< Any > aArgs( 2 ); - aArgs[ 0 ] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY1_LOCAL )); - aArgs[ 1 ] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( UCB_CONFIGURATION_KEY2_OFFICE )); + aArgs[ 0 ] <<= rtl::OUString( UCB_CONFIGURATION_KEY1_LOCAL ); + aArgs[ 1 ] <<= rtl::OUString( UCB_CONFIGURATION_KEY2_OFFICE ); ::ucbhelper::ContentBroker::initialize( xFactory, aArgs ); } @@ -286,8 +286,8 @@ bool ContentBroker_Impl::initialize() try { xIfc = m_xSMgr->createInstance( - OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.ucb.UniversalContentBroker" )) ); + OUString( + "com.sun.star.ucb.UniversalContentBroker" ) ); } catch ( Exception const & ) { @@ -320,8 +320,8 @@ bool ContentBroker_Impl::initialize() try { xIfc = m_xSMgr->createInstanceWithArguments( - OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.ucb.UniversalContentBroker" )), + OUString( + "com.sun.star.ucb.UniversalContentBroker" ), m_aArguments ); } catch ( Exception const & ) diff --git a/ucbhelper/source/client/proxydecider.cxx b/ucbhelper/source/client/proxydecider.cxx index 3dddf1c8d5f3..453eb8344873 100644 --- a/ucbhelper/source/client/proxydecider.cxx +++ b/ucbhelper/source/client/proxydecider.cxx @@ -320,17 +320,17 @@ InternetProxyDecider_Impl::InternetProxyDecider_Impl( uno::Reference< lang::XMultiServiceFactory > xConfigProv( rxSMgr->createInstance( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.configuration.ConfigurationProvider" )) ), + rtl::OUString( + "com.sun.star.configuration.ConfigurationProvider" ) ), uno::UNO_QUERY ); uno::Sequence< uno::Any > aArguments( 1 ); - aArguments[ 0 ] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( CONFIG_ROOT_KEY )); + aArguments[ 0 ] <<= rtl::OUString( CONFIG_ROOT_KEY ); uno::Reference< uno::XInterface > xInterface( xConfigProv->createInstanceWithArguments( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.configuration.ConfigurationAccess" )), + rtl::OUString( + "com.sun.star.configuration.ConfigurationAccess" ), aArguments ) ); OSL_ENSURE( xInterface.is(), @@ -722,14 +722,14 @@ void InternetProxyDecider_Impl::setNoProxyList( if ( nColonPos == -1 ) { // No port given, server pattern equals current token - aPort = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")); + aPort = rtl::OUString("*"); if ( aToken.indexOf( '*' ) == -1 ) { // pattern describes exactly one server aServer = aToken; } - aToken += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(":*")); + aToken += rtl::OUString(":*"); } else { diff --git a/ucbhelper/source/provider/propertyvalueset.cxx b/ucbhelper/source/provider/propertyvalueset.cxx index 0ade2fe10a90..a6cf5bd6a630 100644 --- a/ucbhelper/source/provider/propertyvalueset.cxx +++ b/ucbhelper/source/provider/propertyvalueset.cxx @@ -639,8 +639,8 @@ const Reference< XTypeConverter >& PropertyValueSet::getTypeConverter() m_bTriedToGetTypeConverter = sal_True; m_xTypeConverter = Reference< XTypeConverter >( m_xSMgr->createInstance( - OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.script.Converter" )) ), + OUString( + "com.sun.star.script.Converter" ) ), UNO_QUERY ); OSL_ENSURE( m_xTypeConverter.is(), diff --git a/ucbhelper/source/provider/providerhelper.cxx b/ucbhelper/source/provider/providerhelper.cxx index fd6cd8f0daa1..e6bd42e836dc 100644 --- a/ucbhelper/source/provider/providerhelper.cxx +++ b/ucbhelper/source/provider/providerhelper.cxx @@ -324,8 +324,8 @@ ContentProviderImplHelper::getAdditionalPropertySetRegistry() uno::Reference< com::sun::star::ucb::XPropertySetRegistryFactory > xRegFac( m_xSMgr->createInstance( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.ucb.Store" )) ), + rtl::OUString( + "com.sun.star.ucb.Store" ) ), uno::UNO_QUERY ); OSL_ENSURE( xRegFac.is(), diff --git a/ucbhelper/source/provider/resultsethelper.cxx b/ucbhelper/source/provider/resultsethelper.cxx index 8fd870dbdafa..f9bdaf99ea74 100644 --- a/ucbhelper/source/provider/resultsethelper.cxx +++ b/ucbhelper/source/provider/resultsethelper.cxx @@ -105,10 +105,10 @@ XTYPEPROVIDER_IMPL_3( ResultSetImplHelper, //========================================================================= XSERVICEINFO_NOFACTORY_IMPL_1( ResultSetImplHelper, - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "ResultSetImplHelper" )), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - DYNAMICRESULTSET_SERVICE_NAME )) ); + rtl::OUString( + "ResultSetImplHelper" ), + rtl::OUString( + DYNAMICRESULTSET_SERVICE_NAME ) ); //========================================================================= // @@ -261,8 +261,8 @@ void SAL_CALL ResultSetImplHelper::connectToCache( = uno::Reference< com::sun::star::ucb::XCachedDynamicResultSetStubFactory >( m_xSMgr->createInstance( - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.ucb.CachedDynamicResultSetStubFactory" )) ), + rtl::OUString( + "com.sun.star.ucb.CachedDynamicResultSetStubFactory" ) ), uno::UNO_QUERY ); } catch ( uno::Exception const & ) diff --git a/ucbhelper/source/provider/resultsetmetadata.cxx b/ucbhelper/source/provider/resultsetmetadata.cxx index 2417e3745837..012bbc35992e 100644 --- a/ucbhelper/source/provider/resultsetmetadata.cxx +++ b/ucbhelper/source/provider/resultsetmetadata.cxx @@ -411,8 +411,8 @@ sal_Int32 SAL_CALL ResultSetMetaData::getColumnType( sal_Int32 column ) { Reference< XPropertySetInfo > xInfo( m_xSMgr->createInstance( - OUString(RTL_CONSTASCII_USTRINGPARAM( - "com.sun.star.ucb.PropertiesManager" )) ), + OUString( + "com.sun.star.ucb.PropertiesManager" ) ), UNO_QUERY ); if ( xInfo.is() ) { -- cgit