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

convert OUString !compareToAscii to equalsAscii

Convert code like
   if( ! aStr.compareToAscii("XXX") )
to
   if( aStr.equalsAscii("XXX") )
which is both clearer and faster.

Change-Id: I267511bccab52f5225b291acbfa4e388b5a5302b
üst 0a9ef5a1
......@@ -146,12 +146,12 @@ public:
aExport = tools::exportToSvgD( aPoly, true, true, false );
const char* sExportString = "m10 10h-20v-20h20z";
CPPUNIT_ASSERT_MESSAGE("exporting rectangle to SVG-D",
!aExport.compareToAscii(sExportString) );
aExport.equalsAscii(sExportString) );
CPPUNIT_ASSERT_MESSAGE("importing simple rectangle from SVG-D (round-trip",
tools::importFromSvgD( aPoly, aExport, false, 0 ));
aExport = tools::exportToSvgD( aPoly, true, true, false );
CPPUNIT_ASSERT_MESSAGE("exporting rectangle to SVG-D (round-trip)",
!aExport.compareToAscii(sExportString));
aExport.equalsAscii(sExportString));
CPPUNIT_ASSERT_MESSAGE("importing simple bezier polygon from SVG-D",
tools::importFromSvgD( aPoly, aPath1, false, 0 ));
......@@ -175,7 +175,7 @@ public:
"m11430 0c-8890 3810 5715 6985 5715 6985"
"l-17145-1905c0 0 22860-10160 16510 6350"
"s-3810-11430-3810-11430z";
CPPUNIT_ASSERT_MESSAGE("exporting bezier polygon to SVG-D", !aExport.compareToAscii(sExportStringSimpleBezier));
CPPUNIT_ASSERT_MESSAGE("exporting bezier polygon to SVG-D", aExport.equalsAscii(sExportStringSimpleBezier));
// Adaptions for B2DPolygon bezier change (see #i77162#):
//
......@@ -205,12 +205,12 @@ public:
CPPUNIT_ASSERT_MESSAGE("re-importing '@' from SVG-D", tools::importFromSvgD( aReImport, aExport, false, 0));
CPPUNIT_ASSERT_MESSAGE("re-imported '@' needs to be identical", aReImport == aPoly);
CPPUNIT_ASSERT_MESSAGE("exporting '@' to SVG-D", !aExport.compareToAscii(sExportString1));
CPPUNIT_ASSERT_MESSAGE("exporting '@' to SVG-D", aExport.equalsAscii(sExportString1));
CPPUNIT_ASSERT_MESSAGE("importing '@' from SVG-D (round-trip",
tools::importFromSvgD( aPoly, aExport, false, 0 ));
aExport = tools::exportToSvgD( aPoly, true, true, false );
CPPUNIT_ASSERT_MESSAGE("exporting '@' to SVG-D (round-trip)",
!aExport.compareToAscii(sExportString1));
aExport.equalsAscii(sExportString1));
CPPUNIT_ASSERT_MESSAGE("importing complex polygon from SVG-D",
......@@ -238,12 +238,12 @@ public:
"11-95-3-100 3-101 11-95 17-90 24-85 30-79 38-75 21-35 23-35 25-32 26-32 28-30 29"
"-28 30-26 31-24 33-22 34-20 35-18 36-16 37-15 39-12 40-11z";
CPPUNIT_ASSERT_MESSAGE("exporting complex polygon to SVG-D",
!aExport.compareToAscii(sExportString2));
aExport.equalsAscii(sExportString2));
CPPUNIT_ASSERT_MESSAGE("importing complex polygon from SVG-D (round-trip",
tools::importFromSvgD( aPoly, aExport, false, 0 ));
aExport = tools::exportToSvgD( aPoly, true, true, false );
CPPUNIT_ASSERT_MESSAGE("exporting complex polygon to SVG-D (round-trip)",
!aExport.compareToAscii(sExportString2));
aExport.equalsAscii(sExportString2));
const B2DPolygon aRect(
tools::createPolygonFromRect( B2DRange(0.0,0.0,4000.0,4000.0) ));
......@@ -251,7 +251,7 @@ public:
const char* sExportStringRect = "M0 0H4000V4000H0Z";
CPPUNIT_ASSERT_MESSAGE("exporting to rectangle svg-d string",
!aExport.compareToAscii(sExportStringRect));
aExport.equalsAscii(sExportStringRect));
}
// Change the following lines only, if you add, remove or rename
......
......@@ -115,13 +115,13 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >&
const PropertyValue *pEnd = pIter + info.getLength();
for(;pIter != pEnd;++pIter)
{
if(!pIter->Name.compareToAscii("Timeout"))
if(pIter->Name.equalsAscii("Timeout"))
pIter->Value >>= nTimeout;
else if(!pIter->Name.compareToAscii("Silent"))
else if(pIter->Name.equalsAscii("Silent"))
pIter->Value >>= bSilent;
else if(!pIter->Name.compareToAscii("user"))
else if(pIter->Name.equalsAscii("user"))
pIter->Value >>= aUID;
else if(!pIter->Name.compareToAscii("password"))
else if(pIter->Name.equalsAscii("password"))
pIter->Value >>= aPWD;
}
try
......
......@@ -94,7 +94,7 @@ void OCalcConnection::construct(const OUString& url,const Sequence< PropertyValu
const PropertyValue *pEnd = pIter + info.getLength();
for(;pIter != pEnd;++pIter)
{
if(!pIter->Name.compareToAscii(pPwd))
if(pIter->Name.equalsAscii(pPwd))
{
pIter->Value >>= m_sPassword;
break;
......
......@@ -105,7 +105,7 @@ void OEvoabConnection::construct(const OUString& url, const Sequence< PropertyVa
const PropertyValue *pEnd = pIter + info.getLength();
for(;pIter != pEnd;++pIter)
{
if(!pIter->Name.compareToAscii(pPwd))
if(pIter->Name.equalsAscii(pPwd))
{
pIter->Value >>= sPassword;
break;
......
......@@ -67,33 +67,33 @@ void OFlatConnection::construct(const OUString& url,const Sequence< PropertyValu
const PropertyValue *pEnd = pBegin + info.getLength();
for(;pBegin != pEnd;++pBegin)
{
if(!pBegin->Name.compareToAscii("HeaderLine"))
if(pBegin->Name.equalsAscii("HeaderLine"))
OSL_VERIFY( pBegin->Value >>= m_bHeaderLine );
else if(!pBegin->Name.compareToAscii("FieldDelimiter"))
else if(pBegin->Name.equalsAscii("FieldDelimiter"))
{
OUString aVal;
OSL_VERIFY( pBegin->Value >>= aVal );
m_cFieldDelimiter = aVal.toChar();
}
else if(!pBegin->Name.compareToAscii("StringDelimiter"))
else if(pBegin->Name.equalsAscii("StringDelimiter"))
{
OUString aVal;
OSL_VERIFY( pBegin->Value >>= aVal );
m_cStringDelimiter = aVal.toChar();
}
else if(!pBegin->Name.compareToAscii("DecimalDelimiter"))
else if(pBegin->Name.equalsAscii("DecimalDelimiter"))
{
OUString aVal;
OSL_VERIFY( pBegin->Value >>= aVal );
m_cDecimalDelimiter = aVal.toChar();
}
else if(!pBegin->Name.compareToAscii("ThousandDelimiter"))
else if(pBegin->Name.equalsAscii("ThousandDelimiter"))
{
OUString aVal;
OSL_VERIFY( pBegin->Value >>= aVal );
m_cThousandDelimiter = aVal.toChar();
}
else if ( !pBegin->Name.compareToAscii("MaxRowScan") )
else if ( pBegin->Name.equalsAscii("MaxRowScan") )
{
pBegin->Value >>= m_nMaxRowsToScan;
}
......
......@@ -342,7 +342,7 @@ void OHSQLTable::executeStatement(const OUString& _rStatement )
// -----------------------------------------------------------------------------
Sequence< Type > SAL_CALL OHSQLTable::getTypes( ) throw(RuntimeException)
{
if ( ! m_Type.compareToAscii("VIEW") )
if ( m_Type.equalsAscii("VIEW") )
{
Sequence< Type > aTypes = OTableHelper::getTypes();
::std::vector<Type> aOwnTypes;
......@@ -401,7 +401,7 @@ void SAL_CALL OHSQLTable::rename( const OUString& newName ) throw(SQLException,
// -------------------------------------------------------------------------
Any SAL_CALL OHSQLTable::queryInterface( const Type & rType ) throw(RuntimeException)
{
if( !m_Type.compareToAscii("VIEW") && rType == ::getCppuType((const Reference<XRename>*)0) )
if( m_Type.equalsAscii("VIEW") && rType == ::getCppuType((const Reference<XRename>*)0) )
return Any();
return OTableHelper::queryInterface(rType);
......
......@@ -1205,13 +1205,13 @@ void ODatabaseMetaDataResultSet::openImportedKeys(const Any& catalog, const OUSt
const OUString& table) throw(SQLException, RuntimeException)
{
openForeignKeys(Any(),NULL,NULL,catalog,!schema.compareToAscii("%") ? &schema : NULL,&table);
openForeignKeys(Any(),NULL,NULL,catalog, schema.equalsAscii("%") ? &schema : NULL, &table);
}
// -------------------------------------------------------------------------
void ODatabaseMetaDataResultSet::openExportedKeys(const Any& catalog, const OUString& schema,
const OUString& table) throw(SQLException, RuntimeException)
{
openForeignKeys(catalog,!schema.compareToAscii("%") ? &schema : NULL,&table,Any(),NULL,NULL);
openForeignKeys(catalog, schema.equalsAscii("%") ? &schema : NULL, &table,Any(),NULL,NULL);
}
// -------------------------------------------------------------------------
void ODatabaseMetaDataResultSet::openPrimaryKeys(const Any& catalog, const OUString& schema,
......
......@@ -423,14 +423,14 @@ namespace
const AsciiPropertyValue* pSetting = _pKnownSettings;
for ( ; pSetting->AsciiName; ++pSetting )
{
if ( !pDataSourceSetting->Name.compareToAscii( pSetting->AsciiName ) )
if ( pDataSourceSetting->Name.equalsAscii( pSetting->AsciiName ) )
{ // the particular data source setting is known
const DriverPropertyInfo* pAllowedDriverSetting = aDriverInfo.getConstArray();
const DriverPropertyInfo* pDriverSettingsEnd = pAllowedDriverSetting + aDriverInfo.getLength();
for ( ; pAllowedDriverSetting != pDriverSettingsEnd; ++pAllowedDriverSetting )
{
if ( !pAllowedDriverSetting->Name.compareToAscii( pSetting->AsciiName ) )
if ( pAllowedDriverSetting->Name.equalsAscii( pSetting->AsciiName ) )
{ // the driver also allows this setting
bAllowSetting = sal_True;
break;
......
......@@ -196,7 +196,7 @@ extern "C"
const sal_Char * pImplName, XMultiServiceFactory * pServiceManager, void * /*pRegistryKey*/ )
{
void * pRet = 0;
if (!BibliographyLoader::getImplementationName_Static().compareToAscii( pImplName ) )
if (BibliographyLoader::getImplementationName_Static().equalsAscii( pImplName ) )
{
// create the factory
Reference< XSingleServiceFactory > xFactory =
......
......@@ -311,7 +311,7 @@ void XPlugin_Impl::handleSpecialArgs()
{
// special handling for real audio which needs a lot of parameters
// or won't function at all
if( ! m_aDescription.Mimetype.compareToAscii( "audio/x-pn-realaudio-plugin" ) && m_nArgs < 1 )
if( m_aDescription.Mimetype.equalsAscii( "audio/x-pn-realaudio-plugin" ) && m_nArgs < 1 )
{
OUString aURL;
if( m_xModel.is() )
......@@ -355,7 +355,7 @@ void XPlugin_Impl::handleSpecialArgs()
}
}
// #69333# special for pdf
else if( ! m_aDescription.Mimetype.compareToAscii( "application/pdf" ) )
else if( m_aDescription.Mimetype.equalsAscii( "application/pdf" ) )
m_aPluginMode = PluginMode::FULL;
// see if we have a TYPE tag
......@@ -839,7 +839,7 @@ void XPlugin_Impl::propertyChange( const com::sun::star::beans::PropertyChangeEv
{
Guard< Mutex > aGuard( m_aMutex );
if( ! rEvent.PropertyName.compareToAscii( "URL" ) )
if( rEvent.PropertyName.equalsAscii( "URL" ) )
{
OUString aStr;
rEvent.NewValue >>= aStr;
......
......@@ -1257,7 +1257,7 @@ void Binding::handleEvent( const XEvent_t& xEvent )
OUString sType(xEvent->getType());
//OUString sEventMIPChanged("xforms-generic");
//if(sType.equals(sEventMIPChanged)) {
if(!sType.compareToAscii("xforms-generic")) {
if(sType.equalsAscii("xforms-generic")) {
// the modification of the 'mnDeferModifyNotifications'-member
// is necessary to prevent infinite notication looping.
......
......@@ -616,7 +616,7 @@ BreakIteratorImpl::getImplementationName(void) throw( RuntimeException )
sal_Bool SAL_CALL
BreakIteratorImpl::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return !rServiceName.compareToAscii(cBreakIterator);
return rServiceName.equalsAscii(cBreakIterator);
}
Sequence< OUString > SAL_CALL
......
......@@ -450,7 +450,7 @@ BreakIterator_Unicode::getImplementationName(void) throw( uno::RuntimeException
sal_Bool SAL_CALL
BreakIterator_Unicode::supportsService(const OUString& rServiceName) throw( uno::RuntimeException )
{
return !rServiceName.compareToAscii(cBreakIterator);
return rServiceName.equalsAscii(cBreakIterator);
}
uno::Sequence< OUString > SAL_CALL
......
......@@ -349,7 +349,7 @@ const sal_Char cCalendar[] = "com.sun.star.i18n.LocaleCalendar";
sal_Bool SAL_CALL
CalendarImpl::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return !rServiceName.compareToAscii(cCalendar);
return rServiceName.equalsAscii(cCalendar);
}
Sequence< OUString > SAL_CALL
......
......@@ -1174,7 +1174,7 @@ Calendar_gregorian::getImplementationName(void) throw( RuntimeException )
sal_Bool SAL_CALL
Calendar_gregorian::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return !rServiceName.compareToAscii(cCalendar);
return rServiceName.equalsAscii(cCalendar);
}
Sequence< OUString > SAL_CALL
......
......@@ -270,7 +270,7 @@ OUString SAL_CALL cclass_Unicode::getImplementationName() throw( RuntimeExceptio
sal_Bool SAL_CALL cclass_Unicode::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return !rServiceName.compareToAscii(cClass);
return rServiceName.equalsAscii(cClass);
}
Sequence< OUString > SAL_CALL cclass_Unicode::getSupportedServiceNames() throw( RuntimeException )
......
......@@ -205,7 +205,7 @@ sal_Bool SAL_CALL
CharacterClassificationImpl::supportsService(const OUString& rServiceName)
throw( RuntimeException )
{
return !rServiceName.compareToAscii(cClass);
return rServiceName.equalsAscii(cClass);
}
Sequence< OUString > SAL_CALL
......
......@@ -85,7 +85,7 @@ ChapterCollator::getImplementationName() throw( RuntimeException )
sal_Bool SAL_CALL
ChapterCollator::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return !rServiceName.compareToAscii(cChapCollator);
return rServiceName.equalsAscii(cChapCollator);
}
Sequence< OUString > SAL_CALL
......
......@@ -250,7 +250,7 @@ Collator_Unicode::getImplementationName() throw( RuntimeException )
sal_Bool SAL_CALL
Collator_Unicode::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return !rServiceName.compareToAscii(implementationName);
return rServiceName.equalsAscii(implementationName);
}
Sequence< OUString > SAL_CALL
......
......@@ -142,7 +142,7 @@ InputSequenceCheckerImpl::getImplementationName(void) throw( RuntimeException )
sal_Bool SAL_CALL
InputSequenceCheckerImpl::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return !rServiceName.compareToAscii(serviceName);
return rServiceName.equalsAscii(serviceName);
}
Sequence< OUString > SAL_CALL
......
......@@ -275,7 +275,7 @@ sal_Bool SAL_CALL
NumberFormatCodeMapper::supportsService(const OUString& rServiceName)
throw( ::com::sun::star::uno::RuntimeException )
{
return !rServiceName.compareToAscii(cNumFormat);
return rServiceName.equalsAscii(cNumFormat);
}
::com::sun::star::uno::Sequence< OUString > SAL_CALL
......
......@@ -142,7 +142,7 @@ OUString SAL_CALL OrdinalSuffix::getImplementationName(void) throw( RuntimeExcep
sal_Bool SAL_CALL OrdinalSuffix::supportsService( const OUString& rServiceName) throw( RuntimeException )
{
return !rServiceName.compareToAscii(cOrdinalSuffix);
return rServiceName.equalsAscii(cOrdinalSuffix);
}
Sequence< OUString > SAL_CALL OrdinalSuffix::getSupportedServiceNames(void) throw( RuntimeException )
......
......@@ -643,7 +643,7 @@ TransliterationImpl::getImplementationName() throw( RuntimeException )
sal_Bool SAL_CALL
TransliterationImpl::supportsService(const OUString& rServiceName) throw( RuntimeException )
{
return !rServiceName.compareToAscii(cTrans);
return rServiceName.equalsAscii(cTrans);
}
Sequence< OUString > SAL_CALL
......
......@@ -408,58 +408,58 @@ PaperInfo PaperInfo::getDefaultPaperForLocale(
if (
//United States, Letter
!rLocale.Country.compareToAscii("US") ||
rLocale.Country.equalsAscii("US") ||
//Puerto Rico:
// http://unicode.org/cldr/trac/ticket/1710
// http://sources.redhat.com/ml/libc-hacker/2001-07/msg00046.html
!rLocale.Country.compareToAscii("PR") ||
rLocale.Country.equalsAscii("PR") ||
//Canada:
// http://sources.redhat.com/ml/libc-hacker/2001-07/msg00053.html
!rLocale.Country.compareToAscii("CA") ||
rLocale.Country.equalsAscii("CA") ||
//Venuzuela:
// http://unicode.org/cldr/trac/ticket/1710
// https://www.redhat.com/archives/fedora-devel-list/2008-August/msg00019.html
!rLocale.Country.compareToAscii("VE") ||
rLocale.Country.equalsAscii("VE") ||
//Chile:
// http://unicode.org/cldr/trac/ticket/1710
// https://www.redhat.com/archives/fedora-devel-list/2008-August/msg00240.html
!rLocale.Country.compareToAscii("CL") ||
rLocale.Country.equalsAscii("CL") ||
//Mexico:
// http://unicode.org/cldr/trac/ticket/1710
// http://qa.openoffice.org/issues/show_bug.cgi?id=49739
!rLocale.Country.compareToAscii("MX") ||
rLocale.Country.equalsAscii("MX") ||
//Colombia:
// http://unicode.org/cldr/trac/ticket/1710
// http://qa.openoffice.org/issues/show_bug.cgi?id=69703
!rLocale.Country.compareToAscii("CO") ||
rLocale.Country.equalsAscii("CO") ||
//Philippines:
// http://unicode.org/cldr/trac/ticket/1710
// http://ubuntuliving.blogspot.com/2008/07/default-paper-size-in-evince.html
// http://www.gov.ph/faqs/driverslicense.asp
!rLocale.Country.compareToAscii("PH") ||
rLocale.Country.equalsAscii("PH") ||
//Belize:
// http://unicode.org/cldr/trac/ticket/2585
// http://www.belize.gov.bz/ct.asp?xItem=1666&ctNode=486&mp=27
!rLocale.Country.compareToAscii("BZ") ||
rLocale.Country.equalsAscii("BZ") ||
//Costa Rica:
// http://unicode.org/cldr/trac/ticket/2585
// http://sources.redhat.com/bugzilla/show_bug.cgi?id=11258
!rLocale.Country.compareToAscii("CR") ||
rLocale.Country.equalsAscii("CR") ||
//Guatemala:
// http://unicode.org/cldr/trac/ticket/2585
// http://sources.redhat.com/bugzilla/show_bug.cgi?id=10936
!rLocale.Country.compareToAscii("GT") ||
rLocale.Country.equalsAscii("GT") ||
//Nicaragua:
// http://unicode.org/cldr/trac/ticket/2585
!rLocale.Country.compareToAscii("NI") ||
rLocale.Country.equalsAscii("NI") ||
//Panama:
// http://unicode.org/cldr/trac/ticket/2585
// http://www.minsa.gob.pa/minsa/tl_files/documents/baner_informativo/INSTRUMENTO%20DE%20INVESTIGACION%20DE%20RAAV%202009.pdf
!rLocale.Country.compareToAscii("PA") ||
rLocale.Country.equalsAscii("PA") ||
//El Salvador:
// http://unicode.org/cldr/trac/ticket/2585
// http://www.tse.gob.sv
!rLocale.Country.compareToAscii("SV")
rLocale.Country.equalsAscii("SV")
)
{
eType = PAPER_LETTER;
......
......@@ -885,7 +885,7 @@ void * SAL_CALL Hyphenator_getFactory( const sal_Char * pImplName,
XMultiServiceFactory * pServiceManager, void * )
{
void * pRet = 0;
if ( !Hyphenator::getImplementationName_Static().compareToAscii( pImplName ) )
if ( Hyphenator::getImplementationName_Static().equalsAscii( pImplName ) )
{
Reference< XSingleServiceFactory > xFactory =
cppu::createOneInstanceFactory(
......
......@@ -668,7 +668,7 @@ void * SAL_CALL SpellChecker_getFactory( const sal_Char * pImplName,
XMultiServiceFactory * pServiceManager, void * )
{
void * pRet = 0;
if ( !SpellChecker::getImplementationName_Static().compareToAscii( pImplName ) )
if ( SpellChecker::getImplementationName_Static().equalsAscii( pImplName ) )
{
Reference< XSingleServiceFactory > xFactory =
cppu::createOneInstanceFactory(
......
......@@ -682,7 +682,7 @@ void * SAL_CALL Thesaurus_getFactory( const sal_Char * pImplName,
XMultiServiceFactory * pServiceManager, void * )
{
void * pRet = 0;
if ( !Thesaurus::getImplementationName_Static().compareToAscii( pImplName ) )
if ( Thesaurus::getImplementationName_Static().equalsAscii( pImplName ) )
{
Reference< XSingleServiceFactory > xFactory =
......
......@@ -670,7 +670,7 @@ void * SAL_CALL ConvDicList_getFactory(
XMultiServiceFactory * pServiceManager, void * )
{
void * pRet = 0;
if ( !ConvDicList::getImplementationName_Static().compareToAscii( pImplName ) )
if ( ConvDicList::getImplementationName_Static().equalsAscii( pImplName ) )
{
uno::Reference< XSingleServiceFactory > xFactory =
cppu::createOneInstanceFactory(
......
......@@ -764,7 +764,7 @@ void * SAL_CALL DicList_getFactory( const sal_Char * pImplName,
XMultiServiceFactory * pServiceManager, void * )
{
void * pRet = 0;
if ( !DicList::getImplementationName_Static().compareToAscii( pImplName ) )
if ( DicList::getImplementationName_Static().equalsAscii( pImplName ) )
{
uno::Reference< XSingleServiceFactory > xFactory =
cppu::createOneInstanceFactory(
......
......@@ -1144,7 +1144,7 @@ void * SAL_CALL GrammarCheckingIterator_getFactory(
void * /*pRegistryKey*/ )
{
void * pRet = 0;
if ( !GrammarCheckingIterator_getImplementationName().compareToAscii( pImplName ) )
if ( GrammarCheckingIterator_getImplementationName().equalsAscii( pImplName ) )
{
uno::Reference< lang::XSingleServiceFactory > xFactory =
cppu::createOneInstanceFactory(
......
......@@ -484,7 +484,7 @@ void * SAL_CALL LinguProps_getFactory( const sal_Char * pImplName,
XMultiServiceFactory *pServiceManager, void * )
{
void * pRet = 0;
if ( !LinguProps::getImplementationName_Static().compareToAscii( pImplName ) )
if ( LinguProps::getImplementationName_Static().equalsAscii( pImplName ) )
{
Reference< XSingleServiceFactory > xFactory =
cppu::createOneInstanceFactory(
......
......@@ -466,7 +466,7 @@ void * SAL_CALL SpellChecker_getFactory( const sal_Char * pImplName,
XMultiServiceFactory * pServiceManager, void * )
{
void * pRet = 0;
if ( !SpellChecker::getImplementationName_Static().compareToAscii( pImplName ) )
if ( SpellChecker::getImplementationName_Static().equalsAscii( pImplName ) )
{
Reference< XSingleServiceFactory > xFactory =
cppu::createOneInstanceFactory(
......
......@@ -152,19 +152,19 @@ void OConnection::construct(const OUString& url, const Sequence< PropertyValue >
m_settings.connectionURL = url;
for (;pIter != pEnd;++pIter) {
if (!pIter->Name.compareToAscii("user")) {
if (pIter->Name.equalsAscii("user")) {
OSL_VERIFY( pIter->Value >>= aUser );
} else if (!pIter->Name.compareToAscii("password")) {
} else if (pIter->Name.equalsAscii("password")) {
OSL_VERIFY( pIter->Value >>= aPass );
} else if (!pIter->Name.compareToAscii("LocalSocket")) {
} else if (pIter->Name.equalsAscii("LocalSocket")) {
OSL_VERIFY( pIter->Value >>= sUnixSocket );
unixSocketPassed = true;
} else if (!pIter->Name.compareToAscii("NamedPipe")) {
} else if (pIter->Name.equalsAscii("NamedPipe")) {
OSL_VERIFY( pIter->Value >>= sNamedPipe );
namedPipePassed = true;
} else if ( !pIter->Name.compareToAscii("PublicConnectionURL")) {
} else if ( pIter->Name.equalsAscii("PublicConnectionURL")) {
OSL_VERIFY( pIter->Value >>= m_settings.connectionURL );
} else if ( !pIter->Name.compareToAscii("NewURL")) { // legacy name for "PublicConnectionURL"
} else if ( pIter->Name.equalsAscii("NewURL")) { // legacy name for "PublicConnectionURL"
OSL_VERIFY( pIter->Value >>= m_settings.connectionURL );
}
}
......
......@@ -102,28 +102,28 @@ void OConnection::construct(const ::rtl::OUString& url,const Sequence< PropertyV
const PropertyValue *pEnd = pBegin + info.getLength();
for(;pBegin != pEnd;++pBegin)
{
if(!pBegin->Name.compareToAscii(pTimeout))
if(pBegin->Name.equalsAscii(pTimeout))
pBegin->Value >>= nTimeout;
else if(!pBegin->Name.compareToAscii(pSilent))
else if(pBegin->Name.equalsAscii(pSilent))
pBegin->Value >>= bSilent;
else if(!pBegin->Name.compareToAscii(pUser))
else if(pBegin->Name.equalsAscii(pUser))
{
pBegin->Value >>= aUID;
aDSN = aDSN + ::rtl::OUString(";UID=") + aUID;
aDSN = aDSN + ";UID=" + aUID;
}
else if(!pBegin->Name.compareToAscii(pPwd))
else if(pBegin->Name.equalsAscii(pPwd))
{
pBegin->Value >>= aPWD;
aDSN = aDSN + ::rtl::OUString(";PWD=") + aPWD;
aDSN = aDSN + ";PWD=" + aPWD;
}
else if(!pBegin->Name.compareToAscii(pUseCatalog))
else if(pBegin->Name.equalsAscii(pUseCatalog))
{
pBegin->Value >>= m_bUseCatalog;
}
else if(!pBegin->Name.compareToAscii(pSysDrv))
else if(pBegin->Name.equalsAscii(pSysDrv))
{
pBegin->Value >>= aSysDrvSettings;
aDSN += ::rtl::OUString(";");
aDSN += ";";
aDSN += aSysDrvSettings;
}
}
......
......@@ -146,7 +146,7 @@ static void SetTableStyleProperties(TableStyle* &pTableStyle , const sal_Int32&
sal_Bool CreateTableStyle(TableStyle* &pTableStyle , const OUString& styleId)
{
sal_Bool createdTblStyle = sal_False;
if(!styleId.compareToAscii("{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}")){ //Medium Style 2 Accenat 1
if(styleId.equalsAscii("{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}")){ //Medium Style 2 Accenat 1
pTableStyle = new TableStyle();
createdTblStyle = sal_True;
//first row style
......@@ -182,7 +182,7 @@ static void SetTableStyleProperties(TableStyle* &pTableStyle , const sal_Int32&
SetTableStyleProperties(pTableStyle, XML_accent1, XML_dk1, XML_lt1);
}
else if (!styleId.compareToAscii("{21E4AEA4-8DFA-4A89-87EB-49C32662AFE0}")) //Medium Style 2 Accent 2
else if (styleId.equalsAscii("{21E4AEA4-8DFA-4A89-87EB-49C32662AFE0}")) //Medium Style 2 Accent 2
{
pTableStyle = new TableStyle();
createdTblStyle = sal_True;
......@@ -214,7 +214,7 @@ static void SetTableStyleProperties(TableStyle* &pTableStyle , const sal_Int32&
SetTableStyleProperties(pTableStyle, XML_accent2, XML_dk1, XML_lt1);
}
else if (!styleId.compareToAscii("{C4B1156A-380E-4F78-BDF5-A606A8083BF9}")) //Medium Style 4 Accent 4
else if (styleId.equalsAscii("{C4B1156A-380E-4F78-BDF5-A606A8083BF9}")) //Medium Style 4 Accent 4
{
pTableStyle = new TableStyle();
createdTblStyle = sal_True;
......
......@@ -292,7 +292,7 @@ RTSCommandPage::RTSCommandPage( RTSDialog* pParent ) :
m_aPdfDirectoryText.Show( sal_True );
m_aConfigureBox.SelectEntryPos( m_nPdfEntry );
}
else if( ! aToken.compareToAscii( "external_dialog" ) )
else if( aToken.equalsAscii( "external_dialog" ) )
{
m_aExternalCB.Check();
m_bWasExternalDialog = true;
......
......@@ -107,8 +107,8 @@ uno::Reference<frame::XDispatch> SAL_CALL ScDispatchProviderInterceptor::queryDi
uno::Reference<frame::XDispatch> xResult;
// create some dispatch ...
if ( pViewShell && (
!aURL.Complete.compareToAscii(cURLInsertColumns) ||
!aURL.Complete.compareToAscii(cURLDocDataSource) ) )
aURL.Complete.equalsAscii(cURLInsertColumns) ||
aURL.Complete.equalsAscii(cURLDocDataSource) ) )
{
if (!m_xMyDispatch.is())
m_xMyDispatch = new ScDispatch( pViewShell );
......@@ -233,7 +233,7 @@ void SAL_CALL ScDispatch::dispatch( const util::URL& aURL,
SolarMutexGuard aGuard;
sal_Bool bDone = false;
if ( pViewShell && !aURL.Complete.compareToAscii(cURLInsertColumns) )
if ( pViewShell && aURL.Complete.equalsAscii(cURLInsertColumns) )
{
ScViewData* pViewData = pViewShell->GetViewData();
ScAddress aPos( pViewData->GetCurX(), pViewData->GetCurY(), pViewData->GetTabNo() );
......@@ -290,7 +290,7 @@ void SAL_CALL ScDispatch::addStatusListener(
aEvent.Source.set(static_cast<cppu::OWeakObject*>(this));
aEvent.FeatureURL = aURL;
if ( !aURL.Complete.compareToAscii(cURLDocDataSource) )
if ( aURL.Complete.equalsAscii(cURLDocDataSource) )
{
uno::Reference<frame::XStatusListener>* pObj =
new uno::Reference<frame::XStatusListener>( xListener );
......@@ -321,7 +321,7 @@ void SAL_CALL ScDispatch::removeStatusListener(
{
SolarMutexGuard aGuard;
if ( !aURL.Complete.compareToAscii(cURLDocDataSource) )
if ( aURL.Complete.equalsAscii(cURLDocDataSource) )
{
sal_uInt16 nCount = aDataSourceListeners.size();
for ( sal_uInt16 n=nCount; n--; )
......