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 /dbaccess | |
parent | 0e1c0587617e0a6e4295a13599e97cdf6d1d2ea9 (diff) |
Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/KeySet.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/connection.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/databasedocument.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/definitioncontainer.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/documenteventexecutor.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/core/misc/DatabaseDataProvider.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/recovery/dbdocrecovery.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/recovery/settingsimport.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ext/macromigration/migrationengine.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/dbloader2.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlColumn.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlDataSourceSetting.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlQuery.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlServerDatabase.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlTable.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/WCopyTable.cxx | 2 |
16 files changed, 22 insertions, 32 deletions
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index 8fb0d6ac9103..fe3a2b1c1e7a 100644 --- a/dbaccess/source/core/api/KeySet.cxx +++ b/dbaccess/source/core/api/KeySet.cxx @@ -360,7 +360,7 @@ void OKeySet::executeStatement(::rtl::OUStringBuffer& io_aFilter,const ::rtl::OU for(;pAnd != pAndEnd;++pAnd) { ::rtl::OUString sValue; - if ( !(pAnd->Value >>= sValue) || !(sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("?")) || sValue.matchAsciiL(":",1,0)) ) + if ( !(pAnd->Value >>= sValue) || !( sValue == "?" || sValue.matchAsciiL( ":",1,0 ) ) ) { // we have a criteria which has to be taken into account for updates m_aFilterColumns.push_back(pAnd->Name); } diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx index e80093ebc464..2e69373e0a01 100644 --- a/dbaccess/source/core/dataaccess/connection.cxx +++ b/dbaccess/source/core/dataaccess/connection.cxx @@ -681,9 +681,7 @@ Reference< XInterface > SAL_CALL OConnection::createInstance( const ::rtl::OUStr { RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dataaccess", "Ocke.Janssen@sun.com", "OConnection::createInstance" ); Reference< XServiceInfo > xRet; - if ( ( SERVICE_NAME_SINGLESELECTQUERYCOMPOSER == _sServiceSpecifier ) - || ( _sServiceSpecifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sdb.SingleSelectQueryAnalyzer" ) ) ) - ) + if ( SERVICE_NAME_SINGLESELECTQUERYCOMPOSER == _sServiceSpecifier || _sServiceSpecifier == "com.sun.star.sdb.SingleSelectQueryAnalyzer" ) { xRet = new OSingleSelectQueryComposer( getTables(),this, m_aContext ); m_aComposers.push_back(WeakReferenceHelper(xRet)); diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index 27dbacc5419d..f533642e158f 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -2046,7 +2046,7 @@ Reference< XController2 > SAL_CALL ODatabaseDocument::createDefaultViewControlle Reference< XController2 > SAL_CALL ODatabaseDocument::createViewController( const ::rtl::OUString& _ViewName, const Sequence< PropertyValue >& _Arguments, const Reference< XFrame >& _Frame ) throw (IllegalArgumentException, Exception, RuntimeException) { - if ( !_ViewName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Default" ) ) && !_ViewName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Preview" ) ) ) + if ( _ViewName != "Default" && _ViewName != "Preview" ) throw IllegalArgumentException( ::rtl::OUString(), *this, 1 ); if ( !_Frame.is() ) throw IllegalArgumentException( ::rtl::OUString(), *this, 3 ); diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx b/dbaccess/source/core/dataaccess/definitioncontainer.cxx index bf95e7cf18c1..fa818936bf12 100644 --- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx +++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx @@ -614,7 +614,7 @@ void ODefinitionContainer::approveNewObject(const ::rtl::OUString& _sName,const void SAL_CALL ODefinitionContainer::propertyChange( const PropertyChangeEvent& evt ) throw (RuntimeException) { ClearableMutexGuard aGuard(m_aMutex); - if(evt.PropertyName == (rtl::OUString) PROPERTY_NAME || evt.PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Title" ) )) + if( evt.PropertyName == (rtl::OUString) PROPERTY_NAME || evt.PropertyName == "Title" ) { m_bInPropertyChange = sal_True; try @@ -641,7 +641,7 @@ void SAL_CALL ODefinitionContainer::vetoableChange( const PropertyChangeEvent& a { MutexGuard aGuard(m_aMutex); - if(aEvent.PropertyName == (rtl::OUString) PROPERTY_NAME || aEvent.PropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Title" ) ) ) + if( aEvent.PropertyName == (rtl::OUString) PROPERTY_NAME || aEvent.PropertyName == "Title" ) { ::rtl::OUString sNewName; aEvent.NewValue >>= sNewName; diff --git a/dbaccess/source/core/dataaccess/documenteventexecutor.cxx b/dbaccess/source/core/dataaccess/documenteventexecutor.cxx index 9d5420f1b8cd..df1a60f5a34b 100644 --- a/dbaccess/source/core/dataaccess/documenteventexecutor.cxx +++ b/dbaccess/source/core/dataaccess/documenteventexecutor.cxx @@ -190,10 +190,7 @@ namespace dbaccess // no script is assigned to this event return; - bool bDispatchScriptURL = - ( sEventType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Script" ) ) - || sEventType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Service" ) ) - ); + bool bDispatchScriptURL = ( sEventType == "Script" || sEventType == "Service" ); bool bNonEmptyScript = !sScript.isEmpty(); OSL_ENSURE( bDispatchScriptURL && bNonEmptyScript, diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx index 255fd9339247..541c92137383 100644 --- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx +++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx @@ -278,7 +278,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL DatabaseDataProvider::detectArgum ::rtl::OUString aRole; if ( xSeqProp.is() && ( xSeqProp->getPropertyValue( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Role" ) ) ) >>= aRole ) - && aRole.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "categories" ) ) + && aRole == "categories" ) { bHasCategories = sal_True; diff --git a/dbaccess/source/core/recovery/dbdocrecovery.cxx b/dbaccess/source/core/recovery/dbdocrecovery.cxx index 965c2f88d768..1490f2a99095 100644 --- a/dbaccess/source/core/recovery/dbdocrecovery.cxx +++ b/dbaccess/source/core/recovery/dbdocrecovery.cxx @@ -231,7 +231,7 @@ namespace dbaccess continue; // the only section we support so far is "storages" - if ( !sCurrentSection.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "storages" ) ) ) + if ( sCurrentSection != "storages" ) { bCurrentSectionIsKnownToBeUnsupported = true; continue; diff --git a/dbaccess/source/core/recovery/settingsimport.cxx b/dbaccess/source/core/recovery/settingsimport.cxx index 3b22a201d377..dab60369c9b0 100644 --- a/dbaccess/source/core/recovery/settingsimport.cxx +++ b/dbaccess/source/core/recovery/settingsimport.cxx @@ -117,7 +117,7 @@ namespace dbaccess o_rLocalName = i_rElementName.copy( nSeparatorPos + 1 ); } - OSL_ENSURE( o_rNamespace.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "config" ) ), "SettingsImport::split: unexpected namespace!" ); + OSL_ENSURE( o_rNamespace == "config", "SettingsImport::split: unexpected namespace!" ); // our recovery file is kind of hand-made, so there shouldn't be anything else than "config". // If there is, then just ignore it ... } diff --git a/dbaccess/source/ext/macromigration/migrationengine.cxx b/dbaccess/source/ext/macromigration/migrationengine.cxx index 5da4555fd2aa..1013551b167f 100644 --- a/dbaccess/source/ext/macromigration/migrationengine.cxx +++ b/dbaccess/source/ext/macromigration/migrationengine.cxx @@ -332,7 +332,7 @@ namespace dbmm bool bCausedByNewStyleReport = ( _rDocument.eType == eReport ) && ( aError.isExtractableTo( ::cppu::UnoType< WrongFormatException >::get() ) ) - && ( lcl_getMimeType_nothrow( _rDocument.xCommandProcessor ).equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "application/vnd.sun.xml.report" ) ) ); + && ( lcl_getMimeType_nothrow( _rDocument.xCommandProcessor ) == "application/vnd.sun.xml.report" ); if ( bCausedByNewStyleReport ) { @@ -1636,9 +1636,7 @@ namespace dbmm Any aException; try { - if ( !_rScriptType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Script" ) ) - || _rScriptType.isEmpty() - ) + if ( _rScriptType != "Script" || _rScriptType.isEmpty() ) { OSL_FAIL( "MigrationEngine_Impl::impl_adjustScriptLibrary_nothrow: no or unknown script type!" ); @@ -1669,7 +1667,7 @@ namespace dbmm ::rtl::OUString sLocation = xUri->getParameter( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "location" ) ) ); - if ( !sLocation.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "document" ) ) ) + if ( sLocation != "document" ) { // only document libraries must be migrated, of course return false; diff --git a/dbaccess/source/filter/xml/dbloader2.cxx b/dbaccess/source/filter/xml/dbloader2.cxx index 1e5aa44e2fd7..df140ed3e71d 100644 --- a/dbaccess/source/filter/xml/dbloader2.cxx +++ b/dbaccess/source/filter/xml/dbloader2.cxx @@ -165,7 +165,7 @@ DBTypeDetection::DBTypeDetection(const Reference< XMultiServiceFactory >& _rxFac { ::rtl::OUString sMediaType; xStorageProperties->getPropertyValue( INFO_MEDIATYPE ) >>= sMediaType; - if ( sMediaType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(MIMETYPE_OASIS_OPENDOCUMENT_DATABASE_ASCII)) || sMediaType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(MIMETYPE_VND_SUN_XML_BASE_ASCII)) ) + if ( sMediaType == MIMETYPE_OASIS_OPENDOCUMENT_DATABASE_ASCII || sMediaType == MIMETYPE_VND_SUN_XML_BASE_ASCII ) { if ( bStreamFromDescr && sURL.compareTo( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "private:stream" ) ), 14 ) != COMPARE_EQUAL ) { @@ -346,7 +346,7 @@ namespace URL aURL; aURL.Complete = _rURL; xTransformer->parseStrict( aURL ); - bDoesAllow = aURL.Arguments.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Interactive" ) ); + bDoesAllow = aURL.Arguments == "Interactive"; } } catch( const Exception& ) diff --git a/dbaccess/source/filter/xml/xmlColumn.cxx b/dbaccess/source/filter/xml/xmlColumn.cxx index 8916e2f205d3..5cbaaf602669 100644 --- a/dbaccess/source/filter/xml/xmlColumn.cxx +++ b/dbaccess/source/filter/xml/xmlColumn.cxx @@ -90,7 +90,7 @@ OXMLColumn::OXMLColumn( ODBFilter& rImport m_sHelpMessage = sValue; break; case XML_TOK_COLUMN_VISIBILITY: - m_bHidden = !sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("visible")); + m_bHidden = sValue != "visible"; break; case XML_TOK_COLUMN_TYPE_NAME: sType = sValue; @@ -101,7 +101,7 @@ OXMLColumn::OXMLColumn( ODBFilter& rImport m_aDefaultValue <<= sValue; break; case XML_TOK_COLUMN_VISIBLE: - m_bHidden = sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("false")); + m_bHidden = sValue == "false"; break; case XML_TOK_DEFAULT_CELL_STYLE_NAME: m_sCellStyleName = sValue; diff --git a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx index bbe086fe87ec..5147b34af921 100644 --- a/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx +++ b/dbaccess/source/filter/xml/xmlDataSourceSetting.cxx @@ -72,7 +72,7 @@ OXMLDataSourceSetting::OXMLDataSourceSetting( ODBFilter& rImport switch( rTokenMap.Get( nPrefix, sLocalName ) ) { case XML_TOK_DATA_SOURCE_SETTING_IS_LIST: - m_bIsList = sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("true")); + m_bIsList = sValue == "true"; break; case XML_TOK_DATA_SOURCE_SETTING_TYPE: { diff --git a/dbaccess/source/filter/xml/xmlQuery.cxx b/dbaccess/source/filter/xml/xmlQuery.cxx index 1b93b9fb8df1..3b011eb7a1d5 100644 --- a/dbaccess/source/filter/xml/xmlQuery.cxx +++ b/dbaccess/source/filter/xml/xmlQuery.cxx @@ -76,7 +76,7 @@ OXMLQuery::OXMLQuery( ODBFilter& rImport m_sCommand = sValue; break; case XML_TOK_ESCAPE_PROCESSING: - m_bEscapeProcessing = sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("true")); + m_bEscapeProcessing = sValue == "true"; break; } } diff --git a/dbaccess/source/filter/xml/xmlServerDatabase.cxx b/dbaccess/source/filter/xml/xmlServerDatabase.cxx index b2dfb3339491..d3460f58b210 100644 --- a/dbaccess/source/filter/xml/xmlServerDatabase.cxx +++ b/dbaccess/source/filter/xml/xmlServerDatabase.cxx @@ -90,10 +90,7 @@ OXMLServerDatabase::OXMLServerDatabase( ODBFilter& rImport, if ( !sType.isEmpty() ) { ::rtl::OUStringBuffer sURL; - if ( sType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "sdbc:mysql:jdbc" ) ) - || sType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "sdbc:mysqlc" ) ) - || sType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "sdbc:mysql:mysqlc" ) ) - ) + if ( sType == "sdbc:mysql:jdbc" || sType == "sdbc:mysqlc" || sType == "sdbc:mysql:mysqlc" ) { sURL.append( sType ); sURL.append( sal_Unicode( ':' ) ); diff --git a/dbaccess/source/filter/xml/xmlTable.cxx b/dbaccess/source/filter/xml/xmlTable.cxx index 8f5ae4005321..47d0b234d3f2 100644 --- a/dbaccess/source/filter/xml/xmlTable.cxx +++ b/dbaccess/source/filter/xml/xmlTable.cxx @@ -91,10 +91,10 @@ OXMLTable::OXMLTable( ODBFilter& _rImport m_sStyleName = sValue; break; case XML_TOK_APPLY_FILTER: - m_bApplyFilter = sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("true")); + m_bApplyFilter = sValue == "true"; break; case XML_TOK_APPLY_ORDER: - m_bApplyOrder = sValue.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("true")); + m_bApplyOrder = sValue == "true"; break; } } diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx index 30cbad8bfa0a..36dacbc1810a 100644 --- a/dbaccess/source/ui/misc/WCopyTable.cxx +++ b/dbaccess/source/ui/misc/WCopyTable.cxx @@ -151,7 +151,7 @@ bool ObjectCopySource::isView() const { ::rtl::OUString sObjectType; OSL_VERIFY( m_xObject->getPropertyValue( PROPERTY_TYPE ) >>= sObjectType ); - bIsView = sObjectType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VIEW" ) ); + bIsView = sObjectType == "VIEW"; } } catch( const Exception& ) |