Kaydet (Commit) fcd1637d authored tarafından Noel Grandin's avatar Noel Grandin

convert OUString compareToAscii == 0 to equalsAscii

Convert code like
   aStr.compareToAscii("XXX") == 0
to
  aStr.equalsAscii("XXX")
which is both easier to read and faster.

Change-Id: I448abf58f2fa0e7715dba53f8e8825ca0587c83f
üst ef90021a
......@@ -189,7 +189,7 @@ void BasicScriptListener_Impl::disposing(const EventObject& ) throw ( RuntimeExc
void BasicScriptListener_Impl::firing_impl( const ScriptEvent& aScriptEvent, Any* pRet )
{
if( aScriptEvent.ScriptType.compareToAscii( "StarBasic" ) == 0 )
if( aScriptEvent.ScriptType.equalsAscii( "StarBasic" ) )
{
// Full qualified name?
OUString aMacro( aScriptEvent.ScriptCode );
......
......@@ -38,7 +38,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL dbpool2_component_getFactory(const sal_Char*
{
void* pRet = NULL;
if (OPoolCollection::getImplementationName_Static().compareToAscii(_pImplName) == 0)
if (OPoolCollection::getImplementationName_Static().equalsAscii(_pImplName))
{
Reference< XSingleServiceFactory > xFactory(
::cppu::createOneInstanceFactory(
......
......@@ -173,7 +173,7 @@ namespace connectivity { namespace hsqldb
const PropertyValue* pEnd = pIter + aInfo.getLength();
for(;pIter != pEnd;++pIter)
{
if ( pIter->Name.compareToAscii("readonly") == 0 )
if ( pIter->Name.equalsAscii("readonly") )
m_bReadOnly = true;
}
}
......
......@@ -118,8 +118,8 @@ sal_Bool MorkDriver::acceptsURL(OUString const & url)
aAddrbookScheme = aAddrbookURI.copy(0, nLen);
}
if ((aAddrbookScheme.compareToAscii( "thunderbird" ) == 0) ||
(aAddrbookScheme.compareToAscii( "mozilla" ) == 0))
if (aAddrbookScheme.equalsAscii( "thunderbird" ) ||
aAddrbookScheme.equalsAscii( "mozilla" ) )
{
return true;
}
......
......@@ -875,8 +875,8 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT
matchString = parseTree->getChild(2)->getTokenValue();
}
if ( columnName.compareToAscii("0") ==0 && op == MQueryOp::Is &&
matchString.compareToAscii("1") == 0 ) {
if ( columnName.equalsAscii("0") && op == MQueryOp::Is &&
matchString.equalsAscii("1") ) {
OSL_TRACE("Query always evaluates to FALSE");
m_bIsAlwaysFalseQuery = sal_True;
}
......
......@@ -245,7 +245,7 @@ EDriverType MozabDriver::impl_classifyURL( const OUString& url )
for ( size_t i=0; i < sizeof( aSchemeMap ) / sizeof( aSchemeMap[0] ); ++i )
{
if ( aAddrbookScheme.compareToAscii( aSchemeMap[i].pScheme ) == 0 )
if ( aAddrbookScheme.equalsAscii( aSchemeMap[i].pScheme ) )
return aSchemeMap[i].eType;
}
......
......@@ -857,8 +857,8 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT
matchString = parseTree->getChild(2)->getTokenValue();
}
if ( columnName.compareToAscii("0") ==0 && op == MQueryOp::Is &&
matchString.compareToAscii("1") == 0 ) {
if ( columnName.equalsAscii("0") && op == MQueryOp::Is &&
matchString.equalsAscii("1") ) {
OSL_TRACE("Query always evaluates to FALSE");
m_bIsAlwaysFalseQuery = sal_True;
}
......
......@@ -38,7 +38,7 @@ SAL_DLLPUBLIC_EXPORT void* SAL_CALL sdbc2_component_getFactory(const sal_Char* _
{
void* pRet = NULL;
if (::drivermanager::OSDBCDriverManager::getImplementationName_static().compareToAscii(_pImplName) == 0)
if (::drivermanager::OSDBCDriverManager::getImplementationName_static().equalsAscii(_pImplName))
{
Reference< XSingleServiceFactory > xFactory(
::cppu::createOneInstanceFactory(
......
......@@ -809,9 +809,9 @@ Reference< XInterface > ORegistryFactoryHelper::createModuleFactory()
if( nPos != -1 )
{
aActivatorName = aLocation.copy( 0, nPos );
if( aActivatorName.compareToAscii( "java" ) == 0 )
if( aActivatorName.equalsAscii( "java" ) )
aActivatorName = "com.sun.star.loader.Java";
else if( aActivatorName.compareToAscii( "module" ) == 0 )
else if( aActivatorName.equalsAscii( "module" ) )
aActivatorName = "com.sun.star.loader.SharedLibrary";
aLocation = aLocation.copy( nPos + 3 );
}
......
......@@ -200,16 +200,16 @@ static Reference< XInterface > loadComponent(
OUString aExt( rLocation.copy( nDot +1 ) );
if (aExt.compareToAscii( "dll" ) == 0 ||
aExt.compareToAscii( "exe" ) == 0 ||
aExt.compareToAscii( "dylib" ) == 0 ||
aExt.compareToAscii( "so" ) == 0)
if (aExt.equalsAscii( "dll" ) ||
aExt.equalsAscii( "exe" ) ||
aExt.equalsAscii( "dylib" ) ||
aExt.equalsAscii( "so" ) )
{
createInstance(
xLoader, xContext, OUString("com.sun.star.loader.SharedLibrary") );
}
else if (aExt.compareToAscii( "jar" ) == 0 ||
aExt.compareToAscii( "class" ) == 0)
else if (aExt.equalsAscii( "jar" ) ||
aExt.equalsAscii( "class" ) )
{
createInstance(
xLoader, xContext, OUString("com.sun.star.loader.Java") );
......
......@@ -157,7 +157,7 @@ sal_Int32 SAL_CALL OContentHelper::createCommandIdentifier( ) throw (RuntimeExc
Any SAL_CALL OContentHelper::execute( const Command& aCommand, sal_Int32 /*CommandId*/, const Reference< XCommandEnvironment >& Environment ) throw (Exception, CommandAbortedException, RuntimeException)
{
Any aRet;
if ( aCommand.Name.compareToAscii( "getPropertyValues" ) == 0 )
if ( aCommand.Name.equalsAscii( "getPropertyValues" ) )
{
// getPropertyValues
......@@ -175,7 +175,7 @@ Any SAL_CALL OContentHelper::execute( const Command& aCommand, sal_Int32 /*Comma
}
aRet <<= getPropertyValues( Properties);
}
else if ( aCommand.Name.compareToAscii( "setPropertyValues" ) == 0 )
else if ( aCommand.Name.equalsAscii( "setPropertyValues" ) )
{
// setPropertyValues
......@@ -206,7 +206,7 @@ Any SAL_CALL OContentHelper::execute( const Command& aCommand, sal_Int32 /*Comma
aRet <<= setPropertyValues( aProperties, Environment );
}
else if ( aCommand.Name.compareToAscii( "getPropertySetInfo" ) == 0 )
else if ( aCommand.Name.equalsAscii( "getPropertySetInfo" ) )
{
// getPropertySetInfo
......
......@@ -763,7 +763,7 @@ sal_Bool ODatabaseDocument::impl_attachResource( const OUString& i_rLogicalDocum
{
if ( ( i_rLogicalDocumentURL == getURL() )
&& ( i_rMediaDescriptor.getLength() == 1 )
&& ( i_rMediaDescriptor[0].Name.compareToAscii( "BreakMacroSignature" ) == 0 )
&& ( i_rMediaDescriptor[0].Name.equalsAscii( "BreakMacroSignature" ) )
)
{
// this is a BAD hack of the Basic importer code ... there should be a dedicated API for this,
......
......@@ -397,7 +397,7 @@ Sequence< OUString > SAL_CALL ODocumentContainer::getAvailableServiceNames( ) t
Any SAL_CALL ODocumentContainer::execute( const Command& aCommand, sal_Int32 CommandId, const Reference< XCommandEnvironment >& Environment ) throw (Exception, CommandAbortedException, RuntimeException)
{
Any aRet;
if ( aCommand.Name.compareToAscii( "open" ) == 0 )
if ( aCommand.Name.equalsAscii( "open" ) )
{
// open command for a folder content
OpenCommandArgument2 aOpenCommand;
......
......@@ -1084,14 +1084,14 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co
dispose();
}
else if ( ( aCommand.Name.compareToAscii( "storeOwn" ) == 0 ) // compatibility
|| ( aCommand.Name.compareToAscii( "store" ) == 0 )
else if ( aCommand.Name.equalsAscii( "storeOwn" ) // compatibility
|| aCommand.Name.equalsAscii( "store" )
)
{
impl_store_throw();
}
else if ( ( aCommand.Name.compareToAscii( "shutdown" ) == 0 ) // compatibility
|| ( aCommand.Name.compareToAscii( "close" ) == 0 )
else if ( aCommand.Name.equalsAscii( "shutdown" ) // compatibility
|| aCommand.Name.equalsAscii( "close" )
)
{
aRet <<= impl_close_throw();
......
......@@ -137,7 +137,7 @@ namespace dbaccess
const DocumentEventData* pEventData = lcl_getDocumentEventData();
while ( pEventData->pAsciiEventName )
{
if ( _rEventName.compareToAscii( pEventData->pAsciiEventName ) == 0 )
if ( _rEventName.equalsAscii( pEventData->pAsciiEventName ) )
return pEventData->bNeedsSyncNotify;
++pEventData;
}
......
......@@ -439,7 +439,7 @@ Sequence< OUString > SAL_CALL SbaXDataBrowserController::FormControllerImpl::get
::sal_Bool SAL_CALL SbaXDataBrowserController::FormControllerImpl::supportsMode( const OUString& aMode ) throw (RuntimeException)
{
return aMode.compareToAscii( "DataMode" ) == 0;
return aMode.equalsAscii( "DataMode" );
}
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setModel(const Reference< ::com::sun::star::awt::XTabControllerModel > & /*Model*/) throw( RuntimeException )
......
......@@ -231,7 +231,7 @@ void Desktop::destroyAcceptor(const OUString& aAcceptString)
{
// special case stop all acceptors
AcceptorMap &rMap = acceptorMap::get();
if (aAcceptString.compareToAscii("all") == 0) {
if (aAcceptString.equalsAscii("all")) {
rMap.clear();
} else {
......
......@@ -230,15 +230,15 @@ Reference<XInterface> AccInstanceProvider::getInstance (const OUString& aName )
Reference<XInterface> rInstance;
if ( aName.compareToAscii( "StarOffice.ServiceManager" ) == 0)
if ( aName.equalsAscii( "StarOffice.ServiceManager" ) )
{
rInstance = Reference< XInterface >( m_rContext->getServiceManager() );
}
else if(aName.compareToAscii( "StarOffice.ComponentContext" ) == 0 )
else if(aName.equalsAscii( "StarOffice.ComponentContext" ) )
{
rInstance = m_rContext;
}
else if ( aName.compareToAscii("StarOffice.NamingService" ) == 0 )
else if ( aName.equalsAscii("StarOffice.NamingService" ) )
{
Reference< XNamingService > rNamingService(
m_rContext->getServiceManager()->createInstanceWithContext("com.sun.star.uno.NamingService", m_rContext),
......
......@@ -898,7 +898,7 @@ PluginDescription XPlugin_Impl::fitDescription( const OUString& rURL )
{
for( int i = 0; i < aDescrs.getLength(); i++ )
{
if( pDescrs[i].Mimetype.compareToAscii( m_pArgv[nArg] ) == 0 )
if( pDescrs[i].Mimetype.equalsAscii( m_pArgv[nArg] ) )
return pDescrs[i];
}
}
......
......@@ -462,7 +462,7 @@ namespace frm
const FeatureURL* pFeatures = lcl_getFeatureTable();
while ( pFeatures->pAsciiURL )
{
if ( _rCompleteURL.compareToAscii( pFeatures->pAsciiURL ) == 0 )
if ( _rCompleteURL.equalsAscii( pFeatures->pAsciiURL ) )
return pFeatures->nFormFeature;
++pFeatures;
}
......
......@@ -390,14 +390,14 @@ void JobURL::impldbg_checkURL( /*IN*/ const sal_Char* pURL ,
(aURL.isValid() ) &&
(aURL.getEvent(sEvent) ) &&
(!sEvent.isEmpty() ) &&
(sEvent.compareToAscii(pExpectedEvent)==0)
(sEvent.equalsAscii(pExpectedEvent))
);
if (bOK && pExpectedEventArgs!=NULL)
{
bOK = (
(aURL.getEventArgs(sEventArgs) ) &&
(sEventArgs.compareToAscii(pExpectedEventArgs)==0)
(sEventArgs.equalsAscii(pExpectedEventArgs))
);
};
}
......@@ -426,14 +426,14 @@ void JobURL::impldbg_checkURL( /*IN*/ const sal_Char* pURL ,
(aURL.isValid() ) &&
(aURL.getAlias(sAlias) ) &&
(!sAlias.isEmpty() ) &&
(sAlias.compareToAscii(pExpectedAlias)==0)
(sAlias.equalsAscii(pExpectedAlias))
);
if (bOK && pExpectedAliasArgs!=NULL)
{
bOK = (
(aURL.getAliasArgs(sAliasArgs) ) &&
(sAliasArgs.compareToAscii(pExpectedAliasArgs)==0)
(sAliasArgs.equalsAscii(pExpectedAliasArgs))
);
};
}
......@@ -462,14 +462,14 @@ void JobURL::impldbg_checkURL( /*IN*/ const sal_Char* pURL ,
(aURL.isValid() ) &&
(aURL.getService(sService) ) &&
(!sService.isEmpty() ) &&
(sService.compareToAscii(pExpectedService)==0)
(sService.equalsAscii(pExpectedService))
);
if (bOK && pExpectedServiceArgs!=NULL)
{
bOK = (
(aURL.getServiceArgs(sServiceArgs) ) &&
(sServiceArgs.compareToAscii(pExpectedServiceArgs)==0)
(sServiceArgs.equalsAscii(pExpectedServiceArgs))
);
};
}
......
......@@ -204,13 +204,13 @@ void SAL_CALL SessionListener::statusChanged(const FeatureStateEvent& event)
SAL_INFO("fwk.session", "SessionListener::statusChanged");
if ( event.FeatureURL.Complete == "vnd.sun.star.autorecovery:/doSessionRestore" )
{
if (event.FeatureDescriptor.compareToAscii("update")==0)
if (event.FeatureDescriptor.equalsAscii("update"))
m_bRestored = sal_True; // a document was restored
}
else if ( event.FeatureURL.Complete == "vnd.sun.star.autorecovery:/doSessionSave" )
{
if (event.FeatureDescriptor.compareToAscii("stop")==0)
if (event.FeatureDescriptor.equalsAscii("stop"))
{
if (m_rSessionManager.is())
m_rSessionManager->saveDone(this); // done with save
......
......@@ -587,9 +587,9 @@ BreakIteratorImpl::getLocaleSpecificBreakIterator(const Locale& rLocale) throw (
// load service with name <base>_<lang>_<country>
createLocaleSpecificBreakIterator(aBuf.append(rLocale.Language).append(under).append(
rLocale.Country).makeStringAndClear())) ||
(l > 0 && c > 0 && rLocale.Language.compareToAscii("zh") == 0 &&
(rLocale.Country.compareToAscii("HK") == 0 ||
rLocale.Country.compareToAscii("MO") == 0) &&
(l > 0 && c > 0 && rLocale.Language.equalsAscii("zh") &&
(rLocale.Country.equalsAscii("HK") ||
rLocale.Country.equalsAscii("MO") ) &&
// if the country code is HK or MO, one more step to try TW.
createLocaleSpecificBreakIterator(aBuf.append(rLocale.Language).append(under).appendAscii(
"TW").makeStringAndClear())) ||
......
......@@ -525,7 +525,7 @@ static
int should_ignore( OUString s )
{
// return true if blank or null
return s.compareToAscii(" ")==0 || (!s.isEmpty() && s[0]==0);
return s.equalsAscii(" ") || (!s.isEmpty() && s[0]==0);
}
static
......
......@@ -184,7 +184,7 @@ IndexEntrySupplier::getImplementationName() throw( RuntimeException )
sal_Bool SAL_CALL
IndexEntrySupplier::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return rServiceName.compareToAscii(implementationName) == 0;
return rServiceName.equalsAscii(implementationName);
}
Sequence< OUString > SAL_CALL
......
......@@ -126,7 +126,7 @@ IndexEntrySupplier_Common::getImplementationName() throw( RuntimeException )
sal_Bool SAL_CALL
IndexEntrySupplier_Common::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return rServiceName.compareToAscii(implementationName) == 0;
return rServiceName.equalsAscii(implementationName);
}
Sequence< OUString > SAL_CALL
......
......@@ -1297,7 +1297,7 @@ void LCCollationNode::generateCode (const OFileWriter &of) const
for ( j = 0; j < getNumberOfChildren(); j++ ) {
LocaleNode * currNode = getChildAt (j);
if( currNode->getName().compareToAscii("Collator") == 0 )
if( currNode->getName().equalsAscii("Collator") )
{
OUString str;
str = currNode->getAttr().getValueByName("unoid");
......@@ -1310,7 +1310,7 @@ void LCCollationNode::generateCode (const OFileWriter &of) const
nbOfCollations++;
}
if( currNode->getName().compareToAscii("CollationOptions") == 0 )
if( currNode->getName().equalsAscii("CollationOptions") )
{
LocaleNode* pCollationOptions = currNode;
nbOfCollationOptions = sal::static_int_cast<sal_Int16>( pCollationOptions->getNumberOfChildren() );
......@@ -1411,7 +1411,7 @@ void LCIndexNode::generateCode (const OFileWriter &of) const
sal_Int16 i;
for (i = 0; i< getNumberOfChildren();i++) {
LocaleNode * currNode = getChildAt (i);
if( currNode->getName().compareToAscii("IndexKey") == 0 )
if( currNode->getName().equalsAscii("IndexKey") )
{
OUString str;
str = currNode->getAttr().getValueByName("unoid");
......@@ -1428,13 +1428,13 @@ void LCIndexNode::generateCode (const OFileWriter &of) const
nbOfIndexs++;
}
if( currNode->getName().compareToAscii("UnicodeScript") == 0 )
if( currNode->getName().equalsAscii("UnicodeScript") )
{
of.writeParameter("unicodeScript", currNode->getValue(), nbOfUnicodeScripts );
nbOfUnicodeScripts++;
}
if( currNode->getName().compareToAscii("FollowPageWord") == 0 )
if( currNode->getName().equalsAscii("FollowPageWord") )
{
of.writeParameter("followPageWord", currNode->getValue(), nbOfPageWords);
nbOfPageWords++;
......
......@@ -898,7 +898,7 @@ OUString SAL_CALL NativeNumberSupplier::getImplementationName() throw( RuntimeEx
sal_Bool SAL_CALL
NativeNumberSupplier::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return rServiceName.compareToAscii(implementationName) == 0;
return rServiceName.equalsAscii(implementationName);
}
Sequence< OUString > SAL_CALL
......
......@@ -613,7 +613,7 @@ TransliterationImpl::loadModuleByName( const OUString& implName,
// if the module is ignore case/kana/width, load caseignore for equals/compareString mothed
for (sal_Int16 i = 0; i < 3; i++) {
if (implName.compareToAscii(TMlist[i].implName) == 0) {
if (implName.equalsAscii(TMlist[i].implName)) {
if (i == 0) // current module is caseignore
body->loadModule(TMlist[0].tm, rLocale); // caseingore need to setup module name
if (! caseignore.is()) {
......
......@@ -115,13 +115,13 @@ Reference< XDispatch > SAL_CALL Addon::queryDispatch( const URL& aURL, const ::r
throw( RuntimeException )
{
Reference < XDispatch > xRet;
if ( aURL.Protocol.compareToAscii("org.openoffice.Office.addon.example:") == 0 )
if ( aURL.Protocol.equalsAscii("org.openoffice.Office.addon.example:") )
{
if ( aURL.Path.compareToAscii( "Function1" ) == 0 )
if ( aURL.Path.equalsAscii( "Function1" ) )
xRet = this;
else if ( aURL.Path.compareToAscii( "Function2" ) == 0 )
else if ( aURL.Path.equalsAscii( "Function2" ) )
xRet = this;
else if ( aURL.Path.compareToAscii( "Help" ) == 0 )
else if ( aURL.Path.equalsAscii( "Help" ) )
xRet = this;
}
......@@ -134,21 +134,21 @@ Reference< XDispatch > SAL_CALL Addon::queryDispatch( const URL& aURL, const ::r
*/
void SAL_CALL Addon::dispatch( const URL& aURL, const Sequence < PropertyValue >& lArgs ) throw (RuntimeException)
{
if ( aURL.Protocol.compareToAscii("org.openoffice.Office.addon.example:") == 0 )
if ( aURL.Protocol.equalsAscii("org.openoffice.Office.addon.example:") )
{
if ( aURL.Path.compareToAscii( "Function1" ) == 0 )
if ( aURL.Path.equalsAscii( "Function1" ) )
{
ShowMessageBox( mxToolkit, mxFrame,
OUString( "SDK Add-On example" ),
OUString( "Function 1 activated" ) );
}
else if ( aURL.Path.compareToAscii( "Function2" ) == 0 )
else if ( aURL.Path.equalsAscii( "Function2" ) )
{
ShowMessageBox( mxToolkit, mxFrame,
OUString( "SDK Add-On example" ),
OUString( "Function 2 activated" ) );
}
else if ( aURL.Path.compareToAscii( "Help" ) == 0 )
else if ( aURL.Path.equalsAscii( "Help" ) )
{
// Show info box
ShowMessageBox( mxToolkit, mxFrame,
......
......@@ -128,7 +128,7 @@ ContextHandlerRef GraphicalObjectFrameContext::onCreateContext( sal_Int32 aEleme
return new DiagramGraphicDataContext( *this, mpShapePtr );
else if ( sUri == "http://schemas.openxmlformats.org/drawingml/2006/chart" )
return new ChartGraphicDataContext( *this, mpShapePtr, mbEmbedShapesInChart );
else if ( sUri.compareToAscii( "http://schemas.openxmlformats.org/drawingml/2006/table" ) == 0 )
else if ( sUri.equalsAscii( "http://schemas.openxmlformats.org/drawingml/2006/table" ) )
return new table::TableContext( *this, mpShapePtr );
else
{
......
......@@ -119,7 +119,7 @@ void lclCreateTextFields( std::list< Reference< XTextField > > & aFields,
OSL_TRACE( "Exception %s", OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
}
}
else if ( sType.compareToAscii( "slidenum" ) == 0 )
else if ( sType.equalsAscii( "slidenum" ) )
{
xIface = xFactory->createInstance( "com.sun.star.text.TextField.PageNumber" );
aFields.push_back( Reference< XTextField > ( xIface, UNO_QUERY ) );
......
......@@ -34,7 +34,7 @@ namespace oox { namespace ppt {
Any GetTime( const OUString & val )
{
Any aDuration;
if( val.compareToAscii( "indefinite" ) == 0 )
if( val.equalsAscii( "indefinite" ) )
{
aDuration <<= Timing_INDEFINITE;
}
......@@ -50,7 +50,7 @@ Any GetTime( const OUString & val )
Any GetTimeAnimateValueTime( const OUString & val )
{
Any aPercent;
if( val.compareToAscii( "indefinite" ) == 0 )
if( val.equalsAscii( "indefinite" ) )
{
aPercent <<= Timing_INDEFINITE;
}
......
......@@ -89,7 +89,7 @@ namespace oox { namespace ppt {
const ImplAttributeNameConversion *attrConv = gImplConversionList;
while( attrConv->mpMSName != NULL )
{
if(msCurrentAttribute.compareToAscii( attrConv->mpMSName ) == 0 )
if(msCurrentAttribute.equalsAscii( attrConv->mpMSName ) )
{
Attribute attr;
attr.name = OUString::intern( attrConv->mpAPIName,
......
......@@ -77,7 +77,7 @@ namespace oox { namespace ppt {
while( p->mpName )
{
if( rName.compareToAscii( p->mpName ) == 0 )
if( rName.equalsAscii( p->mpName ) )
return p;
p++;
......
......@@ -269,7 +269,7 @@ namespace oox { namespace ppt {
{
nCommand = EffectCommands::PLAY;
}
else if( msCommand.compareToAscii( "playFrom" ) == 0 )
else if( msCommand.equalsAscii( "playFrom" ) )
{
const OUString aMediaTime( msCommand.copy( 9, msCommand.getLength() - 10 ) );
rtl_math_ConversionStatus eStatus;
......
......@@ -49,13 +49,13 @@ extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL package2_component_getFactory(
reinterpret_cast< XMultiServiceFactory * >( pServiceManager ) );
uno::Reference< XSingleServiceFactory > xFactory;
if (ManifestReader::static_getImplementationName().compareToAscii( pImplName ) == 0)
if (ManifestReader::static_getImplementationName().equalsAscii( pImplName ) )
xFactory = ManifestReader::createServiceFactory ( xSMgr );
else if (ManifestWriter::static_getImplementationName().compareToAscii( pImplName ) == 0)
else if (ManifestWriter::static_getImplementationName().equalsAscii( pImplName ) )
xFactory = ManifestWriter::createServiceFactory ( xSMgr );
else if (ZipPackage::static_getImplementationName().compareToAscii( pImplName ) == 0)
else if (ZipPackage::static_getImplementationName().equalsAscii( pImplName ) )
xFactory = ZipPackage::createServiceFactory ( xSMgr );
else if ( OZipFileAccess::impl_staticGetImplementationName().compareToAscii( pImplName ) == 0 )
else if ( OZipFileAccess::impl_staticGetImplementationName().equalsAscii( pImplName ) )
xFactory = ::cppu::createSingleFactory( xSMgr,
OZipFileAccess::impl_staticGetImplementationName(),
OZipFileAccess::impl_staticCreateSelfInstance,
......
......@@ -695,7 +695,7 @@ void PADialog::UpdateDevice()
OUString aToken( rInfo.m_aFeatures.getToken( 0, ',', nIndex ) );
if( !aToken.isEmpty() )
{
if( aToken.compareToAscii( "autoqueue" ) == 0 )
if( aToken.equalsAscii( "autoqueue" ) )
bAutoQueue = true;
else if( aToken.startsWith("pdf=") )
bPdf = true;
......
......@@ -185,7 +185,7 @@ Any PyEnum2Enum( PyObject *obj ) throw ( RuntimeException )
int i = 0;
for( i = 0; i < pEnumDesc->nEnumValues ; i ++ )
{
if( (*((OUString *)&pEnumDesc->ppEnumNames[i])).compareToAscii( stringValue ) == 0 )
if( (*((OUString *)&pEnumDesc->ppEnumNames[i])).equalsAscii( stringValue ) )
{
break;
}
......
......@@ -4181,7 +4181,7 @@ bool OReportController::impl_setPropertyAtControls_throw(const sal_uInt16 _nUndo
void OReportController::impl_fillCustomShapeState_nothrow(const char* _pCustomShapeType,dbaui::FeatureState& _rState) const
{
_rState.bEnabled = isEditable();
_rState.bChecked = getDesignView()->GetInsertObj() == OBJ_CUSTOMSHAPE && getDesignView()->GetInsertObjString().compareToAscii(_pCustomShapeType) == 0;
_rState.bChecked = getDesignView()->GetInsertObj() == OBJ_CUSTOMSHAPE && getDesignView()->GetInsertObjString().equalsAscii(_pCustomShapeType);
}
// -----------------------------------------------------------------------------
......
......@@ -207,7 +207,7 @@ namespace rtl_Bootstrap
aBootstrap.getFrom( suValuename, suValue );
sal_Char * pStr = getenv("ENABLE_JAVA");
// printUString( suGetname );
CPPUNIT_ASSERT_MESSAGE("get the value of environment variable.", suValue.compareToAscii( pStr ) == 0 );
CPPUNIT_ASSERT_MESSAGE("get the value of environment variable.", suValue.equalsAscii( pStr ) );
}
/* Notes on Windows:
void getFrom_001_1()
......@@ -219,7 +219,7 @@ namespace rtl_Bootstrap
aBootstrap.getFrom( suValuename, suValue );
sal_Char * pStr = getenv("SRC_ROOT");
// printUString( suGetname );
CPPUNIT_ASSERT_MESSAGE("get the value of environment variable.", suValue.compareToAscii( pStr ) == 0 );
CPPUNIT_ASSERT_MESSAGE("get the value of environment variable.", suValue.equalsAscii( pStr ) );
}
The result on Windows:
# # the SRC_ROOT is e:\Qadev\cvs\m19
......
......@@ -860,7 +860,7 @@ ScXMLSortGroupsContext::ScXMLSortGroupsContext( ScXMLImport& rImport,