summaryrefslogtreecommitdiff
path: root/xmlhelp
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-01-16 14:12:57 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-01-16 14:12:57 +0000
commit6d7536ce4e6b51f499ccdd6aa0e749bda2d63d46 (patch)
tree87c2bc952c82e5aa08277c271cf349be19e12275 /xmlhelp
parentb1b10adec4c2730640e09aee8afed7ef393e338f (diff)
equalsAsciiL faster than equalsAscii & comparetoAscii(const sal_Char*)
Diffstat (limited to 'xmlhelp')
-rw-r--r--xmlhelp/source/cxxhelp/provider/content.cxx38
1 files changed, 19 insertions, 19 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/content.cxx b/xmlhelp/source/cxxhelp/provider/content.cxx
index 895a02e1a882..b0612f026a51 100644
--- a/xmlhelp/source/cxxhelp/provider/content.cxx
+++ b/xmlhelp/source/cxxhelp/provider/content.cxx
@@ -313,7 +313,7 @@ uno::Any SAL_CALL Content::execute(
{
uno::Any aRet;
- if ( aCommand.Name.compareToAscii( "getPropertyValues" ) == 0 )
+ if ( aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getPropertyValues")) )
{
uno::Sequence< beans::Property > Properties;
if ( !( aCommand.Argument >>= Properties ) )
@@ -324,7 +324,7 @@ uno::Any SAL_CALL Content::execute(
aRet <<= getPropertyValues( Properties );
}
- else if ( aCommand.Name.compareToAscii( "setPropertyValues" ) == 0 )
+ else if ( aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("setPropertyValues")) )
{
uno::Sequence<beans::PropertyValue> propertyValues;
@@ -347,17 +347,17 @@ uno::Any SAL_CALL Content::execute(
aRet <<= ret;
}
- else if ( aCommand.Name.compareToAscii( "getPropertySetInfo" ) == 0 )
+ else if ( aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getPropertySetInfo")) )
{
// Note: Implemented by base class.
aRet <<= getPropertySetInfo( Environment );
}
- else if ( aCommand.Name.compareToAscii( "getCommandInfo" ) == 0 )
+ else if ( aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("getCommandInfo")) )
{
// Note: Implemented by base class.
aRet <<= getCommandInfo( Environment );
}
- else if ( aCommand.Name.compareToAscii( "open" ) == 0 )
+ else if ( aCommand.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("open")) )
{
ucb::OpenCommandArgument2 aOpenCommand;
if ( !( aCommand.Argument >>= aOpenCommand ) )
@@ -459,26 +459,26 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
{
const beans::Property& rProp = rProperties[n];
- if ( rProp.Name.compareToAscii( "ContentType" ) == 0 )
+ if ( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ContentType")) )
xRow->appendString(
rProp,
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"application/vnd.sun.star.help" )) );
- else if( rProp.Name.compareToAscii( "Title" ) == 0 )
+ else if( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Title")) )
xRow->appendString ( rProp,m_aURLParameter.get_title() );
- else if( rProp.Name.compareToAscii( "IsReadOnly" ) == 0 )
+ else if( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsReadOnly")) )
xRow->appendBoolean( rProp,true );
- else if( rProp.Name.compareToAscii( "IsDocument" ) == 0 )
+ else if( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsDocument")) )
xRow->appendBoolean(
rProp,
m_aURLParameter.isFile() || m_aURLParameter.isRoot() );
- else if( rProp.Name.compareToAscii( "IsFolder" ) == 0 )
+ else if( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsFolder")) )
xRow->appendBoolean(
rProp,
! m_aURLParameter.isFile() || m_aURLParameter.isRoot() );
- else if( rProp.Name.compareToAscii( "IsErrorDocument" ) == 0 )
+ else if( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IsErrorDocument")) )
xRow->appendBoolean( rProp, m_aURLParameter.isErrorDocument() );
- else if( rProp.Name.compareToAscii( "MediaType" ) == 0 )
+ else if( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MediaType")) )
if( m_aURLParameter.isPicture() )
xRow->appendString(
rProp,
@@ -497,7 +497,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
else
xRow->appendVoid( rProp );
else if( m_aURLParameter.isModule() )
- if( rProp.Name.compareToAscii( "KeywordList" ) == 0 )
+ if( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("KeywordList")) )
{
KeywordInfo *inf =
m_pDatabases->getKeyword( m_aURLParameter.get_module(),
@@ -508,7 +508,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
aAny <<= inf->getKeywordList();
xRow->appendObject( rProp,aAny );
}
- else if( rProp.Name.compareToAscii( "KeywordRef" ) == 0 )
+ else if( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("KeywordRef")) )
{
KeywordInfo *inf =
m_pDatabases->getKeyword( m_aURLParameter.get_module(),
@@ -519,7 +519,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
aAny <<= inf->getIdList();
xRow->appendObject( rProp,aAny );
}
- else if( rProp.Name.compareToAscii( "KeywordAnchorForRef" ) == 0 )
+ else if( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("KeywordAnchorForRef")) )
{
KeywordInfo *inf =
m_pDatabases->getKeyword( m_aURLParameter.get_module(),
@@ -530,7 +530,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
aAny <<= inf->getAnchorList();
xRow->appendObject( rProp,aAny );
}
- else if( rProp.Name.compareToAscii( "KeywordTitleForRef" ) == 0 )
+ else if( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("KeywordTitleForRef")) )
{
KeywordInfo *inf =
m_pDatabases->getKeyword( m_aURLParameter.get_module(),
@@ -541,7 +541,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
aAny <<= inf->getTitleList();
xRow->appendObject( rProp,aAny );
}
- else if( rProp.Name.compareToAscii( "SearchScopes" ) == 0 )
+ else if( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SearchScopes")) )
{
uno::Sequence< rtl::OUString > seq( 2 );
seq[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Heading" ));
@@ -550,7 +550,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
aAny <<= seq;
xRow->appendObject( rProp,aAny );
}
- else if( rProp.Name.compareToAscii( "Order" ) == 0 )
+ else if( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Order")) )
{
StaticModuleInformation *inf =
m_pDatabases->getStaticInformationForModule(
@@ -564,7 +564,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
}
else
xRow->appendVoid( rProp );
- else if( rProp.Name.compareToAscii( "AnchorName" ) == 0 &&
+ else if( rProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("AnchorName")) &&
m_aURLParameter.isFile() )
xRow->appendString( rProp,m_aURLParameter.get_tag() );
else