diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-15 11:05:19 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-19 10:29:31 +0200 |
commit | 610b2b94b33b0fc2d79cd515f9e293ca1c2610e8 (patch) | |
tree | 6eab2639cb8104ca54daa3f7a2ebd83ef1566cf0 /svtools | |
parent | 2c35fff7eca3a143d28dc75e6a73fe1101d2af77 (diff) |
remove unnecessary use of OUString constructor when assigning
change code like
aStr = OUString("xxxx");
to
aStr = "xxxx";
Change-Id: Ib981a5cc735677ec5dba76ef9279a107d22e99d4
Diffstat (limited to 'svtools')
20 files changed, 71 insertions, 71 deletions
diff --git a/svtools/source/brwbox/brwbox3.cxx b/svtools/source/brwbox/brwbox3.cxx index 2b251a5d0a1e..064a4b818908 100644 --- a/svtools/source/brwbox/brwbox3.cxx +++ b/svtools/source/brwbox/brwbox3.cxx @@ -214,19 +214,19 @@ OUString BrowseBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBoxObjType e switch( eObjType ) { case ::svt::BBTYPE_BROWSEBOX: - aRetText = OUString( "BrowseBox" ); + aRetText = "BrowseBox"; break; case ::svt::BBTYPE_TABLE: - aRetText = OUString( "Table" ); + aRetText = "Table"; break; case ::svt::BBTYPE_ROWHEADERBAR: - aRetText = OUString( "RowHeaderBar" ); + aRetText = "RowHeaderBar"; break; case ::svt::BBTYPE_COLUMNHEADERBAR: - aRetText = OUString( "ColumnHeaderBar" ); + aRetText = "ColumnHeaderBar"; break; case ::svt::BBTYPE_TABLECELL: - aRetText = OUString( "TableCell" ); + aRetText = "TableCell"; #if OSL_DEBUG_LEVEL > 1 aRetText += " ["; aRetText += OUString::number(sal_Int32(GetCurRow())); @@ -236,7 +236,7 @@ OUString BrowseBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBoxObjType e #endif break; case ::svt::BBTYPE_ROWHEADERCELL: - aRetText = OUString( "RowHeaderCell" ); + aRetText = "RowHeaderCell"; #if OSL_DEBUG_LEVEL > 1 aRetText += " ["; aRetText += OUString::number(sal_Int32(GetCurRow())); @@ -246,7 +246,7 @@ OUString BrowseBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBoxObjType e #endif break; case ::svt::BBTYPE_COLUMNHEADERCELL: - aRetText = OUString( "ColumnHeaderCell" ); + aRetText = "ColumnHeaderCell"; #if OSL_DEBUG_LEVEL > 1 aRetText += " ["; aRetText += OUString::number(sal_Int32(GetCurRow())); @@ -268,25 +268,25 @@ OUString BrowseBox::GetAccessibleObjectDescription( ::svt::AccessibleBrowseBoxOb switch( eObjType ) { case ::svt::BBTYPE_BROWSEBOX: - aRetText = OUString( "BrowseBox description" ); + aRetText = "BrowseBox description"; break; case ::svt::BBTYPE_TABLE: - // aRetText = OUString( "TABLE description" ); + // aRetText = "TABLE description"; break; case ::svt::BBTYPE_ROWHEADERBAR: - // aRetText = OUString( "ROWHEADERBAR description" ); + // aRetText = "ROWHEADERBAR description"; break; case ::svt::BBTYPE_COLUMNHEADERBAR: - // aRetText = OUString( "COLUMNHEADERBAR description" ); + // aRetText = "COLUMNHEADERBAR description"; break; case ::svt::BBTYPE_TABLECELL: - // aRetText = OUString( "TABLECELL description" ); + // aRetText = "TABLECELL description"; break; case ::svt::BBTYPE_ROWHEADERCELL: - // aRetText = OUString( "ROWHEADERCELL description" ); + // aRetText = "ROWHEADERCELL description"; break; case ::svt::BBTYPE_COLUMNHEADERCELL: - // aRetText = OUString( "COLUMNHEADERCELL description" ); + // aRetText = "COLUMNHEADERCELL description"; break; case ::svt::BBTYPE_CHECKBOXCELL: break; diff --git a/svtools/source/contnr/contentenumeration.cxx b/svtools/source/contnr/contentenumeration.cxx index 3429f760a62c..c07f55921f0e 100644 --- a/svtools/source/contnr/contentenumeration.cxx +++ b/svtools/source/contnr/contentenumeration.cxx @@ -152,18 +152,18 @@ namespace svt Reference< XResultSet > xResultSet; Sequence< OUString > aProps(12); - aProps[0] = OUString( "Title" ); - aProps[1] = OUString( "Size" ); - aProps[2] = OUString( "DateModified" ); - aProps[3] = OUString( "DateCreated" ); - aProps[4] = OUString( "IsFolder" ); - aProps[5] = OUString( "TargetURL" ); - aProps[6] = OUString( "IsHidden" ); - aProps[7] = OUString( "IsVolume" ); - aProps[8] = OUString( "IsRemote" ); - aProps[9] = OUString( "IsRemoveable" ); - aProps[10] = OUString( "IsFloppy" ); - aProps[11] = OUString( "IsCompactDisc" ); + aProps[0] = "Title"; + aProps[1] = "Size"; + aProps[2] = "DateModified"; + aProps[3] = "DateCreated"; + aProps[4] = "IsFolder"; + aProps[5] = "TargetURL"; + aProps[6] = "IsHidden"; + aProps[7] = "IsVolume"; + aProps[8] = "IsRemote"; + aProps[9] = "IsRemoveable"; + aProps[10] = "IsFloppy"; + aProps[11] = "IsCompactDisc"; Reference< XCommandEnvironment > xEnvironment; try diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx index 5317426f13b4..7a091e699ece 100644 --- a/svtools/source/contnr/svtabbx.cxx +++ b/svtools/source/contnr/svtabbx.cxx @@ -1051,7 +1051,7 @@ OUString SvHeaderTabListBox::GetAccessibleObjectName( ::svt::AccessibleBrowseBox case ::svt::BBTYPE_ROWHEADERBAR: case ::svt::BBTYPE_ROWHEADERCELL: - aRetText = OUString( "error" ); + aRetText = "error"; break; default: diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx index 362394c590dd..4cbe2a68395e 100644 --- a/svtools/source/control/inettbc.cxx +++ b/svtools/source/control/inettbc.cxx @@ -364,8 +364,8 @@ void SvtMatchContext_Impl::ReadFolder( const OUString& rURL, uno::Reference< XResultSet > xResultSet; Sequence< OUString > aProps(2); OUString* pProps = aProps.getArray(); - pProps[0] = OUString( "Title" ); - pProps[1] = OUString( "IsFolder" ); + pProps[0] = "Title"; + pProps[1] = "IsFolder"; try { diff --git a/svtools/source/dialogs/ServerDetailsControls.cxx b/svtools/source/dialogs/ServerDetailsControls.cxx index 6582b1c137f3..7a4b9fdf1cf1 100644 --- a/svtools/source/dialogs/ServerDetailsControls.cxx +++ b/svtools/source/dialogs/ServerDetailsControls.cxx @@ -95,9 +95,9 @@ void HostDetailsContainer::show( bool bShow ) INetURLObject HostDetailsContainer::getUrl( ) { - OUString sHost = OUString( m_pEDHost->GetText() ).trim( ); + OUString sHost = m_pEDHost->GetText().trim( ); sal_Int64 nPort = m_pEDPort->GetValue(); - OUString sPath = OUString( m_pEDPath->GetText() ).trim( ); + OUString sPath = m_pEDPath->GetText().trim( ); OUString sUrl; if ( !sHost.isEmpty( ) ) @@ -204,9 +204,9 @@ SmbDetailsContainer::SmbDetailsContainer( VclBuilderContainer* pBuilder ) : INetURLObject SmbDetailsContainer::getUrl( ) { - OUString sHost = OUString( m_pEDHost->GetText() ).trim( ); - OUString sShare = OUString( m_pEDShare->GetText() ).trim( ); - OUString sPath = OUString( m_pEDPath->GetText() ).trim( ); + OUString sHost = m_pEDHost->GetText().trim( ); + OUString sShare = m_pEDShare->GetText().trim( ); + OUString sPath = m_pEDPath->GetText().trim( ); OUString sUrl; if ( !sHost.isEmpty( ) ) @@ -287,7 +287,7 @@ CmisDetailsContainer::CmisDetailsContainer( VclBuilderContainer* pBuilder ) : for ( sal_Int32 i = 0; i < aTypesUrlsList.getLength( ) && aTypesNamesList.getLength( ); ++i ) { OUString sUrl = aTypesUrlsList[i]; - if ( !( sUrl == OUString( GDRIVE_BASE_URL ) && bSkipGDrive ) ) + if ( !( sUrl == GDRIVE_BASE_URL && bSkipGDrive ) ) { m_pLBServerType->InsertEntry( aTypesNamesList[i] ); m_aServerTypesURLs.push_back( sUrl ); @@ -297,8 +297,8 @@ CmisDetailsContainer::CmisDetailsContainer( VclBuilderContainer* pBuilder ) : INetURLObject CmisDetailsContainer::getUrl( ) { - OUString sBindingUrl = OUString( m_pEDBinding->GetText() ).trim( ); - OUString sPath = OUString( m_pEDPath->GetText() ).trim( ); + OUString sBindingUrl = m_pEDBinding->GetText().trim( ); + OUString sPath = m_pEDPath->GetText().trim( ); OUString sUrl; if ( !sBindingUrl.isEmpty( ) && !m_sRepoId.isEmpty() ) @@ -337,7 +337,7 @@ bool CmisDetailsContainer::setUrl( const INetURLObject& rUrl ) void CmisDetailsContainer::setUsername( const OUString& rUsername ) { - m_sUsername = OUString( rUsername ); + m_sUsername = rUsername; } void CmisDetailsContainer::selectRepository( ) @@ -359,7 +359,7 @@ IMPL_LINK( CmisDetailsContainer, SelectServerTypeHdl, void *, EMPTYARG ) IMPL_LINK( CmisDetailsContainer, RefreshReposHdl, void *, EMPTYARG ) { - OUString sBindingUrl = OUString( m_pEDBinding->GetText() ).trim( ); + OUString sBindingUrl = m_pEDBinding->GetText().trim( ); // Clean the listbox m_pLBRepository->Clear( ); @@ -380,7 +380,7 @@ IMPL_LINK( CmisDetailsContainer, RefreshReposHdl, void *, EMPTYARG ) // Get the Content ::ucbhelper::Content aCnt( sUrl, m_xCmdEnv, comphelper::getProcessComponentContext() ); Sequence< OUString > aProps( 1 ); - aProps[0] = OUString( "Title" ); + aProps[0] = "Title"; try { diff --git a/svtools/source/dialogs/colrdlg.cxx b/svtools/source/dialogs/colrdlg.cxx index 21a70661dd11..2cc7f72734e1 100644 --- a/svtools/source/dialogs/colrdlg.cxx +++ b/svtools/source/dialogs/colrdlg.cxx @@ -86,7 +86,7 @@ short SvColorDialog::Execute() Sequence< PropertyValue > props( 2 ); props[0].Name = sColor; props[0].Value <<= (sal_Int32) maColor.GetColor(); - props[1].Name = OUString( "Mode" ); + props[1].Name = "Mode"; props[1].Value <<= (sal_Int16) meMode; xPropertyAccess->setPropertyValues( props ); diff --git a/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx index 67e0e1a89dd3..a9e441a6b319 100644 --- a/svtools/source/dialogs/insdlg.cxx +++ b/svtools/source/dialogs/insdlg.cxx @@ -108,7 +108,7 @@ void SvObjectServerList::FillInsertObjects() OUString sReaderService( "com.sun.star.configuration.ConfigurationAccess" ); uno::Sequence< uno::Any > aArguments( 1 ); beans::PropertyValue aPathProp; - aPathProp.Name = OUString( "nodepath" ); + aPathProp.Name = "nodepath"; aPathProp.Value <<= OUString( "/org.openoffice.Office.Embedding/ObjectNames" ); aArguments[0] <<= aPathProp; diff --git a/svtools/source/graphic/descriptor.cxx b/svtools/source/graphic/descriptor.cxx index 16f3e507ff24..47588d84b36e 100644 --- a/svtools/source/graphic/descriptor.cxx +++ b/svtools/source/graphic/descriptor.cxx @@ -186,7 +186,7 @@ uno::Sequence< OUString > GraphicDescriptor::getSupportedServiceNames_Static() { uno::Sequence< OUString > aSeq( 1 ); - aSeq.getArray()[ 0 ] = OUString( "com.sun.star.graphic.GraphicDescriptor" ); + aSeq.getArray()[ 0 ] = "com.sun.star.graphic.GraphicDescriptor"; return aSeq; } @@ -380,7 +380,7 @@ void GraphicDescriptor::_getPropertyValues( const comphelper::PropertyMapEntry** } if( aMimeType.isEmpty() && ( mpGraphic->GetType() != GRAPHIC_NONE ) ) - aMimeType = OUString(MIMETYPE_VCLGRAPHIC ); + aMimeType = MIMETYPE_VCLGRAPHIC; } else aMimeType = maMimeType; diff --git a/svtools/source/graphic/graphic.cxx b/svtools/source/graphic/graphic.cxx index bec4e4f1724b..da0a9deaca39 100644 --- a/svtools/source/graphic/graphic.cxx +++ b/svtools/source/graphic/graphic.cxx @@ -130,7 +130,7 @@ uno::Sequence< OUString > Graphic::getSupportedServiceNames_Static() { uno::Sequence< OUString > aSeq( 1 ); - aSeq.getArray()[ 0 ] = OUString( "com.sun.star.graphic.Graphic" ); + aSeq.getArray()[ 0 ] = "com.sun.star.graphic.Graphic"; return aSeq; } diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx index 8c0be63be0d3..cf5113b5c93f 100644 --- a/svtools/source/graphic/provider.cxx +++ b/svtools/source/graphic/provider.cxx @@ -81,7 +81,7 @@ uno::Sequence< OUString > GraphicProvider::getSupportedServiceNames_Static() { uno::Sequence< OUString > aSeq( 1 ); - aSeq.getArray()[ 0 ] = OUString( "com.sun.star.graphic.GraphicProvider" ); + aSeq.getArray()[ 0 ] = "com.sun.star.graphic.GraphicProvider"; return aSeq; } diff --git a/svtools/source/graphic/renderer.cxx b/svtools/source/graphic/renderer.cxx index 7d687ef96dce..ef397f413053 100644 --- a/svtools/source/graphic/renderer.cxx +++ b/svtools/source/graphic/renderer.cxx @@ -78,7 +78,7 @@ uno::Sequence< OUString > GraphicRendererVCL::getSupportedServiceNames_Static() { uno::Sequence< OUString > aSeq( 1 ); - aSeq.getArray()[ 0 ] = OUString( "com.sun.star.graphic.GraphicRendererVCL" ); + aSeq.getArray()[ 0 ] = "com.sun.star.graphic.GraphicRendererVCL"; return aSeq; } diff --git a/svtools/source/hatchwindow/hatchwindowfactory.cxx b/svtools/source/hatchwindow/hatchwindowfactory.cxx index 7071fd408016..b0f6fd0d02bf 100644 --- a/svtools/source/hatchwindow/hatchwindowfactory.cxx +++ b/svtools/source/hatchwindow/hatchwindowfactory.cxx @@ -32,8 +32,8 @@ using namespace ::com::sun::star; uno::Sequence< OUString > SAL_CALL OHatchWindowFactory::impl_staticGetSupportedServiceNames() { uno::Sequence< OUString > aRet(2); - aRet[0] = OUString( "com.sun.star.embed.HatchWindowFactory" ); - aRet[1] = OUString( "com.sun.star.comp.embed.HatchWindowFactory" ); + aRet[0] = "com.sun.star.embed.HatchWindowFactory"; + aRet[1] = "com.sun.star.comp.embed.HatchWindowFactory"; return aRet; } diff --git a/svtools/source/misc/imageresourceaccess.cxx b/svtools/source/misc/imageresourceaccess.cxx index fe6e4740222e..2490da8ffd7a 100644 --- a/svtools/source/misc/imageresourceaccess.cxx +++ b/svtools/source/misc/imageresourceaccess.cxx @@ -148,7 +148,7 @@ namespace svt // let it create a graphic from the given URL Sequence< PropertyValue > aMediaProperties( 1 ); - aMediaProperties[0].Name = OUString( "URL" ); + aMediaProperties[0].Name = "URL"; aMediaProperties[0].Value <<= _rImageResourceURL; Reference< XGraphic > xGraphic( xProvider->queryGraphic( aMediaProperties ) ); OSL_ENSURE( xGraphic.is(), "GraphicAccess::getImageStream: the provider did not give us a graphic object!" ); @@ -163,9 +163,9 @@ namespace svt ); aMediaProperties.realloc( 2 ); - aMediaProperties[0].Name = OUString( "OutputStream" ); + aMediaProperties[0].Name = "OutputStream"; aMediaProperties[0].Value <<= xBufferAccess; - aMediaProperties[1].Name = OUString( "MimeType" ); + aMediaProperties[1].Name = "MimeType"; aMediaProperties[1].Value <<= OUString( "image/png" ); xProvider->storeGraphic( xGraphic, aMediaProperties ); diff --git a/svtools/source/misc/sampletext.cxx b/svtools/source/misc/sampletext.cxx index 3523383ccfa5..da0c90c0a86c 100644 --- a/svtools/source/misc/sampletext.cxx +++ b/svtools/source/misc/sampletext.cxx @@ -406,7 +406,7 @@ OUString makeShortRepresentativeTextForScript(UScriptCode eScript) break; } case USCRIPT_LATIN: - sSampleText = OUString("Lorem ipsum"); + sSampleText = "Lorem ipsum"; break; default: break; diff --git a/svtools/source/misc/templatefoldercache.cxx b/svtools/source/misc/templatefoldercache.cxx index 447b3b52d905..f7e64fe1aa81 100644 --- a/svtools/source/misc/templatefoldercache.cxx +++ b/svtools/source/misc/templatefoldercache.cxx @@ -609,10 +609,10 @@ namespace svt // create a content for the current folder root Reference< XResultSet > xResultSet; Sequence< OUString > aContentProperties( 4); - aContentProperties[0] = OUString( "Title" ); - aContentProperties[1] = OUString( "DateModified" ); - aContentProperties[2] = OUString( "DateCreated" ); - aContentProperties[3] = OUString( "IsFolder" ); + aContentProperties[0] = "Title"; + aContentProperties[1] = "DateModified"; + aContentProperties[2] = "DateCreated"; + aContentProperties[3] = "IsFolder"; // get the set of sub contents in the folder try diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index 6f86f92264c5..22264ca20331 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -295,16 +295,16 @@ namespace svt { namespace table switch( eObjType ) { case TCTYPE_GRIDCONTROL: - aRetText = OUString( "Grid control" ); + aRetText = "Grid control"; break; case TCTYPE_TABLE: - aRetText = OUString( "Grid conrol" ); + aRetText = "Grid conrol"; break; case TCTYPE_ROWHEADERBAR: - aRetText = OUString( "RowHeaderBar" ); + aRetText = "RowHeaderBar"; break; case TCTYPE_COLUMNHEADERBAR: - aRetText = OUString( "ColumnHeaderBar" ); + aRetText = "ColumnHeaderBar"; break; case TCTYPE_TABLECELL: //the name of the cell constists of column name and row name if defined @@ -338,16 +338,16 @@ namespace svt { namespace table switch( eObjType ) { case TCTYPE_GRIDCONTROL: - aRetText = OUString( "Grid control description" ); + aRetText = "Grid control description"; break; case TCTYPE_TABLE: - aRetText = OUString( "TABLE description" ); + aRetText = "TABLE description"; break; case TCTYPE_ROWHEADERBAR: - aRetText = OUString( "ROWHEADERBAR description" ); + aRetText = "ROWHEADERBAR description"; break; case TCTYPE_COLUMNHEADERBAR: - aRetText = OUString( "COLUMNHEADERBAR description" ); + aRetText = "COLUMNHEADERBAR description"; break; case TCTYPE_TABLECELL: // the description of the cell consists of column name and row name if defined @@ -362,10 +362,10 @@ namespace svt { namespace table } break; case TCTYPE_ROWHEADERCELL: - aRetText = OUString( "ROWHEADERCELL description" ); + aRetText = "ROWHEADERCELL description"; break; case TCTYPE_COLUMNHEADERCELL: - aRetText = OUString( "COLUMNHEADERCELL description" ); + aRetText = "COLUMNHEADERCELL description"; break; } return aRetText; diff --git a/svtools/source/uno/addrtempuno.cxx b/svtools/source/uno/addrtempuno.cxx index 7ae18f496459..1bea46d4ce3c 100644 --- a/svtools/source/uno/addrtempuno.cxx +++ b/svtools/source/uno/addrtempuno.cxx @@ -140,7 +140,7 @@ namespace svt ::comphelper::StringSequence OAddressBookSourceDialogUno::getSupportedServiceNames_Static() throw(RuntimeException) { ::comphelper::StringSequence aSupported(1); - aSupported.getArray()[0] = OUString( "com.sun.star.ui.AddressBookSourceDialog" ); + aSupported.getArray()[0] = "com.sun.star.ui.AddressBookSourceDialog"; return aSupported; } diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx index 465a38e044ee..3722c4d4111c 100644 --- a/svtools/source/uno/toolboxcontroller.cxx +++ b/svtools/source/uno/toolboxcontroller.cxx @@ -359,7 +359,7 @@ throw (::com::sun::star::uno::RuntimeException) Sequence<PropertyValue> aArgs( 1 ); // Provide key modifier information to dispatch function - aArgs[0].Name = OUString( "KeyModifier" ); + aArgs[0].Name = "KeyModifier"; aArgs[0].Value = makeAny( KeyModifier ); aTargetURL.Complete = aCommandURL; diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx index 9a6d60c173eb..16b260b623c0 100644 --- a/svtools/source/uno/treecontrolpeer.cxx +++ b/svtools/source/uno/treecontrolpeer.cxx @@ -1457,7 +1457,7 @@ bool TreeControlPeer::loadImage( const OUString& rURL, Image& rImage ) if( mxGraphicProvider.is() ) try { ::com::sun::star::beans::PropertyValues aProps( 1 ); - aProps[0].Name = OUString( "URL" ); + aProps[0].Name = "URL"; aProps[0].Value <<= rURL; Reference< XGraphic > xGraphic( mxGraphicProvider->queryGraphic( aProps ) ); diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx index 9497710fca03..024d55596be7 100644 --- a/svtools/source/uno/wizard/unowizard.cxx +++ b/svtools/source/uno/wizard/unowizard.cxx @@ -245,7 +245,7 @@ namespace svt { namespace uno Sequence< OUString > SAL_CALL Wizard::getSupportedServiceNames_static() throw(RuntimeException) { Sequence< OUString > aServices(1); - aServices[0] = OUString( "com.sun.star.ui.dialogs.Wizard" ); + aServices[0] = "com.sun.star.ui.dialogs.Wizard"; return aServices; } |