summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorSzabolcs Dezsi <dezsiszabi@hotmail.com>2012-04-06 14:28:18 +0200
committerJan Holesovsky <kendy@suse.cz>2012-04-06 14:30:05 +0200
commit8a01ee624318ac08800af89d988971114637a04e (patch)
treee4acf35e42ab0c1d0b593bd8970fa2c435f90c95 /dbaccess
parent6cf547f02c79278430ee75483a3128076cfc609e (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.cxx16
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/documentcontainer.cxx4
-rw-r--r--dbaccess/source/core/dataaccess/documentdefinition.cxx14
-rw-r--r--dbaccess/source/core/dataaccess/intercept.cxx2
-rw-r--r--dbaccess/source/core/recovery/settingsimport.cxx6
-rw-r--r--dbaccess/source/core/recovery/subcomponentrecovery.cxx6
-rw-r--r--dbaccess/source/filter/xml/xmlServerDatabase.cxx4
-rw-r--r--dbaccess/source/filter/xml/xmlfilter.cxx6
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx8
-rw-r--r--dbaccess/source/ui/control/opendoccontrols.cxx2
12 files changed, 36 insertions, 36 deletions
diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx
index 975b61283d8b..608334026190 100644
--- a/dbaccess/source/core/dataaccess/ContentHelper.cxx
+++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx
@@ -357,7 +357,7 @@ Sequence< Any > OContentHelper::setPropertyValues(const Sequence< PropertyValue
{
const PropertyValue& rValue = pValues[ n ];
- if ( rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ContentType" ) ) )
+ if ( rValue.Name == "ContentType" )
{
// Read-only property!
aRet[ n ] <<= IllegalAccessException(
@@ -366,7 +366,7 @@ Sequence< Any > OContentHelper::setPropertyValues(const Sequence< PropertyValue
),
static_cast< cppu::OWeakObject * >( this ) );
}
- else if ( rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsDocument" ) ) )
+ else if ( rValue.Name == "IsDocument" )
{
// Read-only property!
aRet[ n ] <<= IllegalAccessException(
@@ -375,7 +375,7 @@ Sequence< Any > OContentHelper::setPropertyValues(const Sequence< PropertyValue
),
static_cast< cppu::OWeakObject * >( this ) );
}
- else if ( rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsFolder" ) ) )
+ else if ( rValue.Name == "IsFolder" )
{
// Read-only property!
aRet[ n ] <<= IllegalAccessException(
@@ -384,7 +384,7 @@ Sequence< Any > OContentHelper::setPropertyValues(const Sequence< PropertyValue
),
static_cast< cppu::OWeakObject * >( this ) );
}
- else if ( rValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Title" ) ) )
+ else if ( rValue.Name == "Title" )
{
rtl::OUString aNewValue;
if ( rValue.Value >>= aNewValue )
@@ -462,19 +462,19 @@ Reference< XRow > OContentHelper::getPropertyValues( const Sequence< Property >&
// Process Core properties.
- if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ContentType" ) ) )
+ if ( rProp.Name == "ContentType" )
{
xRow->appendString ( rProp, getContentType() );
}
- else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Title" ) ) )
+ else if ( rProp.Name == "Title" )
{
xRow->appendString ( rProp, m_pImpl->m_aProps.aTitle );
}
- else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsDocument" ) ) )
+ else if ( rProp.Name == "IsDocument" )
{
xRow->appendBoolean( rProp, m_pImpl->m_aProps.bIsDocument );
}
- else if ( rProp.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "IsFolder" ) ) )
+ else if ( rProp.Name == "IsFolder" )
{
xRow->appendBoolean( rProp, m_pImpl->m_aProps.bIsFolder );
}
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index 74e5fc272e8e..48f12121ad13 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -411,7 +411,7 @@ void ODatabaseContext::setTransientProperties(const ::rtl::OUString& _sURL, ODat
const PropertyValue* pPropsEnd = rSessionPersistentProps.getConstArray() + rSessionPersistentProps.getLength();
for ( ; pProp != pPropsEnd; ++pProp )
{
- if ( pProp->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "AuthFailedPassword" ) ) )
+ if ( pProp->Name == "AuthFailedPassword" )
{
OSL_VERIFY( pProp->Value >>= sAuthFailedPassword );
}
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 72f4eb94864d..27dbacc5419d 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -2060,7 +2060,7 @@ Reference< XController2 > SAL_CALL ODatabaseDocument::createViewController( cons
::comphelper::NamedValueCollection aInitArgs( _Arguments );
aInitArgs.put( "Frame", _Frame );
- if ( _ViewName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Preview" ) ) )
+ if ( _ViewName == "Preview" )
aInitArgs.put( "Preview", sal_Bool( sal_True ) );
Reference< XInitialization > xInitController( xController, UNO_QUERY_THROW );
xInitController->initialize( aInitArgs.getWrappedPropertyValues() );
diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx
index d34a125e4e8f..85c615de2181 100644
--- a/dbaccess/source/core/dataaccess/documentcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx
@@ -454,7 +454,7 @@ Any SAL_CALL ODocumentContainer::execute( const Command& aCommand, sal_Int32 Com
// Unreachable
}
}
- else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "insert" ) ) )
+ else if ( aCommand.Name == "insert" )
{
//////////////////////////////////////////////////////////////////
// insert
@@ -473,7 +473,7 @@ Any SAL_CALL ODocumentContainer::execute( const Command& aCommand, sal_Int32 Com
// Unreachable
}
}
- else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "delete" ) ) )
+ else if ( aCommand.Name == "delete" )
{
//////////////////////////////////////////////////////////////////
// delete
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index 5fafb3df4d0d..f8393f17ebed 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -851,7 +851,7 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons
if ( lcl_extractOpenMode( pIter->Value, nOpenMode ) )
continue;
- if ( pIter->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MacroExecutionMode" ) ) )
+ if ( pIter->Name == "MacroExecutionMode" )
{
sal_Int16 nMacroExecMode( !aDocumentMacroMode ? MacroExecMode::USE_CONFIG : *aDocumentMacroMode );
OSL_VERIFY( pIter->Value >>= nMacroExecMode );
@@ -1054,7 +1054,7 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co
if ( m_bInExecute )
return aRet;
- if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "copyTo" ) ) )
+ if ( aCommand.Name == "copyTo" )
{
Sequence<Any> aIni;
aCommand.Argument >>= aIni;
@@ -1076,11 +1076,11 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co
xStorage->copyElementTo(m_pImpl->m_aProps.sPersistentName,xDest,sPersistentName);
}
- else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "preview" ) ) )
+ else if ( aCommand.Name == "preview" )
{
onCommandPreview(aRet);
}
- else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "insert" ) ) )
+ else if ( aCommand.Name == "insert" )
{
Sequence<Any> aIni;
aCommand.Argument >>= aIni;
@@ -1105,7 +1105,7 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co
{
onCommandGetDocumentProperties( aRet );
}
- else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "delete" ) ) )
+ else if ( aCommand.Name == "delete" )
{
//////////////////////////////////////////////////////////////////
// delete
@@ -1130,11 +1130,11 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co
{
aRet <<= impl_close_throw();
}
- else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "show" ) ) )
+ else if ( aCommand.Name == "show" )
{
impl_showOrHideComponent_throw( true );
}
- else if ( aCommand.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "hide" ) ) )
+ else if ( aCommand.Name == "hide" )
{
impl_showOrHideComponent_throw( false );
}
diff --git a/dbaccess/source/core/dataaccess/intercept.cxx b/dbaccess/source/core/dataaccess/intercept.cxx
index 1ec11d02e643..9ad0727d4905 100644
--- a/dbaccess/source/core/dataaccess/intercept.cxx
+++ b/dbaccess/source/core/dataaccess/intercept.cxx
@@ -158,7 +158,7 @@ void SAL_CALL OInterceptor::dispatch( const URL& _URL,const Sequence<PropertyVal
while( nInd < aNewArgs.getLength() )
{
- if ( aNewArgs[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "SaveTo" ) ) )
+ if ( aNewArgs[nInd].Name == "SaveTo" )
{
aNewArgs[nInd].Value <<= sal_True;
break;
diff --git a/dbaccess/source/core/recovery/settingsimport.cxx b/dbaccess/source/core/recovery/settingsimport.cxx
index fd46b17f5bc6..3b22a201d377 100644
--- a/dbaccess/source/core/recovery/settingsimport.cxx
+++ b/dbaccess/source/core/recovery/settingsimport.cxx
@@ -154,7 +154,7 @@ namespace dbaccess
::rtl::OUString sLocalName;
split( i_rElementName, sNamespace, sLocalName );
- if ( sLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "config-item-set" ) ) )
+ if ( sLocalName == "config-item-set" )
return new ConfigItemSetImport( m_rSettings );
#if OSL_DEBUG_LEVEL > 0
@@ -273,9 +273,9 @@ namespace dbaccess
::rtl::OUString sLocalName;
split( i_rElementName, sNamespace, sLocalName );
- if ( sLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "config-item-set" ) ) )
+ if ( sLocalName == "config-item-set" )
return new ConfigItemSetImport( m_aChildSettings );
- if ( sLocalName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "config-item" ) ) )
+ if ( sLocalName == "config-item" )
return new ConfigItemImport( m_aChildSettings );
#if OSL_DEBUG_LEVEL > 0
diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.cxx b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
index 0f0519510326..a8d28960fba0 100644
--- a/dbaccess/source/core/recovery/subcomponentrecovery.cxx
+++ b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
@@ -334,7 +334,7 @@ namespace dbaccess
if ( m_aStates.empty() )
{
- if ( i_Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "office:settings" ) ) )
+ if ( i_Name == "office:settings" )
{
pNewState = new OfficeSettingsImport( m_aSettings );
}
@@ -503,7 +503,7 @@ namespace dbaccess
break;
case REPORT:
- if ( sModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.report.ReportDefinition" ) ) )
+ if ( sModuleIdentifier == "com.sun.star.report.ReportDefinition" )
{
// it's an SRB report designer
m_aCompDesc.bForEditing = true;
@@ -516,7 +516,7 @@ namespace dbaccess
break;
default:
- if ( sModuleIdentifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.sdb.RelationDesign" ) ) )
+ if ( sModuleIdentifier == "com.sun.star.sdb.RelationDesign" )
{
m_eType = RELATION_DESIGN;
m_aCompDesc.bForEditing = true;
diff --git a/dbaccess/source/filter/xml/xmlServerDatabase.cxx b/dbaccess/source/filter/xml/xmlServerDatabase.cxx
index b5208f4406a6..b2dfb3339491 100644
--- a/dbaccess/source/filter/xml/xmlServerDatabase.cxx
+++ b/dbaccess/source/filter/xml/xmlServerDatabase.cxx
@@ -109,7 +109,7 @@ OXMLServerDatabase::OXMLServerDatabase( ODBFilter& rImport,
sURL.append(sDatabaseName);
}
}
- else if ( sType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "jdbc:oracle:thin" ) ) )
+ else if ( sType == "jdbc:oracle:thin" )
{
sURL.appendAscii("jdbc:oracle:thin:@");
sURL.append(sHostName);
@@ -124,7 +124,7 @@ OXMLServerDatabase::OXMLServerDatabase( ODBFilter& rImport,
sURL.append(sDatabaseName);
}
}
- else if ( sType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "sdbc:address:ldap" ) ) )
+ else if ( sType == "sdbc:address:ldap" )
{
sURL.appendAscii("sdbc:address:ldap:");
sURL.append(sHostName);
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index 613506907260..aa7825e8c1b2 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -555,11 +555,11 @@ void ODBFilter::SetViewSettings(const Sequence<PropertyValue>& aViewProps)
const PropertyValue *pEnd = pIter + aViewProps.getLength();
for (; pIter != pEnd; ++pIter)
{
- if ( pIter->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "Queries" ) ) )
+ if ( pIter->Name == "Queries" )
{
fillPropertyMap(pIter->Value,m_aQuerySettings);
}
- else if ( pIter->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "Tables" ) ) )
+ else if ( pIter->Name == "Tables" )
{
fillPropertyMap(pIter->Value,m_aTablesSettings);
}
@@ -572,7 +572,7 @@ void ODBFilter::SetConfigurationSettings(const Sequence<PropertyValue>& aConfigP
const PropertyValue *pEnd = pIter + aConfigProps.getLength();
for (; pIter != pEnd; ++pIter)
{
- if ( pIter->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "layout-settings" ) ) )
+ if ( pIter->Name == "layout-settings" )
{
Sequence<PropertyValue> aWindows;
pIter->Value >>= aWindows;
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 534a1a8d4ba5..63178832aa47 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -447,13 +447,13 @@ IMPL_LINK( SbaXGridPeer, OnDispatchEvent, void*, /*NOTINTERESTEDIN*/ )
SbaXGridPeer::DispatchType SbaXGridPeer::classifyDispatchURL( const URL& _rURL )
{
DispatchType eURLType = dtUnknown;
- if ( _rURL.Complete.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GridSlots/BrowserAttribs" ) ) )
+ if ( _rURL.Complete == ".uno:GridSlots/BrowserAttribs" )
eURLType = dtBrowserAttribs;
- else if ( _rURL.Complete.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GridSlots/RowHeight" ) ) )
+ else if ( _rURL.Complete == ".uno:GridSlots/RowHeight" )
eURLType = dtRowHeight;
- else if ( _rURL.Complete.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GridSlots/ColumnAttribs" ) ) )
+ else if ( _rURL.Complete == ".uno:GridSlots/ColumnAttribs" )
eURLType = dtColumnAttribs;
- else if ( _rURL.Complete.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( ".uno:GridSlots/ColumnWidth" ) ) )
+ else if ( _rURL.Complete == ".uno:GridSlots/ColumnWidth" )
eURLType = dtColumnWidth;
return eURLType;
}
diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx
index 71fd695ffc04..12ca3060a9c6 100644
--- a/dbaccess/source/ui/control/opendoccontrols.cxx
+++ b/dbaccess/source/ui/control/opendoccontrols.cxx
@@ -105,7 +105,7 @@ namespace dbaui
for ( sal_Int32 i=0; i<nCount; ++i )
{
::rtl::OUString sPropertyName( aProperties[i].Name );
- if ( sPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("Label" ) ) )
+ if ( sPropertyName == "Label" )
{
aProperties[i].Value >>= sLabel;
break;