diff options
author | Szabolcs Dezsi <dezsiszabi@hotmail.com> | 2012-04-06 15:05:52 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2012-04-06 15:07:41 +0200 |
commit | 743f22045c4ec08c46c259fc0ba240194a391457 (patch) | |
tree | faed42bb31c4ee767619eb5c3ebd4dec0a41fa03 /dbaccess | |
parent | 0c6ebe5d225d6a655f078977455cec6d0a3afa6e (diff) |
Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Pattern used:
find . -name "*.cxx" -exec sed -i 's/\( *\)\(else if\|if\) *( *\([^!()|&]*\)\.equalsAsciiL( *RTL_CONSTASCII_STRINGPARAM *( *\([^)]*\)) *) *)$/\1\2 ( \3 == \4 )/' \{\} \;
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/dataaccess/ContentHelper.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/misc/DatabaseDataProvider.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlDataSource.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlExport.cxx | 10 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppController.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/control/toolboxcontroller.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/dsmeta.cxx | 4 |
7 files changed, 19 insertions, 19 deletions
diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx index 608334026190..8e959d9cae65 100644 --- a/dbaccess/source/core/dataaccess/ContentHelper.cxx +++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx @@ -322,7 +322,7 @@ void SAL_CALL OContentHelper::initialize( const Sequence< Any >& _aArguments ) t for(;pBegin != pEnd;++pBegin) { *pBegin >>= aValue; - if ( aValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Parent")) ) + if ( aValue.Name == "Parent" ) { m_xParentContainer.set(aValue.Value,UNO_QUERY); } diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx index 36fa23690f76..255fd9339247 100644 --- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx +++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx @@ -177,21 +177,21 @@ void SAL_CALL DatabaseDataProvider::initialize(const uno::Sequence< uno::Any > & const beans::PropertyValue* pArgEnd = pArgIter + _aArguments.getLength(); for(;pArgIter != pArgEnd;++pArgIter) { - if ( pArgIter->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DataRowSource")) ) + if ( pArgIter->Name == "DataRowSource" ) { ::com::sun::star::chart::ChartDataRowSource eRowSource = ::com::sun::star::chart::ChartDataRowSource_COLUMNS; pArgIter->Value >>= eRowSource; if ( eRowSource != ::com::sun::star::chart::ChartDataRowSource_COLUMNS ) return sal_False; } - else if ( pArgIter->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("CellRangeRepresentation")) ) + else if ( pArgIter->Name == "CellRangeRepresentation" ) { ::rtl::OUString sRange; pArgIter->Value >>= sRange; if ( !sRange.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("all")) ) return sal_False; } - else if ( pArgIter->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("FirstCellAsLabel")) ) + else if ( pArgIter->Name == "FirstCellAsLabel" ) { sal_Bool bFirstCellAsLabel = sal_True; pArgIter->Value >>= bFirstCellAsLabel; diff --git a/dbaccess/source/filter/xml/xmlDataSource.cxx b/dbaccess/source/filter/xml/xmlDataSource.cxx index c2130d19efec..1ae1ad36f302 100644 --- a/dbaccess/source/filter/xml/xmlDataSource.cxx +++ b/dbaccess/source/filter/xml/xmlDataSource.cxx @@ -144,13 +144,13 @@ OXMLDataSource::OXMLDataSource( ODBFilter& rImport, break; case XML_TOK_BOOLEAN_COMPARISON_MODE: aProperty.Name = PROPERTY_BOOLEANCOMPARISONMODE; - if ( sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("equal-integer")) ) + if ( sValue == "equal-integer" ) aProperty.Value <<= sal_Int32(0); - else if ( sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("is-boolean")) ) + else if ( sValue == "is-boolean" ) aProperty.Value <<= sal_Int32(1); - else if ( sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("equal-boolean")) ) + else if ( sValue == "equal-boolean" ) aProperty.Value <<= sal_Int32(2); - else if ( sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("equal-use-only-zero")) ) + else if ( sValue == "equal-use-only-zero" ) aProperty.Value <<= sal_Int32(3); break; case XML_TOK_USE_CATALOG: diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx index 06ad47712ed4..ca93c9007269 100644 --- a/dbaccess/source/filter/xml/xmlExport.cxx +++ b/dbaccess/source/filter/xml/xmlExport.cxx @@ -402,15 +402,15 @@ void ODBExport::exportDataSource() { sal_Int32 nValue = 0; aValue >>= nValue; - if ( sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("0")) ) + if ( sValue == "0" ) sValue = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("equal-integer")); - else if ( sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("1")) ) + else if ( sValue == "1" ) sValue = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("is-boolean")); - else if ( sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("2")) ) + else if ( sValue == "2" ) sValue = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("equal-boolean")); - else if ( sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("3")) ) + else if ( sValue == "3" ) sValue = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("equal-use-only-zero")); - if ( sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("equal-integer")) ) + if ( sValue == "equal-integer" ) continue; eToken = XML_BOOLEAN_COMPARISON_MODE; } diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index bc059d3d317d..d2c7266a6f35 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -1114,7 +1114,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa const PropertyValue* pEnd = pIter + aArgs.getLength(); for( ; pIter != pEnd ; ++pIter) { - if ( pIter->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("FormatStringId")) ) + if ( pIter->Name == "FormatStringId" ) { SotFormatStringId nFormatId = 0; if ( pIter->Value >>= nFormatId ) @@ -2886,7 +2886,7 @@ void SAL_CALL OApplicationController::removeSelectionChangeListener( const Refer const NamedValue* pEnd = pIter + aCurrentSelection.getLength(); for(;pIter != pEnd;++pIter) { - if ( pIter->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Type")) ) + if ( pIter->Name == "Type" ) { sal_Int32 nType = 0; pIter->Value >>= nType; @@ -2894,7 +2894,7 @@ void SAL_CALL OApplicationController::removeSelectionChangeListener( const Refer throw IllegalArgumentException(); eType = static_cast< ElementType >( nType ); } - else if ( pIter->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Selection")) ) + else if ( pIter->Name == "Selection" ) pIter->Value >>= aSelection; } diff --git a/dbaccess/source/ui/control/toolboxcontroller.cxx b/dbaccess/source/ui/control/toolboxcontroller.cxx index 3ecb7d9ebdbd..cd01aa152794 100644 --- a/dbaccess/source/ui/control/toolboxcontroller.cxx +++ b/dbaccess/source/ui/control/toolboxcontroller.cxx @@ -112,7 +112,7 @@ namespace dbaui SolarMutexGuard aSolarMutexGuard; ::osl::MutexGuard aGuard(m_aMutex); - if ( m_aCommandURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".uno:DBNewForm")) ) + if ( m_aCommandURL == ".uno:DBNewForm" ) { m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:DBNewForm")) ,sal_True)); m_aStates.insert(TCommandState::value_type(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:DBNewView")) ,sal_True)); diff --git a/dbaccess/source/ui/misc/dsmeta.cxx b/dbaccess/source/ui/misc/dsmeta.cxx index afc4f109f0ab..0d7828fd457f 100644 --- a/dbaccess/source/ui/misc/dsmeta.cxx +++ b/dbaccess/source/ui/misc/dsmeta.cxx @@ -153,9 +153,9 @@ namespace dbaui { ::rtl::OUString sAuth; aMetaData.get("Authentication") >>= sAuth; - if ( sAuth.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("UserPassword")) ) + if ( sAuth == "UserPassword" ) aInit = AuthUserPwd; - else if ( sAuth.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Password")) ) + else if ( sAuth == "Password" ) aInit = AuthPwd; } s_aSupport.insert(Supported::value_type(*pIter,aInit)); |