summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-05 11:06:18 +0200
committerNoel Grandin <noel@peralex.com>2013-11-11 12:58:12 +0200
commit0a9ef5a18e148c7a5c9a088e153a7873d1564841 (patch)
tree3c3bc21e7ee4f836a1d056695175e0b1a91eda26
parent7944301424aac0943e4ecc0410f495b210ad3b79 (diff)
convert OUString 0==compareToAscii to equalsAscii
Convert code like: 0 == aStr.compareToAscii("XXX") to aStr.equalsAscii("XXX") which is both clearer and faster. Change-Id: I2e906d7d38494db38eb292702fadb781b1251e07
-rw-r--r--chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx2
-rw-r--r--connectivity/source/drivers/file/FConnection.cxx8
-rw-r--r--connectivity/source/drivers/mozab/MConnection.cxx24
-rw-r--r--connectivity/source/drivers/odbcbase/OConnection.cxx26
-rw-r--r--connectivity/source/drivers/postgresql/pq_databasemetadata.cxx12
-rw-r--r--connectivity/source/drivers/postgresql/pq_driver.cxx2
-rw-r--r--cppuhelper/source/implementationentry.cxx2
-rw-r--r--dbaccess/source/ui/browser/genericcontroller.cxx4
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.cxx4
-rw-r--r--dbaccess/source/ui/uno/unoDirectSql.cxx4
-rw-r--r--dbaccess/source/ui/uno/unoadmin.cxx4
-rw-r--r--extensions/source/propctrlr/MasterDetailLinkDialog.cxx10
-rw-r--r--forms/source/component/Filter.cxx6
-rw-r--r--forms/source/misc/InterfaceContainer.cxx12
-rw-r--r--io/test/stm/datatest.cxx36
-rw-r--r--linguistic/source/lngsvcmgr.cxx34
-rw-r--r--padmin/source/desktopcontext.cxx2
-rw-r--r--pyuno/source/module/pyuno_adapter.cxx6
-rw-r--r--sdext/source/pdfimport/services.cxx2
-rw-r--r--sfx2/source/appl/helpdispatch.cxx4
-rw-r--r--shell/source/cmdmail/cmdmailmsg.cxx28
-rw-r--r--svtools/source/graphic/provider.cxx16
-rw-r--r--svtools/source/java/javacontext.cxx2
-rw-r--r--svtools/source/uno/addrtempuno.cxx6
-rw-r--r--svtools/source/uno/miscservices.cxx4
-rw-r--r--svtools/source/uno/unoevent.cxx2
-rw-r--r--svx/source/form/fmscriptingenv.cxx4
-rw-r--r--svx/source/form/fmshimp.cxx2
-rw-r--r--svx/source/form/fmsrccfg.cxx9
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx4
-rw-r--r--testtools/source/bridgetest/bridgetest.cxx8
-rw-r--r--toolkit/source/controls/controlmodelcontainerbase.cxx58
-rw-r--r--unotools/source/config/lingucfg.cxx4
-rw-r--r--unotools/source/ucbhelper/tempfile.cxx2
-rw-r--r--xmloff/source/draw/ximpshap.cxx32
-rw-r--r--xmloff/source/forms/elementimport.cxx6
-rw-r--r--xmloff/source/forms/layerimport.cxx6
-rw-r--r--xmloff/source/style/xmlprmap.cxx2
-rw-r--r--xmloff/source/text/XMLTextFrameContext.cxx2
-rw-r--r--xmloff/source/text/txtflde.cxx6
40 files changed, 200 insertions, 207 deletions
diff --git a/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx b/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx
index e2323de4799e..b212b598efac 100644
--- a/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx
+++ b/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx
@@ -77,7 +77,7 @@ void ChartTypeUnoDlg::implInitialize(const uno::Any& _rValue)
beans::PropertyValue aProperty;
if (_rValue >>= aProperty)
{
- if (0 == aProperty.Name.compareToAscii("ChartModel"))
+ if (aProperty.Name.equalsAscii("ChartModel"))
m_xChartModel.set(aProperty.Value,uno::UNO_QUERY);
else
ChartTypeUnoDlg_BASE::implInitialize(_rValue);
diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx
index 91beb1414048..3b37bec8c87a 100644
--- a/connectivity/source/drivers/file/FConnection.cxx
+++ b/connectivity/source/drivers/file/FConnection.cxx
@@ -100,9 +100,9 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >&
const PropertyValue *pEnd = pIter + info.getLength();
for(;pIter != pEnd;++pIter)
{
- if(0 == pIter->Name.compareToAscii("Extension"))
+ if( pIter->Name.equalsAscii("Extension"))
OSL_VERIFY( pIter->Value >>= aExt );
- else if(0 == pIter->Name.compareToAscii("CharSet"))
+ else if( pIter->Name.equalsAscii("CharSet"))
{
OUString sIanaName;
OSL_VERIFY( pIter->Value >>= sIanaName );
@@ -114,11 +114,11 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >&
else
m_nTextEncoding = RTL_TEXTENCODING_DONTKNOW;
}
- else if (0 == pIter->Name.compareToAscii("ShowDeleted"))
+ else if( pIter->Name.equalsAscii("ShowDeleted"))
{
OSL_VERIFY( pIter->Value >>= m_bShowDeleted );
}
- else if (0 == pIter->Name.compareToAscii("EnableSQL92Check"))
+ else if( pIter->Name.equalsAscii("EnableSQL92Check"))
{
pIter->Value >>= m_bCheckSQL92;
}
diff --git a/connectivity/source/drivers/mozab/MConnection.cxx b/connectivity/source/drivers/mozab/MConnection.cxx
index 8112a537b748..685c13e84722 100644
--- a/connectivity/source/drivers/mozab/MConnection.cxx
+++ b/connectivity/source/drivers/mozab/MConnection.cxx
@@ -196,21 +196,21 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >&
m_sPassword = OUString( "");
m_bUseSSL = sal_False;
- if ( aAddrbookScheme.compareToAscii( getSdbcScheme( SDBC_MOZILLA ) ) == 0 ) {
+ if ( aAddrbookScheme.equalsAscii( getSdbcScheme( SDBC_MOZILLA ) ) ) {
m_sMozillaURI = OUString::createFromAscii( getSchemeURI( SCHEME_MOZILLA ) );
m_eSDBCAddressType = SDBCAddress::Mozilla;
if(!sAdditionalInfo.isEmpty())
m_sMozillaProfile = sAdditionalInfo;
}
else
- if ( aAddrbookScheme.compareToAscii( getSdbcScheme( SDBC_THUNDERBIRD ) ) == 0 ) {
+ if ( aAddrbookScheme.equalsAscii( getSdbcScheme( SDBC_THUNDERBIRD ) ) ) {
//Yes. I am sure it is SCHEME_MOZILLA
m_sMozillaURI = OUString::createFromAscii( getSchemeURI( SCHEME_MOZILLA ) );
m_eSDBCAddressType = SDBCAddress::ThunderBird;
if(!sAdditionalInfo.isEmpty())
m_sMozillaProfile = sAdditionalInfo;
}
- else if ( aAddrbookScheme.compareToAscii( getSdbcScheme( SDBC_LDAP ) ) == 0 ) {
+ else if ( aAddrbookScheme.equalsAscii( getSdbcScheme( SDBC_LDAP ) ) ) {
OUString sBaseDN;
sal_Int32 nPortNumber = -1;
@@ -243,31 +243,31 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >&
{
OSL_TRACE( "info[%d].Name = %s", pInfo - info.getConstArray(), OUtoCStr( pInfo->Name ) );
- if ( 0 == pInfo->Name.compareToAscii("HostName") )
+ if ( pInfo->Name.equalsAscii("HostName") )
{
pInfo->Value >>= m_sHostName;
}
- else if ( 0 == pInfo->Name.compareToAscii("BaseDN") )
+ else if ( pInfo->Name.equalsAscii("BaseDN") )
{
pInfo->Value >>= sBaseDN;
}
- else if ( 0 == pInfo->Name.compareToAscii("user") )
+ else if ( pInfo->Name.equalsAscii("user") )
{
pInfo->Value >>= m_sBindDN;
}
- else if ( 0 == pInfo->Name.compareToAscii("password") )
+ else if ( pInfo->Name.equalsAscii("password") )
{
pInfo->Value >>= m_sPassword;
}
- else if ( 0 == pInfo->Name.compareToAscii("UseSSL") )
+ else if ( pInfo->Name.equalsAscii("UseSSL") )
{
pInfo->Value >>= m_bUseSSL;
}
- else if ( 0 == pInfo->Name.compareToAscii("PortNumber") )
+ else if ( pInfo->Name.equalsAscii("PortNumber") )
{
OSL_VERIFY( pInfo->Value >>= nPortNumber );
}
- else if ( 0 == pInfo->Name.compareToAscii("MaxRowCount") )
+ else if ( pInfo->Name.equalsAscii("MaxRowCount") )
{
pInfo->Value >>= m_nMaxResultRecords;
}
@@ -295,11 +295,11 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >&
m_sMozillaURI += OUString( "?(or(DisplayName,=,DontDoThisAtHome)))");
}
- else if ( aAddrbookScheme.compareToAscii( getSdbcScheme( SDBC_OUTLOOK_MAPI ) ) == 0 ) {
+ else if ( aAddrbookScheme.equalsAscii( getSdbcScheme( SDBC_OUTLOOK_MAPI ) ) ) {
m_sMozillaURI = OUString::createFromAscii( getSchemeURI( SCHEME_OUTLOOK_MAPI ) );
m_eSDBCAddressType = SDBCAddress::Outlook;
}
- else if ( aAddrbookScheme.compareToAscii( getSdbcScheme( SDBC_OUTLOOK_EXPRESS ) ) == 0 ) {
+ else if ( aAddrbookScheme.equalsAscii( getSdbcScheme( SDBC_OUTLOOK_EXPRESS ) ) ) {
m_sMozillaURI = OUString::createFromAscii( getSchemeURI( SCHEME_OUTLOOK_EXPRESS ) );
m_eSDBCAddressType = SDBCAddress::OutlookExp;
}
diff --git a/connectivity/source/drivers/odbcbase/OConnection.cxx b/connectivity/source/drivers/odbcbase/OConnection.cxx
index 2e09b8287714..0a35a58e849f 100644
--- a/connectivity/source/drivers/odbcbase/OConnection.cxx
+++ b/connectivity/source/drivers/odbcbase/OConnection.cxx
@@ -151,7 +151,7 @@ SQLRETURN OConnection::OpenConnection(const OUString& aConnectStr,sal_Int32 nTim
{
OUString aVal;
OTools::GetInfo(this,m_aConnectionHandle,SQL_DATA_SOURCE_READ_ONLY,aVal,*this,getTextEncoding());
- m_bReadOnly = !aVal.compareToAscii("Y");
+ m_bReadOnly = aVal.equalsAscii("Y");
}
catch(Exception&)
{
@@ -210,49 +210,49 @@ SQLRETURN OConnection::Construct(const OUString& url,const Sequence< PropertyVal
const PropertyValue *pEnd = pBegin + info.getLength();
for(;pBegin != pEnd;++pBegin)
{
- if(!pBegin->Name.compareToAscii(pTimeout))
+ if( pBegin->Name.equalsAscii(pTimeout))
OSL_VERIFY( pBegin->Value >>= nTimeout );
- else if(!pBegin->Name.compareToAscii(pSilent))
+ else if( pBegin->Name.equalsAscii(pSilent))
OSL_VERIFY( pBegin->Value >>= bSilent );
- else if(!pBegin->Name.compareToAscii(pPrivName))
+ else if( pBegin->Name.equalsAscii(pPrivName))
OSL_VERIFY( pBegin->Value >>= m_bIgnoreDriverPrivileges );
- else if(!pBegin->Name.compareToAscii(pVerColName))
+ else if( pBegin->Name.equalsAscii(pVerColName))
OSL_VERIFY( pBegin->Value >>= m_bPreventGetVersionColumns );
- else if(!pBegin->Name.compareToAscii(pParaName))
+ else if( pBegin->Name.equalsAscii(pParaName))
OSL_VERIFY( pBegin->Value >>= m_bParameterSubstitution );
- else if(!pBegin->Name.compareToAscii(pRetrieving))
+ else if( pBegin->Name.equalsAscii(pRetrieving))
{
sal_Bool bAutoRetrievingEnabled = sal_False;
OSL_VERIFY( pBegin->Value >>= bAutoRetrievingEnabled );
enableAutoRetrievingEnabled(bAutoRetrievingEnabled);
}
- else if(!pBegin->Name.compareToAscii(pRetriStmt))
+ else if( pBegin->Name.equalsAscii(pRetriStmt))
{
OUString sGeneratedValueStatement;
OSL_VERIFY( pBegin->Value >>= sGeneratedValueStatement );
setAutoRetrievingStatement(sGeneratedValueStatement);
}
- else if(!pBegin->Name.compareToAscii(pUser))
+ else if( pBegin->Name.equalsAscii(pUser))
{
OSL_VERIFY( pBegin->Value >>= aUID );
aDSN = aDSN + ";UID=" + aUID;
}
- else if(!pBegin->Name.compareToAscii(pPwd))
+ else if( pBegin->Name.equalsAscii(pPwd))
{
OSL_VERIFY( pBegin->Value >>= aPWD );
aDSN = aDSN + ";PWD=" + aPWD;
}
- else if(!pBegin->Name.compareToAscii(pUseCatalog))
+ else if( pBegin->Name.equalsAscii(pUseCatalog))
{
OSL_VERIFY( pBegin->Value >>= m_bUseCatalog );
}
- else if(!pBegin->Name.compareToAscii(pSysDrv))
+ else if( pBegin->Name.equalsAscii(pSysDrv))
{
OSL_VERIFY( pBegin->Value >>= aSysDrvSettings );
aDSN += ";";
aDSN += aSysDrvSettings;
}
- else if(0 == pBegin->Name.compareToAscii(pCharSet))
+ else if( pBegin->Name.equalsAscii(pCharSet))
{
OUString sIanaName;
OSL_VERIFY( pBegin->Value >>= sIanaName );
diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
index 295784fb0f4c..69d764427945 100644
--- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
@@ -1186,9 +1186,9 @@ sal_Bool DatabaseMetaData::dataDefinitionIgnoredInTransactions( ) throw (SQLExc
row[1] <<= xRow->getString( 1 );
row[2] <<= xRow->getString( 2 );
OUString type = xRow->getString(3);
- if( 0 == type.compareToAscii( "r" ) )
+ if( type.equalsAscii( "r" ) )
{
- if( 0 == xRow->getString(1).compareToAscii( "pg_catalog" ) )
+ if( xRow->getString(1).equalsAscii( "pg_catalog" ) )
{
row[3] <<= statics.SYSTEM_TABLE;
}
@@ -1197,7 +1197,7 @@ sal_Bool DatabaseMetaData::dataDefinitionIgnoredInTransactions( ) throw (SQLExc
row[3] <<= statics.TABLE;
}
}
- else if( 0 == type.compareToAscii( "v" ) )
+ else if( type.equalsAscii( "v" ) )
{
row[3] <<= statics.VIEW;
}
@@ -1324,7 +1324,7 @@ sal_Int32 typeNameToDataType( const OUString &typeName, const OUString &typtype
// string representation. Additionally, the edit-table-type-selection-box
// is not so unuseable anymore.
sal_Int32 ret = com::sun::star::sdbc::DataType::LONGVARCHAR;
- if( 0 == typtype.compareToAscii( "b" ) )
+ if( typtype.equalsAscii( "b" ) )
{
// as long as the OOo framework does not support arrays,
// the user is better of with interpreting arrays as strings !
@@ -1342,11 +1342,11 @@ sal_Int32 typeNameToDataType( const OUString &typeName, const OUString &typtype
ret = ii->second;
}
}
- else if( 0 == typtype.compareToAscii( "c" ) )
+ else if( typtype.equalsAscii( "c" ) )
{
ret = com::sun::star::sdbc::DataType::STRUCT;
}
- else if( 0 == typtype.compareToAscii( "d" ) )
+ else if( typtype.equalsAscii( "d" ) )
{
ret = com::sun::star::sdbc::DataType::LONGVARCHAR;
}
diff --git a/connectivity/source/drivers/postgresql/pq_driver.cxx b/connectivity/source/drivers/postgresql/pq_driver.cxx
index 98206bed7ae3..5f1fedb72e36 100644
--- a/connectivity/source/drivers/postgresql/pq_driver.cxx
+++ b/connectivity/source/drivers/postgresql/pq_driver.cxx
@@ -329,7 +329,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL postgresql_sdbc_component_getFactory(
for( sal_Int32 i = 0 ; g_entries[i].create ; i ++ )
{
OUString implName = g_entries[i].getImplementationName();
- if( 0 == implName.compareToAscii( pImplName ) )
+ if( implName.equalsAscii( pImplName ) )
{
Reference< XComponentContext > defaultContext(
comphelper::getComponentContext( xSmgr ) );
diff --git a/cppuhelper/source/implementationentry.cxx b/cppuhelper/source/implementationentry.cxx
index 7a84d45ff8cd..aa587fc59d29 100644
--- a/cppuhelper/source/implementationentry.cxx
+++ b/cppuhelper/source/implementationentry.cxx
@@ -69,7 +69,7 @@ void * component_getFactoryHelper(
for( sal_Int32 i = 0 ; entries[i].create ; i ++ )
{
OUString implName = entries[i].getImplementationName();
- if( 0 == implName.compareToAscii( pImplName ) )
+ if( implName.equalsAscii( pImplName ) )
{
xFactory = entries[i].createFactory(
entries[i].create,
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index 064670ccaf5f..07ec8087c0e8 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -282,11 +282,11 @@ void SAL_CALL OGenericUnoController::initialize( const Sequence< Any >& aArgumen
for ( ; pIter != pEnd; ++pIter )
{
- if ( ( *pIter >>= aValue ) && ( 0 == aValue.Name.compareToAscii( "Frame" ) ) )
+ if ( ( *pIter >>= aValue ) && aValue.Name.equalsAscii( "Frame" ) )
{
xFrame.set(aValue.Value,UNO_QUERY_THROW);
}
- else if ( ( *pIter >>= aValue ) && ( 0 == aValue.Name.compareToAscii( "Preview" ) ) )
+ else if ( ( *pIter >>= aValue ) && aValue.Name.equalsAscii( "Preview" ) )
{
aValue.Value >>= m_bPreview;
m_bReadOnly = sal_True;
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index 8f9dae0c4529..43abe7e4602c 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -600,7 +600,7 @@ void ODbDataSourceAdministrationHelper::translateProperties(const Reference< XPr
PropertyValueSet aInfos;
for (sal_Int32 i=0; i<aAdditionalInfo.getLength(); ++i, ++pAdditionalInfo)
{
- if (0 == pAdditionalInfo->Name.compareToAscii("JDBCDRV"))
+ if( pAdditionalInfo->Name.equalsAscii("JDBCDRV"))
{ // compatibility
PropertyValue aCompatibility(*pAdditionalInfo);
aCompatibility.Name = "JavaDriverClass";
@@ -752,7 +752,7 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS
*pInfo = *aOverwrittenSetting;
aRelevantSettings.erase(aOverwrittenSetting);
}
- else if (0 == pInfo->Name.compareToAscii("JDBCDRV"))
+ else if( pInfo->Name.equalsAscii("JDBCDRV"))
{ // this is a compatibility setting, remove it from the sequence (it's replaced by JavaDriverClass)
nObsoleteSetting = i;
}
diff --git a/dbaccess/source/ui/uno/unoDirectSql.cxx b/dbaccess/source/ui/uno/unoDirectSql.cxx
index 47c92fd2ee49..ac3ead395dfd 100644
--- a/dbaccess/source/ui/uno/unoDirectSql.cxx
+++ b/dbaccess/source/ui/uno/unoDirectSql.cxx
@@ -102,12 +102,12 @@ DBG_NAME(ODirectSQLDialog)
PropertyValue aProperty;
if (_rValue >>= aProperty)
{
- if (0 == aProperty.Name.compareToAscii("InitialSelection"))
+ if (aProperty.Name.equalsAscii("InitialSelection"))
{
OSL_VERIFY( aProperty.Value >>= m_sInitialSelection );
return;
}
- else if (0 == aProperty.Name.compareToAscii("ActiveConnection"))
+ else if (aProperty.Name.equalsAscii("ActiveConnection"))
{
m_xActiveConnection.set( aProperty.Value, UNO_QUERY );
OSL_ENSURE( m_xActiveConnection.is(), "ODirectSQLDialog::implInitialize: invalid connection!" );
diff --git a/dbaccess/source/ui/uno/unoadmin.cxx b/dbaccess/source/ui/uno/unoadmin.cxx
index b4ae0a336f44..e88e253aead7 100644
--- a/dbaccess/source/ui/uno/unoadmin.cxx
+++ b/dbaccess/source/ui/uno/unoadmin.cxx
@@ -83,11 +83,11 @@ void ODatabaseAdministrationDialog::implInitialize(const Any& _rValue)
PropertyValue aProperty;
if (_rValue >>= aProperty)
{
- if (0 == aProperty.Name.compareToAscii("InitialSelection"))
+ if (aProperty.Name.equalsAscii("InitialSelection"))
{
m_aInitialSelection = aProperty.Value;
}
- else if (0 == aProperty.Name.compareToAscii("ActiveConnection"))
+ else if (aProperty.Name.equalsAscii("ActiveConnection"))
{
m_xActiveConnection.set(aProperty.Value,UNO_QUERY);
}
diff --git a/extensions/source/propctrlr/MasterDetailLinkDialog.cxx b/extensions/source/propctrlr/MasterDetailLinkDialog.cxx
index 712f41d4a48c..a664a61f4405 100644
--- a/extensions/source/propctrlr/MasterDetailLinkDialog.cxx
+++ b/extensions/source/propctrlr/MasterDetailLinkDialog.cxx
@@ -114,27 +114,27 @@ namespace pcr
PropertyValue aProperty;
if (_rValue >>= aProperty)
{
- if (0 == aProperty.Name.compareToAscii("Detail"))
+ if (aProperty.Name.equalsAscii("Detail"))
{
OSL_VERIFY( aProperty.Value >>= m_xDetail );
return;
}
- else if (0 == aProperty.Name.compareToAscii("Master"))
+ else if (aProperty.Name.equalsAscii("Master"))
{
OSL_VERIFY( aProperty.Value >>= m_xMaster );
return;
}
- else if (0 == aProperty.Name.compareToAscii("Explanation"))
+ else if (aProperty.Name.equalsAscii("Explanation"))
{
OSL_VERIFY( aProperty.Value >>= m_sExplanation );
return;
}
- else if (0 == aProperty.Name.compareToAscii("DetailLabel"))
+ else if (aProperty.Name.equalsAscii("DetailLabel"))
{
OSL_VERIFY( aProperty.Value >>= m_sDetailLabel );
return;
}
- else if (0 == aProperty.Name.compareToAscii("MasterLabel"))
+ else if (aProperty.Name.equalsAscii("MasterLabel"))
{
OSL_VERIFY( aProperty.Value >>= m_sMasterLabel );
return;
diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx
index 6983e8388b1b..8524b1822ed9 100644
--- a/forms/source/component/Filter.cxx
+++ b/forms/source/component/Filter.cxx
@@ -792,19 +792,19 @@ namespace frm
continue;
}
- if ( 0 == pName->compareToAscii( "MessageParent" ) )
+ if ( pName->equalsAscii( "MessageParent" ) )
{
// the message parent
*pValue >>= m_xMessageParent;
OSL_ENSURE( m_xMessageParent.is(), "OFilterControl::initialize: invalid MessageParent!" );
}
- else if ( 0 == pName->compareToAscii( "NumberFormatter" ) )
+ else if ( pName->equalsAscii( "NumberFormatter" ) )
{
// the number format. This argument is optional.
*pValue >>= m_xFormatter;
OSL_ENSURE( m_xFormatter.is(), "OFilterControl::initialize: invalid NumberFormatter!" );
}
- else if ( 0 == pName->compareToAscii( "ControlModel" ) )
+ else if ( pName->equalsAscii( "ControlModel" ) )
{
// the control model for which we act as filter control
if ( !(*pValue >>= xControlModel ) )
diff --git a/forms/source/misc/InterfaceContainer.cxx b/forms/source/misc/InterfaceContainer.cxx
index 9e91c2b8738b..bab4df85f176 100644
--- a/forms/source/misc/InterfaceContainer.cxx
+++ b/forms/source/misc/InterfaceContainer.cxx
@@ -363,15 +363,15 @@ struct TransformEventTo52Format : public ::std::unary_function< ScriptEventDescr
{
void operator()( ScriptEventDescriptor& _rDescriptor )
{
- if ( 0 == _rDescriptor.ScriptType.compareToAscii( "StarBasic" ) )
+ if ( _rDescriptor.ScriptType.equalsAscii( "StarBasic" ) )
{ // it's a starbasic macro
sal_Int32 nPrefixLength = _rDescriptor.ScriptCode.indexOf( ':' );
if ( 0 <= nPrefixLength )
{ // the macro name does not already contain a :
#ifdef DBG_UTIL
const OUString sPrefix = _rDescriptor.ScriptCode.copy( 0, nPrefixLength );
- DBG_ASSERT( 0 == sPrefix.compareToAscii( "document" )
- || 0 == sPrefix.compareToAscii( "application" ),
+ DBG_ASSERT( sPrefix.equalsAscii( "document" )
+ || sPrefix.equalsAscii( "application" ),
"TransformEventTo52Format: invalid (unknown) prefix!" );
#endif
// cut the prefix
@@ -386,14 +386,12 @@ struct TransformEventTo60Format : public ::std::unary_function< ScriptEventDescr
{
void operator()( ScriptEventDescriptor& _rDescriptor )
{
- if ( 0 == _rDescriptor.ScriptType.compareToAscii( "StarBasic" ) )
+ if ( _rDescriptor.ScriptType.equalsAscii( "StarBasic" ) )
{ // it's a starbasic macro
if ( _rDescriptor.ScriptCode.indexOf( ':' ) < 0 )
{ // the macro name does not already contain a :
// -> default the type to "document"
- OUString sNewScriptCode( "document:" );
- sNewScriptCode += _rDescriptor.ScriptCode;
- _rDescriptor.ScriptCode = sNewScriptCode;
+ _rDescriptor.ScriptCode = "document:" + _rDescriptor.ScriptCode;
}
}
}
diff --git a/io/test/stm/datatest.cxx b/io/test/stm/datatest.cxx
index 3e80f09e382e..b556aab6192c 100644
--- a/io/test/stm/datatest.cxx
+++ b/io/test/stm/datatest.cxx
@@ -462,28 +462,28 @@ void MyPersistObject::setPropertyValue(
WrappedTargetException,
RuntimeException)
{
- if( 0 == aPropertyName.compareToAscii("long") ) {
+ if( aPropertyName.equalsAscii("long") ) {
aValue >>= m_l;
}
- else if ( 0 == aPropertyName.compareToAscii("float") ) {
+ else if ( aPropertyName.equalsAscii("float") ) {
aValue >>= m_f;
}
- else if( 0 == aPropertyName.compareToAscii("double") ) {
+ else if( aPropertyName.equalsAscii("double") ) {
aValue >>= m_d;
}
- else if( 0 == aPropertyName.compareToAscii("bool") ) {
+ else if( aPropertyName.equalsAscii("bool") ) {
aValue >>= m_b;
}
- else if( 0 == aPropertyName.compareToAscii("byte" ) ) {
+ else if( aPropertyName.equalsAscii("byte" ) ) {
aValue >>= m_byte;
}
- else if( 0 == aPropertyName.compareToAscii("char") ) {
+ else if( aPropertyName.equalsAscii("char") ) {
aValue >>= m_c;
}
- else if( 0 == aPropertyName.compareToAscii("string") ) {
+ else if( aPropertyName.equalsAscii("string") ) {
aValue >>= m_s;
}
- else if( 0 == aPropertyName.compareToAscii("object") ) {
+ else if( aPropertyName.equalsAscii("object") ) {
if( aValue.getValueType() == getCppuType( (Reference< XPersistObject> *)0 ) )
{
aValue >>= m_ref;
@@ -502,28 +502,28 @@ Any MyPersistObject::getPropertyValue(const OUString& aPropertyName)
RuntimeException)
{
Any aValue;
- if( 0 == aPropertyName.compareToAscii("long" ) ) {
+ if( aPropertyName.equalsAscii("long" ) ) {
aValue <<= m_l;
}
- else if ( 0 == aPropertyName.compareToAscii("float") ) {
+ else if ( aPropertyName.equalsAscii("float") ) {
aValue <<= m_f;
}
- else if( 0 == aPropertyName.compareToAscii("double") ) {
+ else if( aPropertyName.equalsAscii("double") ) {
aValue <<= m_d;
}
- else if( 0 == aPropertyName.compareToAscii("bool") ) {
+ else if( aPropertyName.equalsAscii("bool") ) {
aValue <<= m_b;
}
- else if( 0 == aPropertyName.compareToAscii("byte") ) {
+ else if( aPropertyName.equalsAscii("byte") ) {
aValue <<= m_byte;
}
- else if( 0 == aPropertyName.compareToAscii("char" ) ) {
+ else if( aPropertyName.equalsAscii("char" ) ) {
aValue <<= m_c;
}
- else if( 0 == aPropertyName.compareToAscii("string") ) {
+ else if( aPropertyName.equalsAscii("string") ) {
aValue <<= m_s;
}
- else if( 0 == aPropertyName.compareToAscii("object" ) )
+ else if( aPropertyName.equalsAscii("object" ) )
{
aValue <<= m_ref;
}
@@ -699,8 +699,8 @@ sal_Int32 OObjectStreamTest::test( const OUString& TestName,
throw ( IllegalArgumentException,
RuntimeException)
{
- if( 0 == TestName.compareToAscii("com.sun.star.io.ObjectInputStream") ||
- 0 == TestName.compareToAscii("com.sun.star.io.ObjectOutputStream" ) ) {
+ if( TestName.equalsAscii("com.sun.star.io.ObjectInputStream") ||
+ TestName.equalsAscii("com.sun.star.io.ObjectOutputStream") ) {
try
{
diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx
index 51dc1708dff8..99df1e999b7e 100644
--- a/linguistic/source/lngsvcmgr.cxx
+++ b/linguistic/source/lngsvcmgr.cxx
@@ -1550,22 +1550,22 @@ uno::Sequence< OUString > SAL_CALL
uno::Sequence< OUString > aRes;
const SvcInfoArray *pInfoArray = 0;
- if (0 == rServiceName.compareToAscii( SN_SPELLCHECKER ))
+ if (rServiceName.equalsAscii( SN_SPELLCHECKER ))
{
GetAvailableSpellSvcs_Impl();
pInfoArray = pAvailSpellSvcs;
}
- else if (0 == rServiceName.compareToAscii( SN_GRAMMARCHECKER ))
+ else if (rServiceName.equalsAscii( SN_GRAMMARCHECKER ))
{
GetAvailableGrammarSvcs_Impl();
pInfoArray = pAvailGrammarSvcs;
}
- else if (0 == rServiceName.compareToAscii( SN_HYPHENATOR ))
+ else if (rServiceName.equalsAscii( SN_HYPHENATOR ))
{
GetAvailableHyphSvcs_Impl();
pInfoArray = pAvailHyphSvcs;
}
- else if (0 == rServiceName.compareToAscii( SN_THESAURUS ))
+ else if (rServiceName.equalsAscii( SN_THESAURUS ))
{
GetAvailableThesSvcs_Impl();
pInfoArray = pAvailThesSvcs;
@@ -1609,13 +1609,13 @@ uno::Sequence< lang::Locale > SAL_CALL
uno::Sequence< lang::Locale > aRes;
uno::Sequence< lang::Locale > *pAvailLocales = NULL;
- if (0 == rServiceName.compareToAscii( SN_SPELLCHECKER ))
+ if (rServiceName.equalsAscii( SN_SPELLCHECKER ))
pAvailLocales = &aAvailSpellLocales;
- else if (0 == rServiceName.compareToAscii( SN_GRAMMARCHECKER ))
+ else if (rServiceName.equalsAscii( SN_GRAMMARCHECKER ))
pAvailLocales = &aAvailGrammarLocales;
- else if (0 == rServiceName.compareToAscii( SN_HYPHENATOR ))
+ else if (rServiceName.equalsAscii( SN_HYPHENATOR ))
pAvailLocales = &aAvailHyphLocales;
- else if (0 == rServiceName.compareToAscii( SN_THESAURUS ))
+ else if (rServiceName.equalsAscii( SN_THESAURUS ))
pAvailLocales = &aAvailThesLocales;
// Nowadays (with OOo lingu in SO) we want to know immediately about
@@ -1669,7 +1669,7 @@ void SAL_CALL
LanguageType nLanguage = LinguLocaleToLanguage( rLocale );
if (!LinguIsUnspecified( nLanguage))
{
- if (0 == rServiceName.compareToAscii( SN_SPELLCHECKER ))
+ if (rServiceName.equalsAscii( SN_SPELLCHECKER ))
{
if (!xSpellDsp.is())
GetSpellCheckerDsp_Impl();
@@ -1686,7 +1686,7 @@ void SAL_CALL
linguistic2::LinguServiceEventFlags::SPELL_WRONG_WORDS_AGAIN );
}
}
- else if (0 == rServiceName.compareToAscii( SN_GRAMMARCHECKER ))
+ else if (rServiceName.equalsAscii( SN_GRAMMARCHECKER ))
{
if (!xGrammarDsp.is())
GetGrammarCheckerDsp_Impl();
@@ -1702,7 +1702,7 @@ void SAL_CALL
linguistic2::LinguServiceEventFlags::PROOFREAD_AGAIN );
}
}
- else if (0 == rServiceName.compareToAscii( SN_HYPHENATOR ))
+ else if (rServiceName.equalsAscii( SN_HYPHENATOR ))
{
if (!xHyphDsp.is())
GetHyphenatorDsp_Impl();
@@ -1718,7 +1718,7 @@ void SAL_CALL
linguistic2::LinguServiceEventFlags::HYPHENATE_AGAIN );
}
}
- else if (0 == rServiceName.compareToAscii( SN_THESAURUS ))
+ else if (rServiceName.equalsAscii( SN_THESAURUS ))
{
if (!xThesDsp.is())
GetThesaurusDsp_Impl();
@@ -1910,7 +1910,7 @@ uno::Sequence< OUString > SAL_CALL
uno::Sequence< uno::Any > aValues;
uno::Sequence< OUString > aNames( 1 );
OUString *pNames = aNames.getArray();
- if ( 0 == rServiceName.compareToAscii( SN_SPELLCHECKER ) )
+ if ( rServiceName.equalsAscii( SN_SPELLCHECKER ) )
{
OUString aNode( "ServiceManager/SpellCheckerList");
const uno::Sequence< OUString > aNodeEntries( GetNodeNames( aNode ) );
@@ -1925,7 +1925,7 @@ uno::Sequence< OUString > SAL_CALL
aSvcImplNames = GetLangSvcList( aValues.getConstArray()[0] );
}
}
- else if ( 0 == rServiceName.compareToAscii( SN_GRAMMARCHECKER ) )
+ else if ( rServiceName.equalsAscii( SN_GRAMMARCHECKER ) )
{
OUString aNode( "ServiceManager/GrammarCheckerList");
const uno::Sequence< OUString > aNodeEntries( GetNodeNames( aNode ) );
@@ -1940,7 +1940,7 @@ uno::Sequence< OUString > SAL_CALL
aSvcImplNames = GetLangSvc( aValues.getConstArray()[0] );
}
}
- else if ( 0 == rServiceName.compareToAscii( SN_HYPHENATOR ) )
+ else if ( rServiceName.equalsAscii( SN_HYPHENATOR ) )
{
OUString aNode( "ServiceManager/HyphenatorList");
const uno::Sequence< OUString > aNodeEntries( GetNodeNames( aNode ) );
@@ -1955,7 +1955,7 @@ uno::Sequence< OUString > SAL_CALL
aSvcImplNames = GetLangSvc( aValues.getConstArray()[0] );
}
}
- else if ( 0 == rServiceName.compareToAscii( SN_THESAURUS ) )
+ else if ( rServiceName.equalsAscii( SN_THESAURUS ) )
{
OUString aNode( "ServiceManager/ThesaurusList");
const uno::Sequence< OUString > aNodeEntries( GetNodeNames( aNode ) );
@@ -2093,7 +2093,7 @@ void * SAL_CALL LngSvcMgr_getFactory(
{
void * pRet = 0;
- if ( !LngSvcMgr::getImplementationName_Static().compareToAscii( pImplName ) )
+ if ( LngSvcMgr::getImplementationName_Static().equalsAscii( pImplName ) )
{
uno::Reference< lang::XSingleServiceFactory > xFactory =
cppu::createOneInstanceFactory(
diff --git a/padmin/source/desktopcontext.cxx b/padmin/source/desktopcontext.cxx
index 01ba6dee1f09..6a3878a932c0 100644
--- a/padmin/source/desktopcontext.cxx
+++ b/padmin/source/desktopcontext.cxx
@@ -36,7 +36,7 @@ Any SAL_CALL DesktopContext::getValueByName( const OUString& Name) throw (Runtim
{
Any retVal;
- if ( 0 == Name.compareToAscii( DESKTOP_ENVIRONMENT_NAME ) )
+ if ( Name.equalsAscii( DESKTOP_ENVIRONMENT_NAME ) )
{
retVal = makeAny( Application::GetDesktopEnvironment() );
}
diff --git a/pyuno/source/module/pyuno_adapter.cxx b/pyuno/source/module/pyuno_adapter.cxx
index 41a2e242aad1..9b79492826d2 100644
--- a/pyuno/source/module/pyuno_adapter.cxx
+++ b/pyuno/source/module/pyuno_adapter.cxx
@@ -184,7 +184,7 @@ Any Adapter::invoke( const OUString &aFunctionName,
// special hack for the uno object identity concept. The XUnoTunnel.getSomething() call is
// always handled by the adapter directly.
- if( aParams.getLength() == 1 && 0 == aFunctionName.compareToAscii( "getSomething" ) )
+ if( aParams.getLength() == 1 && aFunctionName.equalsAscii( "getSomething" ) )
{
Sequence< sal_Int8 > id;
if( aParams[0] >>= id )
@@ -246,8 +246,8 @@ Any Adapter::invoke( const OUString &aFunctionName,
if( ret.hasValue() &&
ret.getValueTypeClass() == com::sun::star::uno::TypeClass_SEQUENCE &&
- 0 != aFunctionName.compareToAscii( "getTypes" ) && // needed by introspection itself !
- 0 != aFunctionName.compareToAscii( "getImplementationId" ) ) // needed by introspection itself !
+ ! aFunctionName.equalsAscii( "getTypes" ) && // needed by introspection itself !
+ ! aFunctionName.equalsAscii( "getImplementationId" ) ) // needed by introspection itself !
{
// the sequence can either be
// 1) a simple sequence return value
diff --git a/sdext/source/pdfimport/services.cxx b/sdext/source/pdfimport/services.cxx
index 75c6e0649e0f..156244fc5677 100644
--- a/sdext/source/pdfimport/services.cxx
+++ b/sdext/source/pdfimport/services.cxx
@@ -122,7 +122,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL pdfimport_component_getFactory(
const ComponentDescription* pComponents = lcl_getComponents();
while ( pComponents->pAsciiServiceName != NULL )
{
- if ( 0 == sImplementationName.compareToAscii( pComponents->pAsciiImplementationName ) )
+ if ( sImplementationName.equalsAscii( pComponents->pAsciiImplementationName ) )
{
Sequence< OUString > sServices(1);
sServices[0] = OUString::createFromAscii( pComponents->pAsciiServiceName );
diff --git a/sfx2/source/appl/helpdispatch.cxx b/sfx2/source/appl/helpdispatch.cxx
index 5ce49523ee0c..ee6b5d207078 100644
--- a/sfx2/source/appl/helpdispatch.cxx
+++ b/sfx2/source/appl/helpdispatch.cxx
@@ -64,10 +64,10 @@ void SAL_CALL HelpDispatch_Impl::dispatch(
const PropertyValue* pEnd = pBegin + aArgs.getLength();
for ( ; pBegin != pEnd; ++pBegin )
{
- if ( 0 == ( *pBegin ).Name.compareToAscii( "HelpKeyword" ) )
+ if ( pBegin->Name.equalsAscii( "HelpKeyword" ) )
{
OUString sHelpKeyword;
- if ( ( ( *pBegin ).Value >>= sHelpKeyword ) && !sHelpKeyword.isEmpty() )
+ if ( ( pBegin->Value >>= sHelpKeyword ) && !sHelpKeyword.isEmpty() )
{
sKeyword = sHelpKeyword;
bHasKeyword = !sKeyword.isEmpty();
diff --git a/shell/source/cmdmail/cmdmailmsg.cxx b/shell/source/cmdmail/cmdmailmsg.cxx
index fa080d92f9a6..b5cfbf0d75d9 100644
--- a/shell/source/cmdmail/cmdmailmsg.cxx
+++ b/shell/source/cmdmail/cmdmailmsg.cxx
@@ -132,25 +132,25 @@ Any SAL_CALL CmdMailMsg::getByName( const OUString& aName )
{
MutexGuard aGuard( m_aMutex );
- if( 0 == aName.compareToAscii( "body" ) && !m_aBody.isEmpty() )
+ if( aName.equalsAscii( "body" ) && !m_aBody.isEmpty() )
return makeAny( m_aBody );
- if( 0 == aName.compareToAscii( "from" ) && !m_aOriginator.isEmpty() )
+ if( aName.equalsAscii( "from" ) && !m_aOriginator.isEmpty() )
return makeAny( m_aOriginator );
- else if( 0 == aName.compareToAscii( "to" ) && !m_aRecipient.isEmpty() )
+ else if( aName.equalsAscii( "to" ) && !m_aRecipient.isEmpty() )
return makeAny( m_aRecipient );
- else if( 0 == aName.compareToAscii( "cc" ) && m_CcRecipients.getLength() )
+ else if( aName.equalsAscii( "cc" ) && m_CcRecipients.getLength() )
return makeAny( m_CcRecipients );
- else if( 0 == aName.compareToAscii( "bcc" ) && m_BccRecipients.getLength() )
+ else if( aName.equalsAscii( "bcc" ) && m_BccRecipients.getLength() )
return makeAny( m_BccRecipients );
- else if( 0 == aName.compareToAscii( "subject" ) && !m_aSubject.isEmpty() )
+ else if( aName.equalsAscii( "subject" ) && !m_aSubject.isEmpty() )
return makeAny( m_aSubject );
- else if( 0 == aName.compareToAscii( "attachment" ) && m_Attachments.getLength() )
+ else if( aName.equalsAscii( "attachment" ) && m_Attachments.getLength() )
return makeAny( m_Attachments );
throw NoSuchElementException("key not found: " + aName,
@@ -195,25 +195,25 @@ Sequence< OUString > SAL_CALL CmdMailMsg::getElementNames( )
{
MutexGuard aGuard( m_aMutex );
- if( 0 == aName.compareToAscii( "body" ) && !m_aBody.isEmpty() )
+ if( aName.equalsAscii( "body" ) && !m_aBody.isEmpty() )
return sal_True;
- if( 0 == aName.compareToAscii( "from" ) && !m_aOriginator.isEmpty() )
+ if( aName.equalsAscii( "from" ) && !m_aOriginator.isEmpty() )
return sal_True;
- else if( 0 == aName.compareToAscii( "to" ) && !m_aRecipient.isEmpty() )
+ else if( aName.equalsAscii( "to" ) && !m_aRecipient.isEmpty() )
return sal_True;
- else if( 0 == aName.compareToAscii( "cc" ) && m_CcRecipients.getLength() )
+ else if( aName.equalsAscii( "cc" ) && m_CcRecipients.getLength() )
return sal_True;
- else if( 0 == aName.compareToAscii( "bcc" ) && m_BccRecipients.getLength() )
+ else if( aName.equalsAscii( "bcc" ) && m_BccRecipients.getLength() )
return sal_True;
- else if( 0 == aName.compareToAscii( "subject" ) && !m_aSubject.isEmpty() )
+ else if( aName.equalsAscii( "subject" ) && !m_aSubject.isEmpty() )
return sal_True;
- else if( 0 == aName.compareToAscii( "attachment" ) && m_Attachments.getLength() )
+ else if( aName.equalsAscii( "attachment" ) && m_Attachments.getLength() )
return sal_True;
return sal_False;
diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx
index ea051c7446e3..8c0be63be0d3 100644
--- a/svtools/source/graphic/provider.cxx
+++ b/svtools/source/graphic/provider.cxx
@@ -169,7 +169,7 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadMemory( const OUS
uno::Reference< ::graphic::XGraphic > xRet;
sal_Int32 nIndex = 0;
- if( ( 0 == rResourceURL.getToken( 0, '/', nIndex ).compareToAscii( "private:memorygraphic" ) ) )
+ if( rResourceURL.getToken( 0, '/', nIndex ).equalsAscii( "private:memorygraphic" ) )
{
sal_Int64 nGraphicAddress = rResourceURL.getToken( 0, '/', nIndex ).toInt64();
@@ -192,7 +192,7 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadRepositoryImage(
uno::Reference< ::graphic::XGraphic > xRet;
sal_Int32 nIndex = 0;
- if( ( 0 == rResourceURL.getToken( 0, '/', nIndex ).compareToAscii( "private:graphicrepository" ) ) )
+ if( rResourceURL.getToken( 0, '/', nIndex ).equalsAscii( "private:graphicrepository" ) )
{
OUString sPathName( rResourceURL.copy( nIndex ) );
BitmapEx aBitmap;
@@ -213,7 +213,7 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadStandardImage( co
uno::Reference< ::graphic::XGraphic > xRet;
sal_Int32 nIndex = 0;
- if( ( 0 == rResourceURL.getToken( 0, '/', nIndex ).compareToAscii( "private:standardimage" ) ) )
+ if( rResourceURL.getToken( 0, '/', nIndex ).equalsAscii( "private:standardimage" ) )
{
OUString sImageName( rResourceURL.copy( nIndex ) );
if ( sImageName == "info" )
@@ -277,7 +277,7 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadResource( const O
uno::Reference< ::graphic::XGraphic > xRet;
sal_Int32 nIndex = 0;
- if( ( 0 == rResourceURL.getToken( 0, '/', nIndex ).compareToAscii( "private:resource" ) ) )
+ if( rResourceURL.getToken( 0, '/', nIndex ).equalsAscii( "private:resource" ) )
{
OString aResMgrName(OUStringToOString(
rResourceURL.getToken(0, '/', nIndex), RTL_TEXTENCODING_ASCII_US));
@@ -293,8 +293,8 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadResource( const O
{
BitmapEx aBmpEx;
- if( ( 0 == aResourceType.compareToAscii( "bitmap" ) ) ||
- ( 0 == aResourceType.compareToAscii( "bitmapex" ) ) )
+ if( aResourceType.equalsAscii( "bitmap" ) ||
+ aResourceType.equalsAscii( "bitmapex" ) )
{
aResId.SetRT( RSC_BITMAP );
@@ -303,7 +303,7 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadResource( const O
aBmpEx = BitmapEx( aResId );
}
}
- else if( 0 == aResourceType.compareToAscii( "image" ) )
+ else if( aResourceType.equalsAscii( "image" ) )
{
aResId.SetRT( RSC_IMAGE );
@@ -313,7 +313,7 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadResource( const O
aBmpEx = aImage.GetBitmapEx();
}
}
- else if( 0 == aResourceType.compareToAscii( "imagelist" ) )
+ else if( aResourceType.equalsAscii( "imagelist" ) )
{
aResId.SetRT( RSC_IMAGELIST );
diff --git a/svtools/source/java/javacontext.cxx b/svtools/source/java/javacontext.cxx
index 93e42e3c3a1a..e51d2ca450e5 100644
--- a/svtools/source/java/javacontext.cxx
+++ b/svtools/source/java/javacontext.cxx
@@ -65,7 +65,7 @@ Any SAL_CALL JavaContext::getValueByName( const OUString& Name) throw (RuntimeEx
{
Any retVal;
- if ( 0 == Name.compareToAscii( JAVA_INTERACTION_HANDLER_NAME ))
+ if ( Name.equalsAscii( JAVA_INTERACTION_HANDLER_NAME ))
{
{
osl::MutexGuard aGuard(osl::Mutex::getGlobalMutex());
diff --git a/svtools/source/uno/addrtempuno.cxx b/svtools/source/uno/addrtempuno.cxx
index 691c278e0369..7ae18f496459 100644
--- a/svtools/source/uno/addrtempuno.cxx
+++ b/svtools/source/uno/addrtempuno.cxx
@@ -215,7 +215,7 @@ namespace svt
PropertyValue aVal;
if (_rValue >>= aVal)
{
- if (0 == aVal.Name.compareToAscii("DataSource"))
+ if (aVal.Name.equalsAscii("DataSource"))
{
#if OSL_DEBUG_LEVEL > 0
sal_Bool bSuccess =
@@ -225,7 +225,7 @@ namespace svt
return;
}
- if (0 == aVal.Name.compareToAscii("DataSourceName"))
+ if (aVal.Name.equalsAscii("DataSourceName"))
{
#if OSL_DEBUG_LEVEL > 0
sal_Bool bSuccess =
@@ -235,7 +235,7 @@ namespace svt
return;
}
- if (0 == aVal.Name.compareToAscii("Command"))
+ if (aVal.Name.equalsAscii("Command"))
{
#if OSL_DEBUG_LEVEL > 0
sal_Bool bSuccess =
diff --git a/svtools/source/uno/miscservices.cxx b/svtools/source/uno/miscservices.cxx
index a62b248cfcdb..afd04f4919bc 100644
--- a/svtools/source/uno/miscservices.cxx
+++ b/svtools/source/uno/miscservices.cxx
@@ -130,14 +130,14 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL svt_component_getFactory (
SvFilterOptionsDialog_CreateInstance,
aServiceNames);
}
- else if( 0 == GraphicProvider::getImplementationName_Static().compareToAscii( pImplementationName ) )
+ else if( GraphicProvider::getImplementationName_Static().equalsAscii( pImplementationName ) )
{
xFactory = ::cppu::createOneInstanceFactory(xSMgr,
GraphicProvider::getImplementationName_Static(),
GraphicProvider_CreateInstance,
GraphicProvider::getSupportedServiceNames_Static() );
}
- else if( 0 == GraphicRendererVCL::getImplementationName_Static().compareToAscii( pImplementationName ) )
+ else if( GraphicRendererVCL::getImplementationName_Static().equalsAscii( pImplementationName ) )
{
xFactory = ::cppu::createOneInstanceFactory(xSMgr,
GraphicRendererVCL::getImplementationName_Static(),
diff --git a/svtools/source/uno/unoevent.cxx b/svtools/source/uno/unoevent.cxx
index d5c5240db20e..9a4870e6b1fd 100644
--- a/svtools/source/uno/unoevent.cxx
+++ b/svtools/source/uno/unoevent.cxx
@@ -168,7 +168,7 @@ sal_uInt16 SvBaseEventDescriptor::mapNameToEventID(const OUString& rName) const
// iterate over known event names
for(sal_Int16 i = 0; i < mnMacroItems; i++)
{
- if (0 == rName.compareToAscii(mpSupportedMacroItems[i].mpEventName))
+ if( rName.equalsAscii(mpSupportedMacroItems[i].mpEventName))
{
return mpSupportedMacroItems[i].mnEvent;
}
diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx
index 7696f882dc42..070cdb8dd60e 100644
--- a/svx/source/form/fmscriptingenv.cxx
+++ b/svx/source/form/fmscriptingenv.cxx
@@ -974,8 +974,8 @@ namespace svxform
{
// and it has such a prefix
sMacroLocation = sScriptCode.copy( 0, nPrefixLen );
- DBG_ASSERT( 0 == sMacroLocation.compareToAscii( "document" )
- || 0 == sMacroLocation.compareToAscii( "application" ),
+ DBG_ASSERT( sMacroLocation.equalsAscii( "document" )
+ || sMacroLocation.equalsAscii( "application" ),
"FormScriptingEnvironment::doFireScriptEvent: invalid (unknown) prefix!" );
// strip the prefix: the SfxObjectShell::CallScript knows nothing about such prefixes
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index a18e92969462..fbcc2675cf7c 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -3595,7 +3595,7 @@ void FmXFormShell::Notify( const com::sun::star::uno::Sequence< OUString >& _rPr
const OUString* pSearch = _rPropertyNames.getConstArray();
const OUString* pSearchTil = pSearch + _rPropertyNames.getLength();
for (;pSearch < pSearchTil; ++pSearch)
- if (0 == pSearch->compareToAscii("FormControlPilotsEnabled"))
+ if (pSearch->equalsAscii("FormControlPilotsEnabled"))
{
implAdjustConfigCache();
InvalidateSlot( SID_FM_USE_WIZARDS, sal_True );
diff --git a/svx/source/form/fmsrccfg.cxx b/svx/source/form/fmsrccfg.cxx
index c74e4df31265..a013b3b47dbb 100644
--- a/svx/source/form/fmsrccfg.cxx
+++ b/svx/source/form/fmsrccfg.cxx
@@ -109,18 +109,13 @@ namespace svxform
const Ascii2Int16* pSearch = _pMap;
while ( pSearch && pSearch->pAscii )
{
- if ( 0 == _rAsciiValue.compareToAscii( pSearch->pAscii ) )
+ if ( _rAsciiValue.equalsAscii( pSearch->pAscii ) )
// found
return pSearch->nValue;
++pSearch;
}
- OSL_FAIL(
- ( OString( "lcl_implMapAsciiValue: could not convert the ascii value " )
- += OString( _rAsciiValue.getStr(), _rAsciiValue.getLength(), RTL_TEXTENCODING_ASCII_US )
- += OString( " !" )
- ).getStr()
- );
+ OSL_FAIL("lcl_implMapAsciiValue: could not convert the ascii value " + _rAsciiValue + " !");
return -1;
}
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index fbddd97bf583..52e142c0673c 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -424,7 +424,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
const beans::PropertyValue* pFilterProperties = aFilterProperties.getConstArray();
for(int nProp = 0; nProp < aFilterProperties.getLength(); nProp++)
{
- if(!pFilterProperties[nProp].Name.compareToAscii("UIName"))
+ if(pFilterProperties[nProp].Name.equalsAscii("UIName"))
{
pFilterProperties[nProp].Value >>= sUIName2;
break;
@@ -433,7 +433,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell,
if( !sUIName2.isEmpty() )
{
sal_uInt16 nFilter = aFilterLB.InsertEntry( sUIName2 );
- if( 0 == sFilter.compareToAscii("writer8") )
+ if( sFilter.equalsAscii("writer8") )
nODT = nFilter;
aFilterLB.SetEntryData( nFilter, new OUString( sFilter ) );
}
diff --git a/testtools/source/bridgetest/bridgetest.cxx b/testtools/source/bridgetest/bridgetest.cxx
index ef5ee55b05cc..a82bfc28f795 100644
--- a/testtools/source/bridgetest/bridgetest.cxx
+++ b/testtools/source/bridgetest/bridgetest.cxx
@@ -969,7 +969,7 @@ static sal_Bool raiseException( const Reference< XBridgeTest > & xLBT )
if (rExc.ArgumentPosition == 5 &&
#if OSL_DEBUG_LEVEL == 0
// java stack traces trash Message
- rExc.Message.compareToAscii( STRING_TEST_CONSTANT ) == 0 &&
+ rExc.Message.equalsAscii( STRING_TEST_CONSTANT ) &&
#endif
rExc.Context == xLBT->getInterface())
{
@@ -996,7 +996,7 @@ static sal_Bool raiseException( const Reference< XBridgeTest > & xLBT )
if (rExc.Context == xLBT->getInterface()
#if OSL_DEBUG_LEVEL == 0
// java stack traces trash Message
- && rExc.Message.compareToAscii( STRING_TEST_CONSTANT ) == 0
+ && rExc.Message.equalsAscii( STRING_TEST_CONSTANT )
#endif
)
{
@@ -1016,7 +1016,7 @@ static sal_Bool raiseException( const Reference< XBridgeTest > & xLBT )
if (rExc.Context == xLBT->getInterface()
#if OSL_DEBUG_LEVEL == 0
// java stack traces trash Message
- && rExc.Message.compareToAscii( STRING_TEST_CONSTANT ) == 0
+ && rExc.Message.equalsAscii( STRING_TEST_CONSTANT )
#endif
)
{
@@ -1157,7 +1157,7 @@ sal_Int32 TestBridgeImpl::run( const Sequence< OUString > & rArgs )
Reference< XInterface > xOriginal;
bool remote;
sal_Int32 i;
- if( rArgs.getLength() > 1 && 0 == rArgs[0].compareToAscii( "-u" ) )
+ if( rArgs.getLength() > 1 && rArgs[0].equalsAscii( "-u" ) )
{
remote = true;
i = 2;
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index 0d7ba626f0f4..6f1674460355 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -330,61 +330,61 @@ Reference< XInterface > ControlModelContainerBase::createInstance( const OUStrin
OGeometryControlModel_Base* pNewModel = NULL;
- if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlEditModel ) == 0 )
+ if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlEditModel ) )
pNewModel = new OGeometryControlModel< UnoControlEditModel >( m_xContext );
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlFormattedFieldModel ) == 0 )
+ else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlFormattedFieldModel ) )
pNewModel = new OGeometryControlModel< UnoControlFormattedFieldModel >( m_xContext);
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlFileControlModel ) == 0 )
+ else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlFileControlModel ) )
pNewModel = new OGeometryControlModel< UnoControlFileControlModel >( m_xContext );
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlButtonModel ) == 0 )
+ else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlButtonModel ) )
pNewModel = new OGeometryControlModel< UnoControlButtonModel >( m_xContext );
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlImageControlModel ) == 0 )
+ else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlImageControlModel ) )
pNewModel = new OGeometryControlModel< UnoControlImageControlModel >( m_xContext );
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlRadioButtonModel ) == 0 )
+ else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlRadioButtonModel ) )
pNewModel = new OGeometryControlModel< UnoControlRadioButtonModel >( m_xContext );
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlCheckBoxModel ) == 0 )
+ else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlCheckBoxModel ) )
pNewModel = new OGeometryControlModel< UnoControlCheckBoxModel >( m_xContext );
- else if ( aServiceSpecifier.compareToAscii( szServiceName_UnoControlFixedHyperlinkModel ) == 0 )
+ else if ( aServiceSpecifier.equalsAscii( szServiceName_UnoControlFixedHyperlinkModel ) )
pNewModel = new OGeometryControlModel< UnoControlFixedHyperlinkModel >( m_xContext );
- else if ( aServiceSpecifier.compareToAscii( szServiceName_UnoControlFixedTextModel ) == 0 )
+ else if ( aServiceSpecifier.equalsAscii( szServiceName_UnoControlFixedTextModel ) )
pNewModel = new OGeometryControlModel< UnoControlFixedTextModel >( m_xContext );
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlGroupBoxModel ) == 0 )
+ else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlGroupBoxModel ) )
pNewModel = new OGeometryControlModel< UnoControlGroupBoxModel >( m_xContext );
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlListBoxModel ) == 0 )
+ else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlListBoxModel ) )
pNewModel = new OGeometryControlModel< UnoControlListBoxModel >( m_xContext );
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlComboBoxModel ) == 0 )
+ else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlComboBoxModel ) )
pNewModel = new OGeometryControlModel< UnoControlComboBoxModel >( m_xContext );
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlDateFieldModel ) == 0 )
+ else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlDateFieldModel ) )
pNewModel = new OGeometryControlModel< UnoControlDateFieldModel >( m_xContext );
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlTimeFieldModel ) == 0 )
+ else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlTimeFieldModel ) )
pNewModel = new OGeometryControlModel< UnoControlTimeFieldModel >( m_xContext );
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlNumericFieldModel ) == 0 )
+ else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlNumericFieldModel ) )
pNewModel = new OGeometryControlModel< UnoControlNumericFieldModel >( m_xContext );
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlCurrencyFieldModel ) == 0 )
+ else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlCurrencyFieldModel ) )
pNewModel = new OGeometryControlModel< UnoControlCurrencyFieldModel >( m_xContext );
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlPatternFieldModel ) == 0 )
+ else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlPatternFieldModel ) )
pNewModel = new OGeometryControlModel< UnoControlPatternFieldModel >( m_xContext );
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlProgressBarModel ) == 0 )
+ else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlProgressBarModel ) )
pNewModel = new OGeometryControlModel< UnoControlProgressBarModel >( m_xContext );
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlScrollBarModel ) == 0 )
+ else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlScrollBarModel ) )
pNewModel = new OGeometryControlModel< UnoControlScrollBarModel >( m_xContext );
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlFixedLineModel ) == 0 )
+ else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlFixedLineModel ) )
pNewModel = new OGeometryControlModel< UnoControlFixedLineModel >( m_xContext );
- else if ( aServiceSpecifier.compareToAscii( szServiceName2_UnoControlRoadmapModel ) == 0 )
+ else if ( aServiceSpecifier.equalsAscii( szServiceName2_UnoControlRoadmapModel ) )
pNewModel = new OGeometryControlModel< UnoControlRoadmapModel >( m_xContext );
- else if ( aServiceSpecifier.compareToAscii( szServiceName_TreeControlModel ) == 0 )
+ else if ( aServiceSpecifier.equalsAscii( szServiceName_TreeControlModel ) )
pNewModel = new OGeometryControlModel< UnoTreeModel >( m_xContext );
- else if ( aServiceSpecifier.compareToAscii( szServiceName_GridControlModel ) == 0 )
+ else if ( aServiceSpecifier.equalsAscii( szServiceName_GridControlModel ) )
pNewModel = new OGeometryControlModel< UnoGridModel >( m_xContext );
- else if ( aServiceSpecifier.compareToAscii( szServiceName_UnoControlTabPageContainerModel ) == 0 )
+ else if ( aServiceSpecifier.equalsAscii( szServiceName_UnoControlTabPageContainerModel ) )
pNewModel = new OGeometryControlModel< UnoControlTabPageContainerModel >( m_xContext );
- else if ( aServiceSpecifier.compareToAscii( szServiceName_UnoMultiPageModel ) == 0 )
+ else if ( aServiceSpecifier.equalsAscii( szServiceName_UnoMultiPageModel ) )
pNewModel = new OGeometryControlModel< UnoMultiPageModel >( m_xContext );
- else if ( aServiceSpecifier.compareToAscii( szServiceName_UnoControlTabPageModel ) == 0 )
+ else if ( aServiceSpecifier.equalsAscii( szServiceName_UnoControlTabPageModel ) )
pNewModel = new OGeometryControlModel< UnoControlTabPageModel >( m_xContext );
- else if ( aServiceSpecifier.compareToAscii( szServiceName_UnoPageModel ) == 0 )
+ else if ( aServiceSpecifier.equalsAscii( szServiceName_UnoPageModel ) )
pNewModel = new OGeometryControlModel< UnoPageModel >( m_xContext );
- else if ( aServiceSpecifier.compareToAscii( szServiceName_UnoFrameModel ) == 0 )
+ else if ( aServiceSpecifier.equalsAscii( szServiceName_UnoFrameModel ) )
pNewModel = new OGeometryControlModel< UnoFrameModel >( m_xContext );
if ( !pNewModel )
@@ -1071,7 +1071,7 @@ void SAL_CALL ControlModelContainerBase::propertyChange( const PropertyChangeEve
{
SolarMutexGuard aGuard;
- DBG_ASSERT( 0 == _rEvent.PropertyName.compareToAscii( "TabIndex" ),
+ DBG_ASSERT( _rEvent.PropertyName.equalsAscii( "TabIndex" ),
"UnoControlDialogModel::propertyChange: not listening for this property!" );
// the accessor for the changed element
diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx
index 0f0344a50b49..066697291c91 100644
--- a/unotools/source/config/lingucfg.cxx
+++ b/unotools/source/config/lingucfg.cxx
@@ -290,7 +290,7 @@ sal_Bool SvtLinguConfigItem::GetHdlByName(
{
while (pEntry && pEntry->pFullPropName != NULL)
{
- if (0 == rPropertyName.compareToAscii( pEntry->pFullPropName ))
+ if (rPropertyName.equalsAscii( pEntry->pFullPropName ))
{
rnHdl = pEntry->nHdl;
break;
@@ -303,7 +303,7 @@ sal_Bool SvtLinguConfigItem::GetHdlByName(
{
while (pEntry && pEntry->pPropName != NULL)
{
- if (0 == rPropertyName.compareToAscii( pEntry->pPropName ))
+ if (rPropertyName.equalsAscii( pEntry->pPropName ))
{
rnHdl = pEntry->nHdl;
break;
diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx
index 0ffae6db625a..86438df125c6 100644
--- a/unotools/source/ucbhelper/tempfile.cxx
+++ b/unotools/source/ucbhelper/tempfile.cxx
@@ -67,7 +67,7 @@ OUString getParentName( const OUString& aFileName )
if( aParent.endsWith(":") && aParent.getLength() == 6 )
aParent += "/";
- if( 0 == aParent.compareToAscii( "file://" ) )
+ if( aParent.equalsAscii( "file://" ) )
aParent = "file:///";
return aParent;
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index d75147c1e00a..427d1d8fc3b4 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -125,7 +125,7 @@ static bool ImpIsEmptyURL( const OUString& rURL )
// #i13140# Also compare against 'toplevel' URLs. which also
// result in empty filename strings.
- if( 0 == rURL.compareToAscii( "#./" ) )
+ if( rURL.equalsAscii( "#./" ) )
return true;
return false;
@@ -2942,7 +2942,7 @@ void SdXMLPluginShapeContext::StartElement( const ::com::sun::star::uno::Referen
if( nPrefix == XML_NAMESPACE_DRAW && IsXMLToken( aLocalName, XML_MIME_TYPE ) )
{
- if( 0 == xAttrList->getValueByIndex( n ).compareToAscii( "application/vnd.sun.star.media" ) )
+ if( xAttrList->getValueByIndex( n ).equalsAscii( "application/vnd.sun.star.media" ) )
mbMedia = true;
// leave this loop
@@ -3089,49 +3089,49 @@ void SdXMLPluginShapeContext::EndElement()
{
const OUString& rName = maParams[ nParam ].Name;
- if( 0 == rName.compareToAscii( "Loop" ) )
+ if( rName.equalsAscii( "Loop" ) )
{
OUString aValueStr;
maParams[ nParam ].Value >>= aValueStr;
xProps->setPropertyValue("Loop",
- uno::makeAny( static_cast< sal_Bool >( 0 == aValueStr.compareToAscii( "true" ) ) ) );
+ uno::makeAny( static_cast< sal_Bool >( aValueStr.equalsAscii( "true" ) ) ) );
}
- else if( 0 == rName.compareToAscii( "Mute" ) )
+ else if( rName.equalsAscii( "Mute" ) )
{
OUString aValueStr;
maParams[ nParam ].Value >>= aValueStr;
xProps->setPropertyValue("Mute",
- uno::makeAny( static_cast< sal_Bool >( 0 == aValueStr.compareToAscii( "true" ) ) ) );
+ uno::makeAny( static_cast< sal_Bool >( aValueStr.equalsAscii( "true" ) ) ) );
}
- else if( 0 == rName.compareToAscii( "VolumeDB" ) )
+ else if( rName.equalsAscii( "VolumeDB" ) )
{
OUString aValueStr;
maParams[ nParam ].Value >>= aValueStr;
xProps->setPropertyValue("VolumeDB",
uno::makeAny( static_cast< sal_Int16 >( aValueStr.toInt32() ) ) );
}
- else if( 0 == rName.compareToAscii( "Zoom" ) )
+ else if( rName.equalsAscii( "Zoom" ) )
{
OUString aZoomStr;
media::ZoomLevel eZoomLevel;
maParams[ nParam ].Value >>= aZoomStr;
- if( 0 == aZoomStr.compareToAscii( "25%" ) )
+ if( aZoomStr.equalsAscii( "25%" ) )
eZoomLevel = media::ZoomLevel_ZOOM_1_TO_4;
- else if( 0 == aZoomStr.compareToAscii( "50%" ) )
+ else if( aZoomStr.equalsAscii( "50%" ) )
eZoomLevel = media::ZoomLevel_ZOOM_1_TO_2;
- else if( 0 == aZoomStr.compareToAscii( "100%" ) )
+ else if( aZoomStr.equalsAscii( "100%" ) )
eZoomLevel = media::ZoomLevel_ORIGINAL;
- else if( 0 == aZoomStr.compareToAscii( "200%" ) )
+ else if( aZoomStr.equalsAscii( "200%" ) )
eZoomLevel = media::ZoomLevel_ZOOM_2_TO_1;
- else if( 0 == aZoomStr.compareToAscii( "400%" ) )
+ else if( aZoomStr.equalsAscii( "400%" ) )
eZoomLevel = media::ZoomLevel_ZOOM_4_TO_1;
- else if( 0 == aZoomStr.compareToAscii( "fit" ) )
+ else if( aZoomStr.equalsAscii( "fit" ) )
eZoomLevel = media::ZoomLevel_FIT_TO_WINDOW;
- else if( 0 == aZoomStr.compareToAscii( "fixedfit" ) )
+ else if( aZoomStr.equalsAscii( "fixedfit" ) )
eZoomLevel = media::ZoomLevel_FIT_TO_WINDOW_FIXED_ASPECT;
- else if( 0 == aZoomStr.compareToAscii( "fullscreen" ) )
+ else if( aZoomStr.equalsAscii( "fullscreen" ) )
eZoomLevel = media::ZoomLevel_FULLSCREEN;
else
eZoomLevel = media::ZoomLevel_NOT_AVAILABLE;
diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx
index 834da3d6fdd8..afe1e72439ed 100644
--- a/xmloff/source/forms/elementimport.cxx
+++ b/xmloff/source/forms/elementimport.cxx
@@ -1286,8 +1286,8 @@ namespace xmloff
// * it's the image-data attribute
// * it's the target-location attribute, and we're dealign with an object which has the respective property
sal_Bool bMakeAbsolute =
- ( 0 == _rLocalName.compareToAscii( s_pImageDataAttributeName ) )
- || ( ( 0 == _rLocalName.compareToAscii( s_pTargetLocationAttributeName ) )
+ _rLocalName.equalsAscii( s_pImageDataAttributeName )
+ || ( _rLocalName.equalsAscii( s_pTargetLocationAttributeName )
&& ( ( OControlElement::BUTTON == m_eElementType )
|| ( OControlElement::IMAGE == m_eElementType )
)
@@ -1300,7 +1300,7 @@ namespace xmloff
// only resolve image related url
// we don't want say form url targets to be resolved
// using ResolveGraphicObjectURL
- if ( 0 == _rLocalName.compareToAscii( s_pImageDataAttributeName ) )
+ if ( _rLocalName.equalsAscii( s_pImageDataAttributeName ) )
sAdjustedValue = m_rContext.getGlobalContext().ResolveGraphicObjectURL( _rValue, sal_False );
else
sAdjustedValue = m_rContext.getGlobalContext().GetAbsoluteReference( _rValue );
diff --git a/xmloff/source/forms/layerimport.cxx b/xmloff/source/forms/layerimport.cxx
index d115e5ba571a..6dcfff2935d4 100644
--- a/xmloff/source/forms/layerimport.cxx
+++ b/xmloff/source/forms/layerimport.cxx
@@ -103,7 +103,7 @@ OFormLayerXMLImport_Impl::OFormLayerXMLImport_Impl(SvXMLImport& _rImporter)
// properties not added because they're already present in another form
OSL_ENSURE(
- 0 == OUString::createFromAscii(OAttributeMetaData::getCommonControlAttributeName(CCA_TARGET_LOCATION)).compareToAscii(
+ OUString::createFromAscii(OAttributeMetaData::getCommonControlAttributeName(CCA_TARGET_LOCATION)).equalsAscii(
OAttributeMetaData::getFormAttributeName(faAction)),
"OFormLayerXMLImport_Impl::OFormLayerXMLImport_Impl: invalid attribute names (1)!");
// if this fails, we would have to add a translation from faAction->PROPERTY_TARGETURL
@@ -111,7 +111,7 @@ OFormLayerXMLImport_Impl::OFormLayerXMLImport_Impl(SvXMLImport& _rImporter)
// and CCA_TARGET_LOCATION and faAction should be represented by the same attribute
OSL_ENSURE(
- 0 == OUString::createFromAscii(OAttributeMetaData::getCommonControlAttributeName(CCA_NAME)).compareToAscii(
+ OUString::createFromAscii(OAttributeMetaData::getCommonControlAttributeName(CCA_NAME)).equalsAscii(
OAttributeMetaData::getFormAttributeName(faName)),
"OFormLayerXMLImport_Impl::OFormLayerXMLImport_Impl: invalid attribute names (2)!");
// the same for faName, CCA_NAME and PROPERTY_NAME
@@ -484,7 +484,7 @@ SvXMLImportContext* OFormLayerXMLImport_Impl::createContext(const sal_uInt16 _nP
const Reference< xml::sax::XAttributeList >&)
{
SvXMLImportContext* pContext = NULL;
- if ( 0 == _rLocalName.compareToAscii( "form" ) )
+ if ( _rLocalName.equalsAscii( "form" ) )
{
if ( m_xCurrentPageFormsSupp.is() )
pContext = new OFormImport(*this, *this, _nPrefix, _rLocalName, m_xCurrentPageFormsSupp->getForms() );
diff --git a/xmloff/source/style/xmlprmap.cxx b/xmloff/source/style/xmlprmap.cxx
index 7ad12d57d1ab..b74e4f2b5292 100644
--- a/xmloff/source/style/xmlprmap.cxx
+++ b/xmloff/source/style/xmlprmap.cxx
@@ -183,7 +183,7 @@ sal_Int32 XMLPropertySetMapper::FindEntryIndex(
const XMLPropertySetMapperEntry_Impl& rEntry = aMapEntries[nIndex];
if( rEntry.nXMLNameSpace == nNameSpace &&
rEntry.sXMLAttributeName.equals( sXMLName ) &&
- 0 == rEntry.sAPIPropertyName.compareToAscii( sApiName ) )
+ rEntry.sAPIPropertyName.equalsAscii( sApiName ) )
return nIndex;
else
nIndex++;
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index a8edd774cf1b..686f771ab610 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -1512,7 +1512,7 @@ SvXMLImportContext *XMLTextFrameContext::CreateChildContext(
if( nPrefix == XML_NAMESPACE_DRAW && IsXMLToken( aLocalName, XML_MIME_TYPE ) )
{
- if( 0 == xAttrList->getValueByIndex( n ).compareToAscii( "application/vnd.sun.star.media" ) )
+ if( xAttrList->getValueByIndex( n ).equalsAscii( "application/vnd.sun.star.media" ) )
bMedia = true;
// leave this loop
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index d1d485b366ab..18cea9fb8060 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -1950,7 +1950,7 @@ void XMLTextFieldExport::ExportFieldDeclarations(
aAny >>= xPropSet;
// save interesting field masters
- if (0 == sFieldMasterType.compareToAscii(FIELD_SERVICE_SETEXP))
+ if (sFieldMasterType.equalsAscii(FIELD_SERVICE_SETEXP))
{
sal_Int32 nType = GetIntProperty(sPropertySubType, xPropSet);
@@ -1964,11 +1964,11 @@ void XMLTextFieldExport::ExportFieldDeclarations(
aVarName.push_back( sFieldMaster );
}
}
- else if (0 == sFieldMasterType.compareToAscii(FIELD_SERVICE_USER))
+ else if (sFieldMasterType.equalsAscii(FIELD_SERVICE_USER))
{
aUserName.push_back( sFieldMaster );
}
- else if (0 == sFieldMasterType.compareToAscii(FIELD_SERVICE_DDE))
+ else if (sFieldMasterType.equalsAscii(FIELD_SERVICE_DDE))
{
aDdeName.push_back( sFieldMaster );
}