diff options
author | Szabolcs Dezsi <dezsiszabi@hotmail.com> | 2012-04-06 19:49:53 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2012-04-06 20:03:42 +0200 |
commit | d6bc02f8c4cd0f50f0a2631ac7634dab408efc1f (patch) | |
tree | b5a12df1fcae025715633469b75ab4c9b6f6d279 /vcl/unx | |
parent | 0e1c0587617e0a6e4295a13599e97cdf6d1d2ea9 (diff) |
Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/desktopdetect/desktopdetector.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/generic/plugadapt/salplug.cxx | 8 | ||||
-rw-r--r-- | vcl/unx/gtk/app/gtkdata.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/kde/kdedata.cxx | 2 | ||||
-rw-r--r-- | vcl/unx/kde4/KDEXLib.cxx | 2 |
7 files changed, 8 insertions, 12 deletions
diff --git a/vcl/unx/generic/desktopdetect/desktopdetector.cxx b/vcl/unx/generic/desktopdetect/desktopdetector.cxx index 1e4636ee69a8..f69f2dee6491 100644 --- a/vcl/unx/generic/desktopdetect/desktopdetector.cxx +++ b/vcl/unx/generic/desktopdetect/desktopdetector.cxx @@ -263,7 +263,7 @@ DESKTOP_DETECTOR_PUBLIC DesktopType get_desktop_environment() for( int i = 0; i < nParams; i++ ) { rtl_getAppCommandArg( i, &aParam.pData ); - if( i < nParams-1 && (aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-display" ) ) || aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "--display" ) )) ) + if( i < nParams-1 && (aParam == "-display" || aParam == "--display" ) ) { osl_getCommandArg( i+1, &aParam.pData ); aBParm = OUStringToOString( aParam, osl_getThreadTextEncoding() ); diff --git a/vcl/unx/generic/plugadapt/salplug.cxx b/vcl/unx/generic/plugadapt/salplug.cxx index b92c8c750e21..d2400d7f857b 100644 --- a/vcl/unx/generic/plugadapt/salplug.cxx +++ b/vcl/unx/generic/plugadapt/salplug.cxx @@ -98,10 +98,7 @@ static SalInstance* tryInstance( const OUString& rModuleBase, bool bForce = fals * #i109007# KDE3 seems to have the same problem. * And same applies for KDE4. */ - if( rModuleBase.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("gtk")) || - rModuleBase.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("gtk3")) || - rModuleBase.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("kde")) || - rModuleBase.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("kde4")) ) + if( rModuleBase == "gtk" || rModuleBase == "gtk3" || rModuleBase == "kde" || rModuleBase == "kde4" ) { pCloseModule = NULL; } @@ -216,8 +213,7 @@ static SalInstance* check_headless_plugin() for( int i = 0; i < nParams; i++ ) { osl_getCommandArg( i, &aParam.pData ); - if( aParam.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("-headless")) || - aParam.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("--headless")) ) + if( aParam == "-headless" || aParam == "--headless" ) { return tryInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "svp" ) ) ); } diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx index 3b62677af45b..776313b04b48 100644 --- a/vcl/unx/gtk/app/gtkdata.cxx +++ b/vcl/unx/gtk/app/gtkdata.cxx @@ -642,7 +642,7 @@ void GtkData::Init() osl_getCommandArg(i, &aParam.pData ); OString aBParam( OUStringToOString( aParam, aEnc ) ); - if( aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-display" ) ) || aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "--display" ) ) ) + if( aParam == "-display" || aParam == "--display" ) { pCmdLineAry[i+1] = g_strdup( "--display" ); osl_getCommandArg(i+1, &aParam.pData ); diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx index c363d5f25f92..4ee951282fcc 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx @@ -922,7 +922,7 @@ uno::Sequence<rtl::OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles() throw } while( nTokenIndex >= 0 ); - if( !bExtensionTypedIn && ( !sToken.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("*")) ) ) + if( !bExtensionTypedIn && ( sToken != "*" ) ) { //if the filename does not already have the auto extension, stick it on OUString sExtension = OUString(RTL_CONSTASCII_USTRINGPARAM( "." )) + sToken; diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx index 0b723e1c099d..447ca9228f5e 100644 --- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx @@ -439,7 +439,7 @@ void GtkData::initNWF( void ) (char *)NULL); pSVData->maNWFData.mnMenuFormatExtraBorder = horizontal_padding; - if( SalGetDesktopEnvironment().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("KDE")) ) + if( SalGetDesktopEnvironment() == "KDE" ) { // #i97196# ensure a widget exists and the style engine was loaded NWEnsureGTKButton( SalX11Screen( 0 ) ); diff --git a/vcl/unx/kde/kdedata.cxx b/vcl/unx/kde/kdedata.cxx index d1086b8ee04d..d66e22719784 100644 --- a/vcl/unx/kde/kdedata.cxx +++ b/vcl/unx/kde/kdedata.cxx @@ -143,7 +143,7 @@ void KDEXLib::Init() for ( nIdx = 0; nIdx < nParams; ++nIdx ) { osl_getCommandArg( nIdx, &aParam.pData ); - if ( !m_pFreeCmdLineArgs && aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-display" ) ) && nIdx + 1 < nParams ) + if ( !m_pFreeCmdLineArgs && aParam == "-display" && nIdx + 1 < nParams ) { osl_getCommandArg( nIdx + 1, &aParam.pData ); aDisplay = rtl::OUStringToOString( aParam, osl_getThreadTextEncoding() ); diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx index 23822b1768f7..658eebb48cf6 100644 --- a/vcl/unx/kde4/KDEXLib.cxx +++ b/vcl/unx/kde4/KDEXLib.cxx @@ -136,7 +136,7 @@ void KDEXLib::Init() for ( nIdx = 0; nIdx < nParams; ++nIdx ) { osl_getCommandArg( nIdx, &aParam.pData ); - if ( !m_pFreeCmdLineArgs && aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-display" ) ) && nIdx + 1 < nParams ) + if ( !m_pFreeCmdLineArgs && aParam == "-display" && nIdx + 1 < nParams ) { osl_getCommandArg( nIdx + 1, &aParam.pData ); aDisplay = rtl::OUStringToOString( aParam, osl_getThreadTextEncoding() ); |