summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-01-17 10:42:03 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-01-17 10:42:03 +0000
commit40c202b083b865ac733b9456cd018e48bb508031 (patch)
tree3910acb731511d087dc2109438c81de416ffcb15
parent3245eb50d6fa635684b9ad78df9f560c26c80034 (diff)
equalsAsciiL faster than equalsAscii
-rw-r--r--linguistic/source/convdic.cxx2
-rw-r--r--linguistic/source/convdiclist.cxx2
-rw-r--r--linguistic/source/convdicxml.cxx16
-rw-r--r--linguistic/source/hhconvdic.cxx4
-rw-r--r--linguistic/source/lngprophelp.cxx2
5 files changed, 13 insertions, 13 deletions
diff --git a/linguistic/source/convdic.cxx b/linguistic/source/convdic.cxx
index f8210ebe18..716c76a209 100644
--- a/linguistic/source/convdic.cxx
+++ b/linguistic/source/convdic.cxx
@@ -718,7 +718,7 @@ sal_Bool SAL_CALL ConvDic::supportsService( const OUString& rServiceName )
{
MutexGuard aGuard( GetLinguMutex() );
sal_Bool bRes = sal_False;
- if (rServiceName.equalsAscii( SN_CONV_DICTIONARY ))
+ if (rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(SN_CONV_DICTIONARY)))
bRes = sal_True;
return bRes;
}
diff --git a/linguistic/source/convdiclist.cxx b/linguistic/source/convdiclist.cxx
index ca187b5589..c6f5da7645 100644
--- a/linguistic/source/convdiclist.cxx
+++ b/linguistic/source/convdiclist.cxx
@@ -661,7 +661,7 @@ sal_Bool SAL_CALL ConvDicList::supportsService( const OUString& rServiceName )
throw (RuntimeException)
{
MutexGuard aGuard( GetLinguMutex() );
- return rServiceName.equalsAscii( SN_CONV_DICTIONARY_LIST );
+ return rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(SN_CONV_DICTIONARY_LIST));
}
diff --git a/linguistic/source/convdicxml.cxx b/linguistic/source/convdicxml.cxx
index 988bdd7b0c..d2196d4934 100644
--- a/linguistic/source/convdicxml.cxx
+++ b/linguistic/source/convdicxml.cxx
@@ -224,7 +224,7 @@ SvXMLImportContext * ConvDicXMLImportContext::CreateChildContext(
const uno::Reference< xml::sax::XAttributeList > & /*rxAttrList*/ )
{
SvXMLImportContext *pContext = 0;
- if (nPrefix == XML_NAMESPACE_TCD && rLocalName.equalsAscii( "text-conversion-dictionary" ))
+ if (nPrefix == XML_NAMESPACE_TCD && rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("text-conversion-dictionary")))
pContext = new ConvDicXMLDictionaryContext_Impl( GetConvDicImport(), nPrefix, rLocalName );
else
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
@@ -245,9 +245,9 @@ void ConvDicXMLDictionaryContext_Impl::StartElement(
GetKeyByAttrName( aAttrName, &aLocalName );
OUString aValue = rxAttrList->getValueByIndex(i);
- if (nPrefix == XML_NAMESPACE_TCD && aLocalName.equalsAscii( "lang" ))
+ if (nPrefix == XML_NAMESPACE_TCD && aLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("lang")))
nLanguage = MsLangId::convertIsoStringToLanguage( aValue );
- else if (nPrefix == XML_NAMESPACE_TCD && aLocalName.equalsAscii( "conversion-type" ))
+ else if (nPrefix == XML_NAMESPACE_TCD && aLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("conversion-type")))
nConversionType = GetConversionTypeFromText( aValue );
}
GetConvDicImport().SetLanguage( nLanguage );
@@ -264,7 +264,7 @@ SvXMLImportContext * ConvDicXMLDictionaryContext_Impl::CreateChildContext(
const uno::Reference< xml::sax::XAttributeList > & /*rxAttrList*/ )
{
SvXMLImportContext *pContext = 0;
- if (nPrefix == XML_NAMESPACE_TCD && rLocalName.equalsAscii( "entry" ))
+ if (nPrefix == XML_NAMESPACE_TCD && rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("entry")))
pContext = new ConvDicXMLEntryTextContext_Impl( GetConvDicImport(), nPrefix, rLocalName, *this );
else
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
@@ -278,7 +278,7 @@ SvXMLImportContext * ConvDicXMLEntryTextContext_Impl::CreateChildContext(
const uno::Reference< xml::sax::XAttributeList > & /*rxAttrList*/ )
{
SvXMLImportContext *pContext = 0;
- if (nPrefix == XML_NAMESPACE_TCD && rLocalName.equalsAscii( "right-text" ))
+ if (nPrefix == XML_NAMESPACE_TCD && rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("right-text")))
pContext = new ConvDicXMLRightTextContext_Impl( GetConvDicImport(), nPrefix, rLocalName, *this );
else
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
@@ -297,9 +297,9 @@ void ConvDicXMLEntryTextContext_Impl::StartElement(
GetKeyByAttrName( aAttrName, &aLocalName );
OUString aValue = rxAttrList->getValueByIndex(i);
- if (nPrefix == XML_NAMESPACE_TCD && aLocalName.equalsAscii( "left-text" ))
+ if (nPrefix == XML_NAMESPACE_TCD && aLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("left-text")))
aLeftText = aValue;
- if (nPrefix == XML_NAMESPACE_TCD && aLocalName.equalsAscii( "property-type" ))
+ if (nPrefix == XML_NAMESPACE_TCD && aLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("property-type")))
nPropertyType = (sal_Int16) aValue.toInt32();
}
}
@@ -443,7 +443,7 @@ SvXMLImportContext * ConvDicXMLImport::CreateContext(
const uno::Reference < xml::sax::XAttributeList > & /*rxAttrList*/ )
{
SvXMLImportContext *pContext = 0;
- if (nPrefix == XML_NAMESPACE_TCD && rLocalName.equalsAscii( "text-conversion-dictionary" ))
+ if (nPrefix == XML_NAMESPACE_TCD && rLocalName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("text-conversion-dictionary")))
pContext = new ConvDicXMLDictionaryContext_Impl( *this, nPrefix, rLocalName );
else
pContext = new SvXMLImportContext( *this, nPrefix, rLocalName );
diff --git a/linguistic/source/hhconvdic.cxx b/linguistic/source/hhconvdic.cxx
index 4fe78e86a4..45d61929ec 100644
--- a/linguistic/source/hhconvdic.cxx
+++ b/linguistic/source/hhconvdic.cxx
@@ -140,8 +140,8 @@ sal_Bool SAL_CALL HHConvDic::supportsService( const OUString& rServiceName )
{
MutexGuard aGuard( GetLinguMutex() );
sal_Bool bRes = sal_False;
- if (rServiceName.equalsAscii( SN_CONV_DICTIONARY )||
- rServiceName.equalsAscii( SN_HH_CONV_DICTIONARY ))
+ if (rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(SN_CONV_DICTIONARY)) ||
+ rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(SN_HH_CONV_DICTIONARY)))
bRes = sal_True;
return bRes;
}
diff --git a/linguistic/source/lngprophelp.cxx b/linguistic/source/lngprophelp.cxx
index 5a810777bf..26192822d5 100644
--- a/linguistic/source/lngprophelp.cxx
+++ b/linguistic/source/lngprophelp.cxx
@@ -537,7 +537,7 @@ void PropertyHelper_Spell::SetTmpPropVals( const PropertyValues &rPropVals )
const PropertyValue *pVal = rPropVals.getConstArray();
for (INT32 i = 0; i < nLen; ++i)
{
- if (pVal[i].Name.equalsAscii( UPN_MAX_NUMBER_OF_SUGGESTIONS ))
+ if (pVal[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(UPN_MAX_NUMBER_OF_SUGGESTIONS)))
{
pVal[i].Value >>= nResMaxNumberOfSuggestions;
}