From 610b2b94b33b0fc2d79cd515f9e293ca1c2610e8 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 15 Nov 2013 11:05:19 +0200 Subject: remove unnecessary use of OUString constructor when assigning change code like aStr = OUString("xxxx"); to aStr = "xxxx"; Change-Id: Ib981a5cc735677ec5dba76ef9279a107d22e99d4 --- xmlhelp/source/cxxhelp/provider/content.cxx | 7 +++---- xmlhelp/source/cxxhelp/provider/resultsetbase.cxx | 4 ++-- xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx | 4 ++-- xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx | 2 +- xmlhelp/source/treeview/tvfactory.cxx | 6 +++--- 5 files changed, 11 insertions(+), 12 deletions(-) (limited to 'xmlhelp') diff --git a/xmlhelp/source/cxxhelp/provider/content.cxx b/xmlhelp/source/cxxhelp/provider/content.cxx index 7a844936a45c..42139af1a21d 100644 --- a/xmlhelp/source/cxxhelp/provider/content.cxx +++ b/xmlhelp/source/cxxhelp/provider/content.cxx @@ -140,8 +140,7 @@ uno::Sequence< OUString > SAL_CALL Content::getSupportedServiceNames() throw( uno::RuntimeException ) { uno::Sequence< OUString > aSNS( 1 ); - aSNS.getArray()[ 0 ] - = OUString( MYUCP_CONTENT_SERVICE_NAME ); + aSNS.getArray()[ 0 ] = MYUCP_CONTENT_SERVICE_NAME ; return aSNS; } @@ -486,8 +485,8 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues( else if ( rProp.Name == "SearchScopes" ) { uno::Sequence< OUString > seq( 2 ); - seq[0] = OUString( "Heading" ); - seq[1] = OUString( "FullText" ); + seq[0] = "Heading"; + seq[1] = "FullText"; uno::Any aAny; aAny <<= seq; xRow->appendObject( rProp,aAny ); diff --git a/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx b/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx index a257d1e8da68..9cd9cf2e8ae1 100644 --- a/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx +++ b/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx @@ -495,12 +495,12 @@ ResultSetBase::getPropertySetInfo() throw( uno::RuntimeException) { uno::Sequence< beans::Property > seq(2); - seq[0].Name = OUString( "RowCount" ); + seq[0].Name = "RowCount"; seq[0].Handle = -1; seq[0].Type = getCppuType( static_cast< sal_Int32* >(0) ); seq[0].Attributes = beans::PropertyAttribute::READONLY; - seq[1].Name = OUString( "IsRowCountFinal" ); + seq[1].Name = "IsRowCountFinal"; seq[1].Handle = -1; seq[1].Type = getCppuType( static_cast< sal_Bool* >(0) ); seq[1].Attributes = beans::PropertyAttribute::READONLY; diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx index e9b3f3e43d4a..567fe58906c0 100644 --- a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx +++ b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx @@ -314,7 +314,7 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< uno::XComponentConte } sal_Int32 replIdx = OUString( "#HLP#" ).getLength(); - OUString replWith = OUString( "vnd.sun.star.help://" ); + OUString replWith = "vnd.sun.star.help://"; int nResultCount = aCompleteResultVector.size(); for( int r = 0 ; r < nResultCount ; ++r ) @@ -328,7 +328,7 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< uno::XComponentConte m_aIdents.resize( m_aPath.size() ); Command aCommand; - aCommand.Name = OUString( "getPropertyValues" ); + aCommand.Name = "getPropertyValues"; aCommand.Argument <<= m_sProperty; for( m_nRow = 0; sal::static_int_cast( m_nRow ) < m_aPath.size(); ++m_nRow ) diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx b/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx index aace7a6236a4..a9cdba8ea434 100644 --- a/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx +++ b/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx @@ -46,7 +46,7 @@ ResultSetForRoot::ResultSetForRoot( const uno::Reference< uno::XComponentContext m_aIdents.resize( m_aPath.size() ); Command aCommand; - aCommand.Name = OUString( "getPropertyValues" ); + aCommand.Name = "getPropertyValues"; aCommand.Argument <<= m_sProperty; for( sal_uInt32 i = 0; i < m_aPath.size(); ++i ) diff --git a/xmlhelp/source/treeview/tvfactory.cxx b/xmlhelp/source/treeview/tvfactory.cxx index 1bcf74ecaefd..6f6a5cbd9e57 100644 --- a/xmlhelp/source/treeview/tvfactory.cxx +++ b/xmlhelp/source/treeview/tvfactory.cxx @@ -175,7 +175,7 @@ TVFactory::getAvailableServiceNames( ) throw( RuntimeException ) { Sequence< OUString > seq( 1 ); - seq[0] = OUString( "com.sun.star.ucb.HierarchyDataReadAccess" ); + seq[0] = "com.sun.star.ucb.HierarchyDataReadAccess"; return seq; } @@ -191,8 +191,8 @@ Sequence< OUString > SAL_CALL TVFactory::getSupportedServiceNames_static() { Sequence< OUString > seq( 2 ); - seq[0] = OUString( "com.sun.star.help.TreeView" ); - seq[1] = OUString( "com.sun.star.ucb.HiearchyDataSource" ); + seq[0] = "com.sun.star.help.TreeView"; + seq[1] = "com.sun.star.ucb.HiearchyDataSource"; return seq; } -- cgit