compareToAscii -> equalsAscii

convert places using compareToAscii that should be using equalsAscii

Change-Id: I97b4da7f6e867c3967b2f65b70d6886f83b4a4e5
This commit is contained in:
Noel Grandin 2014-06-04 08:54:40 +02:00
parent 06a09dd0ad
commit adc20c3937
14 changed files with 16 additions and 17 deletions

View File

@ -107,7 +107,7 @@ void OUnoAutoPilot<TYPE, SERVICEINFO>::implInitialize(const com::sun::star::uno:
{ {
::com::sun::star::beans::PropertyValue aArgument; ::com::sun::star::beans::PropertyValue aArgument;
if (_rValue >>= aArgument) if (_rValue >>= aArgument)
if (0 == aArgument.Name.compareToAscii("ObjectModel")) if (aArgument.Name.equals("ObjectModel"))
{ {
aArgument.Value >>= m_xObjectModel; aArgument.Value >>= m_xObjectModel;
return; return;

View File

@ -462,7 +462,7 @@ namespace connectivity
#define SQL_ISTOKEN(pParseNode, token) ((pParseNode)->isToken() && (pParseNode)->getTokenID() == SQL_TOKEN_##token) #define SQL_ISTOKEN(pParseNode, token) ((pParseNode)->isToken() && (pParseNode)->getTokenID() == SQL_TOKEN_##token)
#define SQL_ISTOKENOR2(pParseNode, tok0, tok1) ((pParseNode)->isToken() && ( (pParseNode)->getTokenID() == SQL_TOKEN_##tok0 || (pParseNode)->getTokenID() == SQL_TOKEN_##tok1 )) #define SQL_ISTOKENOR2(pParseNode, tok0, tok1) ((pParseNode)->isToken() && ( (pParseNode)->getTokenID() == SQL_TOKEN_##tok0 || (pParseNode)->getTokenID() == SQL_TOKEN_##tok1 ))
#define SQL_ISTOKENOR3(pParseNode, tok0, tok1, tok2) ((pParseNode)->isToken() && ( (pParseNode)->getTokenID() == SQL_TOKEN_##tok0 || (pParseNode)->getTokenID() == SQL_TOKEN_##tok1 || (pParseNode)->getTokenID() == SQL_TOKEN_##tok2 )) #define SQL_ISTOKENOR3(pParseNode, tok0, tok1, tok2) ((pParseNode)->isToken() && ( (pParseNode)->getTokenID() == SQL_TOKEN_##tok0 || (pParseNode)->getTokenID() == SQL_TOKEN_##tok1 || (pParseNode)->getTokenID() == SQL_TOKEN_##tok2 ))
#define SQL_ISPUNCTUATION(pParseNode, aString) ((pParseNode)->getNodeType() == SQL_NODE_PUNCTUATION && !(pParseNode)->getTokenValue().compareToAscii(aString)) #define SQL_ISPUNCTUATION(pParseNode, aString) ((pParseNode)->getNodeType() == SQL_NODE_PUNCTUATION && (pParseNode)->getTokenValue().equalsAscii(aString))
} }
#endif // INCLUDED_CONNECTIVITY_SQLNODE_HXX #endif // INCLUDED_CONNECTIVITY_SQLNODE_HXX

View File

@ -57,7 +57,7 @@ namespace ooo
const SfxMedium *pMedium = rDocShell.GetMedium(); const SfxMedium *pMedium = rDocShell.GetMedium();
const SfxFilter *pFilt = pMedium ? pMedium->GetFilter() : NULL; const SfxFilter *pFilt = pMedium ? pMedium->GetFilter() : NULL;
if ( pFilt && pFilt->IsAlienFormat() ) if ( pFilt && pFilt->IsAlienFormat() )
bRes = ( pFilt->GetMimeType().compareToAscii( pMimeType ) == 0 ); bRes = pFilt->GetMimeType().equalsAscii( pMimeType );
return bRes; return bRes;
} }
VBAHELPER_DLLPRIVATE inline bool isAlienExcelDoc( SfxObjectShell& rDocShell ) { return isAlienDoc( rDocShell, "application/vnd.ms-excel" ); } VBAHELPER_DLLPRIVATE inline bool isAlienExcelDoc( SfxObjectShell& rDocShell ) { return isAlienDoc( rDocShell, "application/vnd.ms-excel" ); }

View File

@ -557,7 +557,7 @@ void * SAL_CALL MacSpellChecker_getFactory( const sal_Char * pImplName,
XMultiServiceFactory * pServiceManager, void * ) XMultiServiceFactory * pServiceManager, void * )
{ {
void * pRet = 0; void * pRet = 0;
if ( !MacSpellChecker::getImplementationName_Static().compareToAscii( pImplName ) ) if ( MacSpellChecker::getImplementationName_Static().equalsAscii( pImplName ) )
{ {
Reference< XSingleServiceFactory > xFactory = Reference< XSingleServiceFactory > xFactory =
cppu::createOneInstanceFactory( cppu::createOneInstanceFactory(

View File

@ -96,7 +96,7 @@ void SAL_CALL ScSheetEventsObj::replaceByName( const OUString& aName, const uno:
if ( rProp.Value >>= aEventType ) if ( rProp.Value >>= aEventType )
{ {
// only "Script" is supported // only "Script" is supported
if ( aEventType.compareToAscii( SC_UNO_SCRIPT ) != 0 ) if ( ! aEventType.equalsAscii( SC_UNO_SCRIPT ) )
throw lang::IllegalArgumentException(); throw lang::IllegalArgumentException();
} }
} }

View File

@ -1153,7 +1153,7 @@ OUString SAL_CALL AnalysisAddIn::getComplex( double fR, double fI, const uno::An
{ {
const OUString* pSuff = ( const OUString* ) rSuff.getValue(); const OUString* pSuff = ( const OUString* ) rSuff.getValue();
bi = pSuff->equalsAscii( "i" ) || pSuff->isEmpty(); bi = pSuff->equalsAscii( "i" ) || pSuff->isEmpty();
if( !bi && pSuff->compareToAscii( "j" ) != 0 ) if( !bi && !pSuff->equalsAscii( "j" ) )
throw lang::IllegalArgumentException(); throw lang::IllegalArgumentException();
} }
break; break;

View File

@ -203,7 +203,7 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification(
// Sometimes we get a propertyval with name = "Referer" // Sometimes we get a propertyval with name = "Referer"
// this is not an argument to be passed to script, so // this is not an argument to be passed to script, so
// ignore. // ignore.
if ( lArgs[ index ].Name.compareToAscii("Referer") != 0 || if ( !lArgs[ index ].Name.equalsAscii("Referer") ||
lArgs[ index ].Name.isEmpty() ) lArgs[ index ].Name.isEmpty() )
{ {
inArgs.realloc( ++argCount ); inArgs.realloc( ++argCount );

View File

@ -771,7 +771,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
const OUString& rVal = *(OUString*)aTmp.getValue(); const OUString& rVal = *(OUString*)aTmp.getValue();
if( rVal.isEmpty() ) if( rVal.isEmpty() )
bEmptyValue = true; bEmptyValue = true;
else if( rVal.compareToAscii( OOO_STRING_SVTOOLS_HTML_on ) != 0 ) else if( !rVal.equalsAscii( OOO_STRING_SVTOOLS_HTML_on ) )
sValue = rVal; sValue = rVal;
} }
break; break;

View File

@ -708,8 +708,7 @@ XResultSet_impl::getMetaData(
{ {
for ( sal_Int32 n = 0; n < m_sProperty.getLength(); ++n ) for ( sal_Int32 n = 0; n < m_sProperty.getLength(); ++n )
{ {
if ( m_sProperty.getConstArray()[ n ].Name.compareToAscii( "Title" ) if ( m_sProperty.getConstArray()[ n ].Name.equalsAscii( "Title" ) )
== 0 )
{ {
// @@@ #82177# - Determine correct value! // @@@ #82177# - Determine correct value!
bool bCaseSensitiveChildren = false; bool bCaseSensitiveChildren = false;

View File

@ -871,8 +871,8 @@ static bool UCBOpenContentSync(
return _UCBOpenContentSync( return _UCBOpenContentSync(
xLockBytes,xContent,rArg,xSink,xInteract,xProgress,xHandler); xLockBytes,xContent,rArg,xSink,xInteract,xProgress,xHandler);
if ( (aScheme.compareToAscii( "http" ) != 0) || if ( !aScheme.equalsAscii( "http" ) ||
(aScheme.compareToAscii( "https" ) != 0) ) !aScheme.equalsAscii( "https" ) )
xLockBytes->SetStreamValid_Impl(); xLockBytes->SetStreamValid_Impl();
Reference< XPropertiesChangeListener > xListener; Reference< XPropertiesChangeListener > xListener;
@ -1108,7 +1108,7 @@ static bool _UCBOpenContentSync(
// http protocol must be handled in a special way: during the opening process the input stream may change // http protocol must be handled in a special way: during the opening process the input stream may change
// only the last inputstream after notifying the document headers is valid // only the last inputstream after notifying the document headers is valid
if ( aScheme.compareToAscii("http") != 0 ) if ( !aScheme.equalsAscii("http") )
xLockBytes->SetStreamValid_Impl(); xLockBytes->SetStreamValid_Impl();
Reference< XPropertiesChangeListener > xListener = new UcbPropertiesChangeListener_Impl( xLockBytes ); Reference< XPropertiesChangeListener > xListener = new UcbPropertiesChangeListener_Impl( xLockBytes );

View File

@ -419,7 +419,7 @@ const std::vector< OUString >& Databases::getModuleList( const OUString& Languag
( str[idx + 1] == 'c' || str[idx + 1] == 'C' ) && ( str[idx + 1] == 'c' || str[idx + 1] == 'C' ) &&
( str[idx + 2] == 'f' || str[idx + 2] == 'F' ) && ( str[idx + 2] == 'f' || str[idx + 2] == 'F' ) &&
( str[idx + 3] == 'g' || str[idx + 3] == 'G' ) && ( str[idx + 3] == 'g' || str[idx + 3] == 'G' ) &&
( fileName = fileName.copy(0,idx).toAsciiLowerCase() ).compareToAscii( "picture" ) != 0 ) { !( fileName = fileName.copy(0,idx).toAsciiLowerCase() ).equalsAscii( "picture" ) ) {
if(! m_bShowBasic && fileName.equalsAscii("sbasic") ) if(! m_bShowBasic && fileName.equalsAscii("sbasic") )
continue; continue;
m_avModules.push_back( fileName ); m_avModules.push_back( fileName );

View File

@ -246,7 +246,7 @@ ContentProvider::elementReplaced(const container::ContainerEvent& Event)
OUString accessor; OUString accessor;
Event.Accessor >>= accessor; Event.Accessor >>= accessor;
if(accessor.compareToAscii("HelpStyleSheet")) if(!accessor.equalsAscii("HelpStyleSheet"))
return; return;
OUString replacedElement,element; OUString replacedElement,element;

View File

@ -158,7 +158,7 @@ OUString URLParameter::get_title()
{ {
if( isFile() ) if( isFile() )
return get_the_title(); return get_the_title();
else if( m_aModule.compareToAscii("") != 0 ) else if( !m_aModule.equalsAscii("") )
{ {
StaticModuleInformation* inf = StaticModuleInformation* inf =
m_pDatabases->getStaticInformationForModule( get_module(), m_pDatabases->getStaticInformationForModule( get_module(),

View File

@ -108,7 +108,7 @@ TVFactory::createInstanceWithArguments(
if( ! ( Arguments[i] >>= pV ) ) if( ! ( Arguments[i] >>= pV ) )
continue; continue;
if( pV.Name.compareToAscii( "nodepath" ) ) if( !pV.Name.equalsAscii( "nodepath" ) )
continue; continue;
if( ! ( pV.Value >>= hierview ) ) if( ! ( pV.Value >>= hierview ) )