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 | |
parent | I suspect the logic is supposed to be the other way around. (diff) | |
download | core-d6bc02f8c4cd0f50f0a2631ac7634dab408efc1f.tar.gz core-d6bc02f8c4cd0f50f0a2631ac7634dab408efc1f.zip |
Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/gdi/pdfwriter_impl.cxx | 4 | ||||
-rw-r--r-- | vcl/source/gdi/pngwrite.cxx | 6 | ||||
-rw-r--r-- | vcl/source/window/printdlg.cxx | 19 | ||||
-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 | ||||
-rw-r--r-- | vcl/workben/outdevgrind.cxx | 3 |
11 files changed, 20 insertions, 32 deletions
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index ccbaa632619d..243d728b03ad 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -11508,7 +11508,7 @@ void PDFWriterImpl::ensureUniqueRadioOnValues() int nKidIndex = rGroupWidget.m_aKidsIndex[nKid]; PDFWidget& rKid = m_aWidgets[nKidIndex]; rKid.m_aOnValue = OUString::valueOf( sal_Int32(nKid+1) ); - if( ! rKid.m_aValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Off" ) ) ) + if( rKid.m_aValue != "Off" ) rKid.m_aValue = rKid.m_aOnValue; } } @@ -11535,7 +11535,7 @@ void PDFWriterImpl::ensureUniqueRadioOnValues() #endif } // update selected radio button - if( ! rKid.m_aValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Off" ) ) ) + if( rKid.m_aValue != "Off" ) { rGroupWidget.m_aValue = rKid.m_aValue; } diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx index 3e828dab3f84..3d8de49003c8 100644 --- a/vcl/source/gdi/pngwrite.cxx +++ b/vcl/source/gdi/pngwrite.cxx @@ -141,11 +141,11 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx, sal_Int32 i = 0; for ( i = 0; i < pFilterData->getLength(); i++ ) { - if ( (*pFilterData)[ i ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Compression" ) ) ) + if ( (*pFilterData)[ i ].Name == "Compression" ) (*pFilterData)[ i ].Value >>= mnCompLevel; - else if ( (*pFilterData)[ i ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Interlaced" ) ) ) + else if ( (*pFilterData)[ i ].Name == "Interlaced" ) (*pFilterData)[ i ].Value >>= mnInterlaced; - else if ( (*pFilterData)[ i ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MaxChunkSize" ) ) ) + else if ( (*pFilterData)[ i ].Name == "MaxChunkSize" ) { sal_Int32 nVal = 0; if ( (*pFilterData)[ i ].Value >>= nVal ) diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 89bc71ca5163..ddbbc76d3a3b 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -1185,7 +1185,7 @@ void PrintDialog::setupOptionalUI() bool bSwitchPage = false; if( !aGroupingHint.isEmpty() ) bSwitchPage = true; - else if( aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Subgroup" ) ) || (bOnStaticPage && ! bSubgroupOnStaticPage ) ) + else if( aCtrlType == "Subgroup" || (bOnStaticPage && ! bSubgroupOnStaticPage ) ) bSwitchPage = true; if( bSwitchPage ) { @@ -1230,8 +1230,7 @@ void PrintDialog::setupOptionalUI() } } - if( aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Group" ) ) || - ( ! pCurParent && ! (bOnStaticPage || !aGroupingHint.isEmpty() ) ) ) + if( aCtrlType == "Group" || ( ! pCurParent && ! (bOnStaticPage || !aGroupingHint.isEmpty() ) ) ) { // add new tab page TabPage* pNewGroup = new TabPage( &maTabCtrl ); @@ -1285,10 +1284,7 @@ void PrintDialog::setupOptionalUI() pIndent->setChild( pCurColumn ); } // EVIL - else if( aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Bool" ) ) && - aGroupingHint.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "LayoutPage" ) ) && - aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PrintProspect" ) ) - ) + else if( aCtrlType == "Bool" && aGroupingHint == "LayoutPage" && aPropertyName == "PrintProspect" ) { maNUpPage.maBrochureBtn.SetText( aText ); maNUpPage.maBrochureBtn.Show(); @@ -1331,7 +1327,7 @@ void PrintDialog::setupOptionalUI() } } } - if( aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Bool" ) ) && pCurParent ) + if( aCtrlType == "Bool" && pCurParent ) { // add a check box CheckBox* pNewBox = new CheckBox( pCurParent ); @@ -1361,7 +1357,7 @@ void PrintDialog::setupOptionalUI() // add checkbox to current column pDependencyRow->addWindow( pNewBox ); } - else if( aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Radio" ) ) && pCurParent ) + else if( aCtrlType == "Radio" && pCurParent ) { sal_Int32 nCurHelpText = 0; boost::shared_ptr<vcl::RowOrColumn> pRadioColumn( pCurColumn ); @@ -1421,10 +1417,7 @@ void PrintDialog::setupOptionalUI() pLabel->setLabel( pBtn ); } } - else if( ( aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "List" ) ) || - aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Range" ) ) || - aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Edit" ) ) - ) && pCurParent ) + else if( ( aCtrlType == "List" || aCtrlType == "Range" || aCtrlType == "Edit" ) && pCurParent ) { // create a row in the current column boost::shared_ptr<vcl::RowOrColumn> pFieldColumn( new vcl::RowOrColumn( pCurColumn.get(), false ) ); 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() ); diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx index ab9b6cd51198..9d1d3de27ff3 100644 --- a/vcl/workben/outdevgrind.cxx +++ b/vcl/workben/outdevgrind.cxx @@ -919,8 +919,7 @@ int GrindApp::Main() { ::rtl::OUString aParam = GetCommandLineParam( i ); - if( aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "--help" ) ) || - aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-h" ) ) ) + if( aParam == "--help" || aParam == "-h" ) bHelp = true; } |