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

compareToAscii -> equalsAscii

convert places using compareToAscii that should be using equalsAscii

Change-Id: I97b4da7f6e867c3967b2f65b70d6886f83b4a4e5
üst 06a09dd0
......@@ -107,7 +107,7 @@ void OUnoAutoPilot<TYPE, SERVICEINFO>::implInitialize(const com::sun::star::uno:
{
::com::sun::star::beans::PropertyValue aArgument;
if (_rValue >>= aArgument)
if (0 == aArgument.Name.compareToAscii("ObjectModel"))
if (aArgument.Name.equals("ObjectModel"))
{
aArgument.Value >>= m_xObjectModel;
return;
......
......@@ -462,7 +462,7 @@ namespace connectivity
#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_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
......
......@@ -57,7 +57,7 @@ namespace ooo
const SfxMedium *pMedium = rDocShell.GetMedium();
const SfxFilter *pFilt = pMedium ? pMedium->GetFilter() : NULL;
if ( pFilt && pFilt->IsAlienFormat() )
bRes = ( pFilt->GetMimeType().compareToAscii( pMimeType ) == 0 );
bRes = pFilt->GetMimeType().equalsAscii( pMimeType );
return bRes;
}
VBAHELPER_DLLPRIVATE inline bool isAlienExcelDoc( SfxObjectShell& rDocShell ) { return isAlienDoc( rDocShell, "application/vnd.ms-excel" ); }
......
......@@ -557,7 +557,7 @@ void * SAL_CALL MacSpellChecker_getFactory( const sal_Char * pImplName,
XMultiServiceFactory * pServiceManager, void * )
{
void * pRet = 0;
if ( !MacSpellChecker::getImplementationName_Static().compareToAscii( pImplName ) )
if ( MacSpellChecker::getImplementationName_Static().equalsAscii( pImplName ) )
{
Reference< XSingleServiceFactory > xFactory =
cppu::createOneInstanceFactory(
......
......@@ -96,7 +96,7 @@ void SAL_CALL ScSheetEventsObj::replaceByName( const OUString& aName, const uno:
if ( rProp.Value >>= aEventType )
{
// only "Script" is supported
if ( aEventType.compareToAscii( SC_UNO_SCRIPT ) != 0 )
if ( ! aEventType.equalsAscii( SC_UNO_SCRIPT ) )
throw lang::IllegalArgumentException();
}
}
......
......@@ -1153,7 +1153,7 @@ OUString SAL_CALL AnalysisAddIn::getComplex( double fR, double fI, const uno::An
{
const OUString* pSuff = ( const OUString* ) rSuff.getValue();
bi = pSuff->equalsAscii( "i" ) || pSuff->isEmpty();
if( !bi && pSuff->compareToAscii( "j" ) != 0 )
if( !bi && !pSuff->equalsAscii( "j" ) )
throw lang::IllegalArgumentException();
}
break;
......
......@@ -203,7 +203,7 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification(
// Sometimes we get a propertyval with name = "Referer"
// this is not an argument to be passed to script, so
// ignore.
if ( lArgs[ index ].Name.compareToAscii("Referer") != 0 ||
if ( !lArgs[ index ].Name.equalsAscii("Referer") ||
lArgs[ index ].Name.isEmpty() )
{
inArgs.realloc( ++argCount );
......
......@@ -771,7 +771,7 @@ Writer& OutHTML_DrawFrmFmtAsControl( Writer& rWrt,
const OUString& rVal = *(OUString*)aTmp.getValue();
if( rVal.isEmpty() )
bEmptyValue = true;
else if( rVal.compareToAscii( OOO_STRING_SVTOOLS_HTML_on ) != 0 )
else if( !rVal.equalsAscii( OOO_STRING_SVTOOLS_HTML_on ) )
sValue = rVal;
}
break;
......
......@@ -708,8 +708,7 @@ XResultSet_impl::getMetaData(
{
for ( sal_Int32 n = 0; n < m_sProperty.getLength(); ++n )
{
if ( m_sProperty.getConstArray()[ n ].Name.compareToAscii( "Title" )
== 0 )
if ( m_sProperty.getConstArray()[ n ].Name.equalsAscii( "Title" ) )
{
// @@@ #82177# - Determine correct value!
bool bCaseSensitiveChildren = false;
......
......@@ -871,8 +871,8 @@ static bool UCBOpenContentSync(
return _UCBOpenContentSync(
xLockBytes,xContent,rArg,xSink,xInteract,xProgress,xHandler);
if ( (aScheme.compareToAscii( "http" ) != 0) ||
(aScheme.compareToAscii( "https" ) != 0) )
if ( !aScheme.equalsAscii( "http" ) ||
!aScheme.equalsAscii( "https" ) )
xLockBytes->SetStreamValid_Impl();
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
// only the last inputstream after notifying the document headers is valid
if ( aScheme.compareToAscii("http") != 0 )
if ( !aScheme.equalsAscii("http") )
xLockBytes->SetStreamValid_Impl();
Reference< XPropertiesChangeListener > xListener = new UcbPropertiesChangeListener_Impl( xLockBytes );
......
......@@ -419,7 +419,7 @@ const std::vector< OUString >& Databases::getModuleList( const OUString& Languag
( str[idx + 1] == 'c' || str[idx + 1] == 'C' ) &&
( str[idx + 2] == 'f' || str[idx + 2] == 'F' ) &&
( 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") )
continue;
m_avModules.push_back( fileName );
......
......@@ -246,7 +246,7 @@ ContentProvider::elementReplaced(const container::ContainerEvent& Event)
OUString accessor;
Event.Accessor >>= accessor;
if(accessor.compareToAscii("HelpStyleSheet"))
if(!accessor.equalsAscii("HelpStyleSheet"))
return;
OUString replacedElement,element;
......
......@@ -158,7 +158,7 @@ OUString URLParameter::get_title()
{
if( isFile() )
return get_the_title();
else if( m_aModule.compareToAscii("") != 0 )
else if( !m_aModule.equalsAscii("") )
{
StaticModuleInformation* inf =
m_pDatabases->getStaticInformationForModule( get_module(),
......
......@@ -108,7 +108,7 @@ TVFactory::createInstanceWithArguments(
if( ! ( Arguments[i] >>= pV ) )
continue;
if( pV.Name.compareToAscii( "nodepath" ) )
if( !pV.Name.equalsAscii( "nodepath" ) )
continue;
if( ! ( pV.Value >>= hierview ) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment