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 /vcl | |
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 'vcl')
-rw-r--r-- | vcl/android/androidinst.cxx | 2 | ||||
-rw-r--r-- | vcl/aqua/source/app/salsys.cxx | 12 | ||||
-rw-r--r-- | vcl/source/app/unohelp.cxx | 4 | ||||
-rw-r--r-- | vcl/source/filter/FilterConfigCache.cxx | 2 | ||||
-rw-r--r-- | vcl/source/filter/FilterConfigItem.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/graph.cxx | 8 | ||||
-rw-r--r-- | vcl/source/gdi/oldprintadaptor.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/print.cxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/print3.cxx | 42 | ||||
-rw-r--r-- | vcl/unx/generic/app/saldisp.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/printer/ppdparser.cxx | 4 | ||||
-rw-r--r-- | vcl/unx/generic/window/salframe.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 4 |
13 files changed, 46 insertions, 46 deletions
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx index c48fa325bae4..a0613650775b 100644 --- a/vcl/android/androidinst.cxx +++ b/vcl/android/androidinst.cxx @@ -255,7 +255,7 @@ public: // Clobber the UI fonts #if 0 psp::FastPrintFontInfo aInfo; - aInfo.m_aFamilyName = OUString( "Roboto" ); + aInfo.m_aFamilyName = "Roboto"; aInfo.m_eItalic = ITALIC_NORMAL; aInfo.m_eWeight = WEIGHT_NORMAL; aInfo.m_eWidth = WIDTH_NORMAL; diff --git a/vcl/aqua/source/app/salsys.cxx b/vcl/aqua/source/app/salsys.cxx index 6914865badbc..3cfcb3c1fe94 100644 --- a/vcl/aqua/source/app/salsys.cxx +++ b/vcl/aqua/source/app/salsys.cxx @@ -88,12 +88,12 @@ static NSString* getStandardString( int nButtonId, bool bUseResources ) { switch( nButtonId ) { - case BUTTON_OK: aText = OUString( "OK" );break; - case BUTTON_ABORT: aText = OUString( "Abort" );break; - case BUTTON_CANCEL: aText = OUString( "Cancel" );break; - case BUTTON_RETRY: aText = OUString( "Retry" );break; - case BUTTON_YES: aText = OUString( "Yes" );break; - case BUTTON_NO : aText = OUString( "No" );break; + case BUTTON_OK: aText = "OK";break; + case BUTTON_ABORT: aText = "Abort";break; + case BUTTON_CANCEL: aText = "Cancel";break; + case BUTTON_RETRY: aText = "Retry";break; + case BUTTON_YES: aText = "Yes";break; + case BUTTON_NO : aText = "No";break; } } return aText.isEmpty() ? nil : CreateNSString( aText); diff --git a/vcl/source/app/unohelp.cxx b/vcl/source/app/unohelp.cxx index e5187c1d1dcc..d5e4e0838b25 100644 --- a/vcl/source/app/unohelp.cxx +++ b/vcl/source/app/unohelp.cxx @@ -58,9 +58,9 @@ OUString vcl::unohelper::CreateLibraryName( const sal_Char* pModName, sal_Bool b { aLibName += aDLLSuffix; } - aLibName += OUString( ".dll" ); + aLibName += ".dll"; #else - aLibName = OUString( "lib" ); + aLibName = "lib"; aLibName += OUString::createFromAscii( pModName ); if ( bSUPD ) { diff --git a/vcl/source/filter/FilterConfigCache.cxx b/vcl/source/filter/FilterConfigCache.cxx index b2da4d8ed730..217888ee1b6c 100644 --- a/vcl/source/filter/FilterConfigCache.cxx +++ b/vcl/source/filter/FilterConfigCache.cxx @@ -132,7 +132,7 @@ Reference< XInterface > openConfig(const char* sPackage) PropertyValue aParam ; // define cfg path for open - aParam.Name = OUString( "nodepath" ); + aParam.Name = "nodepath"; if (rtl_str_compareIgnoreAsciiCase(sPackage, "types") == 0) aParam.Value <<= OUString( "/org.openoffice.TypeDetection.Types/Types" ); if (rtl_str_compareIgnoreAsciiCase(sPackage, "filters") == 0) diff --git a/vcl/source/filter/FilterConfigItem.cxx b/vcl/source/filter/FilterConfigItem.cxx index f63963527666..3e7ca7f12dbc 100644 --- a/vcl/source/filter/FilterConfigItem.cxx +++ b/vcl/source/filter/FilterConfigItem.cxx @@ -59,7 +59,7 @@ static bool ImpIsTreeAvailable( Reference< XMultiServiceFactory >& rXCfgProv, co // creation arguments: nodepath PropertyValue aPathArgument; - aPathArgument.Name = OUString( "nodepath" ); + aPathArgument.Name = "nodepath"; aPathArgument.Value = aAny; Sequence< Any > aArguments( 1 ); @@ -124,14 +124,14 @@ void FilterConfigItem::ImpInitTree( const OUString& rSubTree ) // creation arguments: nodepath PropertyValue aPathArgument; aAny <<= sTree; - aPathArgument.Name = OUString( "nodepath" ); + aPathArgument.Name = "nodepath"; aPathArgument.Value = aAny; // creation arguments: commit mode PropertyValue aModeArgument; sal_Bool bAsyncron = sal_True; aAny <<= bAsyncron; - aModeArgument.Name = OUString( "lazywrite" ); + aModeArgument.Name = "lazywrite"; aModeArgument.Value = aAny; Sequence< Any > aArguments( 2 ); diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index e6d46e7cd578..ccdb11261f11 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -390,11 +390,11 @@ uno::Reference< graphic::XGraphic > Graphic::GetXGraphic() const uno::Reference < uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); uno::Reference< graphic::XGraphicProvider > xProv( graphic::GraphicProvider::create( xContext ) ); - uno::Sequence< beans::PropertyValue > aLoadProps( 1 ); - OUString aURL( "private:memorygraphic/" ); + uno::Sequence< beans::PropertyValue > aLoadProps( 1 ); + OUString aURL = "private:memorygraphic/" + OUString::number( reinterpret_cast< sal_Int64 >( this ) ); - aLoadProps[ 0 ].Name = OUString( "URL" ); - aLoadProps[ 0 ].Value <<= ( aURL += OUString::number( reinterpret_cast< sal_Int64 >( this ) ) ); + aLoadProps[ 0 ].Name = "URL"; + aLoadProps[ 0 ].Value <<= aURL; xRet = xProv->queryGraphic( aLoadProps ); } diff --git a/vcl/source/gdi/oldprintadaptor.cxx b/vcl/source/gdi/oldprintadaptor.cxx index ca0cc5cd556c..9ac3839b9238 100644 --- a/vcl/source/gdi/oldprintadaptor.cxx +++ b/vcl/source/gdi/oldprintadaptor.cxx @@ -87,7 +87,7 @@ int OldStylePrintAdaptor::getPageCount() const Sequence< PropertyValue > OldStylePrintAdaptor::getPageParameters( int i_nPage ) const { Sequence< PropertyValue > aRet( 1 ); - aRet[0].Name = OUString( "PageSize" ); + aRet[0].Name = "PageSize"; if( i_nPage < int(mpData->maPages.size() ) ) aRet[0].Value = makeAny( mpData->maPages[i_nPage].maPageSize ); else diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index f5ce429bbd52..7b06e67f0c8a 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -151,7 +151,7 @@ bool PrinterOptions::ReadFromConfig( bool i_bFile ) Sequence< Any > aArgs(1); PropertyValue aVal; - aVal.Name = OUString( "nodepath" ); + aVal.Name = "nodepath"; if( i_bFile ) aVal.Value <<= OUString( "/org.openoffice.Office.Common/Print/Option/File" ); else diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index f08bb250d8b2..ad2329c1108e 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -1378,7 +1378,7 @@ Sequence< PropertyValue > PrinterController::getJobProperties( const Sequence< P if( aMergeSet.find( OUString( "IsFirstPage" ) ) == aMergeSet.end() ) { PropertyValue aVal; - aVal.Name = OUString( "IsFirstPage" ); + aVal.Name = "IsFirstPage"; aVal.Value <<= mpImplData->mbFirstPage; aResult[nCur++] = aVal; } @@ -1386,7 +1386,7 @@ Sequence< PropertyValue > PrinterController::getJobProperties( const Sequence< P if( aMergeSet.find( OUString( "IsLastPage" ) ) == aMergeSet.end() ) { PropertyValue aVal; - aVal.Name = OUString( "IsLastPage" ); + aVal.Name = "IsLastPage"; aVal.Value <<= mpImplData->mbLastPage; aResult[nCur++] = aVal; } @@ -1394,7 +1394,7 @@ Sequence< PropertyValue > PrinterController::getJobProperties( const Sequence< P if( aMergeSet.find( OUString( "IsPrinter" ) ) == aMergeSet.end() ) { PropertyValue aVal; - aVal.Name = OUString( "IsPrinter" ); + aVal.Name = "IsPrinter"; aVal.Value <<= sal_True; aResult[nCur++] = aVal; } @@ -1817,7 +1817,7 @@ void PrinterOptionsHelper::appendPrintUIOptions( uno::Sequence< beans::PropertyV sal_Int32 nIndex = io_rProps.getLength(); io_rProps.realloc( nIndex+1 ); PropertyValue aVal; - aVal.Name = OUString( "ExtraPrintUIOptions" ); + aVal.Name = "ExtraPrintUIOptions"; aVal.Value = makeAny( m_aUIProperties ); io_rProps[ nIndex ] = aVal; } @@ -1853,51 +1853,51 @@ Any PrinterOptionsHelper::setUIControlOpt(const com::sun::star::uno::Sequence< O sal_Int32 nUsed = 0; if( !i_rTitle.isEmpty() ) { - aCtrl[nUsed ].Name = OUString( "Text" ); + aCtrl[nUsed ].Name = "Text"; aCtrl[nUsed++].Value = makeAny( i_rTitle ); } if( i_rHelpIds.getLength() ) { - aCtrl[nUsed ].Name = OUString( "HelpId" ); + aCtrl[nUsed ].Name = "HelpId"; aCtrl[nUsed++].Value = makeAny( i_rHelpIds ); } - aCtrl[nUsed ].Name = OUString( "ControlType" ); + aCtrl[nUsed ].Name = "ControlType"; aCtrl[nUsed++].Value = makeAny( i_rType ); - aCtrl[nUsed ].Name = OUString( "ID" ); + aCtrl[nUsed ].Name = "ID"; aCtrl[nUsed++].Value = makeAny( i_rIDs ); if( i_pVal ) { - aCtrl[nUsed ].Name = OUString( "Property" ); + aCtrl[nUsed ].Name = "Property"; aCtrl[nUsed++].Value = makeAny( *i_pVal ); } if( !i_rControlOptions.maDependsOnName.isEmpty() ) { - aCtrl[nUsed ].Name = OUString( "DependsOnName" ); + aCtrl[nUsed ].Name = "DependsOnName"; aCtrl[nUsed++].Value = makeAny( i_rControlOptions.maDependsOnName ); if( i_rControlOptions.mnDependsOnEntry != -1 ) { - aCtrl[nUsed ].Name = OUString( "DependsOnEntry" ); + aCtrl[nUsed ].Name = "DependsOnEntry"; aCtrl[nUsed++].Value = makeAny( i_rControlOptions.mnDependsOnEntry ); } if( i_rControlOptions.mbAttachToDependency ) { - aCtrl[nUsed ].Name = OUString( "AttachToDependency" ); + aCtrl[nUsed ].Name = "AttachToDependency"; aCtrl[nUsed++].Value = makeAny( i_rControlOptions.mbAttachToDependency ); } } if( !i_rControlOptions.maGroupHint.isEmpty() ) { - aCtrl[nUsed ].Name = OUString( "GroupingHint" ); + aCtrl[nUsed ].Name = "GroupingHint"; aCtrl[nUsed++].Value <<= i_rControlOptions.maGroupHint; } if( i_rControlOptions.mbInternalOnly ) { - aCtrl[nUsed ].Name = OUString( "InternalUIOnly" ); + aCtrl[nUsed ].Name = "InternalUIOnly"; aCtrl[nUsed++].Value <<= sal_True; } if( ! i_rControlOptions.mbEnabled ) { - aCtrl[nUsed ].Name = OUString( "Enabled" ); + aCtrl[nUsed ].Name = "Enabled"; aCtrl[nUsed++].Value <<= sal_False; } @@ -1974,11 +1974,11 @@ Any PrinterOptionsHelper::setChoiceRadiosControlOpt(const com::sun::star::uno::S UIControlOptions aOpt( i_rControlOptions ); sal_Int32 nUsed = aOpt.maAddProps.getLength(); aOpt.maAddProps.realloc( nUsed + 1 + (i_rDisabledChoices.getLength() ? 1 : 0) ); - aOpt.maAddProps[nUsed].Name = OUString( "Choices" ); + aOpt.maAddProps[nUsed].Name = "Choices"; aOpt.maAddProps[nUsed].Value = makeAny( i_rChoices ); if( i_rDisabledChoices.getLength() ) { - aOpt.maAddProps[nUsed+1].Name = OUString( "ChoicesDisabled" ); + aOpt.maAddProps[nUsed+1].Name = "ChoicesDisabled"; aOpt.maAddProps[nUsed+1].Value = makeAny( i_rDisabledChoices ); } @@ -2000,11 +2000,11 @@ Any PrinterOptionsHelper::setChoiceListControlOpt(const OUString& i_rID, UIControlOptions aOpt( i_rControlOptions ); sal_Int32 nUsed = aOpt.maAddProps.getLength(); aOpt.maAddProps.realloc( nUsed + 1 + (i_rDisabledChoices.getLength() ? 1 : 0) ); - aOpt.maAddProps[nUsed].Name = OUString( "Choices" ); + aOpt.maAddProps[nUsed].Name = "Choices"; aOpt.maAddProps[nUsed].Value = makeAny( i_rChoices ); if( i_rDisabledChoices.getLength() ) { - aOpt.maAddProps[nUsed+1].Name = OUString( "ChoicesDisabled" ); + aOpt.maAddProps[nUsed+1].Name = "ChoicesDisabled"; aOpt.maAddProps[nUsed+1].Value = makeAny( i_rDisabledChoices ); } @@ -2030,9 +2030,9 @@ Any PrinterOptionsHelper::setRangeControlOpt(const OUString& i_rID, { sal_Int32 nUsed = aOpt.maAddProps.getLength(); aOpt.maAddProps.realloc( nUsed + 2 ); - aOpt.maAddProps[nUsed ].Name = OUString( "MinValue" ); + aOpt.maAddProps[nUsed ].Name = "MinValue"; aOpt.maAddProps[nUsed++].Value = makeAny( i_nMinValue ); - aOpt.maAddProps[nUsed ].Name = OUString( "MaxValue" ); + aOpt.maAddProps[nUsed ].Name = "MaxValue"; aOpt.maAddProps[nUsed++].Value = makeAny( i_nMaxValue ); } diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index a068967b79ef..bb8772411dcf 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -704,7 +704,7 @@ OUString SalDisplay::GetKeyNameFromKeySym( KeySym nKeySym ) const if( aKeyCode != 0 && aKeyCode != NoSymbol ) { if( !nKeySym ) - aRet = OUString( "???" ); + aRet = "???"; else { aRet = ::vcl_sal::getKeysymReplacementName( aLang, nKeySym ); diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index b29b8645f5fe..8a6a0a40dcdf 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -421,7 +421,7 @@ void PPDParser::scanPPDDir( const OUString& rDir ) { OUString aFileURL, aFileName; osl::FileStatus::Type eType = osl::FileStatus::Unknown; - OUString aURL = OUString(rDir + "/" + aStatus.getFileName()); + OUString aURL = rDir + "/" + aStatus.getFileName(); if(resolveLink( aURL, aFileURL, aFileName, eType ) == osl::FileBase::E_None) { @@ -1972,7 +1972,7 @@ int PPDContext::getRenderResolution() const void PPDContext::getPageSize( OUString& rPaper, int& rWidth, int& rHeight ) const { // initialize to reasonable default, if parser is not set - rPaper = OUString( "A4" ); + rPaper = "A4"; rWidth = 595; rHeight = 842; if( m_pParser ) diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index 3255f859c776..ee04b72a6c27 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -2964,7 +2964,7 @@ void X11SalFrame::beginUnicodeSequence() if( !rSeq.isEmpty() ) endUnicodeSequence(); - rSeq = OUString( "u" ); + rSeq = "u"; if( ! aDeleteWatch.isDeleted() ) { diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx index 184741946556..dc9c889849c7 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx @@ -932,7 +932,7 @@ uno::Sequence<OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles() throw( uno if( !bExtensionTypedIn && ( sToken != "*" ) ) { //if the filename does not already have the auto extension, stick it on - OUString sExtension = OUString( "." ) + sToken; + OUString sExtension = "." + sToken; OUString &rBase = aSelectedFiles[nIndex]; sal_Int32 nExtensionIdx = rBase.getLength() - sExtension.getLength(); OSL_TRACE( "idx are %d %d", rBase.lastIndexOf( sExtension ), nExtensionIdx ); @@ -1527,7 +1527,7 @@ void SalGtkFilePicker::implChangeType( GtkTreeSelection *selection ) { gchar *title; gtk_tree_model_get (model, &iter, 2, &title, -1); - aLabel += OUString( ": " ); + aLabel += ": "; aLabel += OUString( title, strlen(title), RTL_TEXTENCODING_UTF8 ); g_free (title); } |