summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-01-16 21:20:49 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-01-16 21:20:49 +0000
commite432dff366f500a8c43577ac9202669aa15e04b4 (patch)
tree7c78c99283eb9d31c65bff51c4904c5cd43aacd0 /svtools
parent74de5ce5cda5473b6ce079120efbc07a1784ecb4 (diff)
equalsAsciiL faster than equalsAscii
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/config/extcolorcfg.cxx6
-rw-r--r--svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx4
-rw-r--r--svtools/source/filter.vcl/filter/filter.cxx8
-rw-r--r--svtools/source/graphic/provider.cxx8
-rw-r--r--svtools/source/misc/embedhlp.cxx2
-rw-r--r--svtools/source/productregistration/productregistration.cxx2
-rw-r--r--svtools/source/uno/contextmenuhelper.cxx2
-rw-r--r--svtools/source/uno/popupmenucontrollerbase.cxx4
-rw-r--r--svtools/source/uno/statusbarcontroller.cxx10
9 files changed, 23 insertions, 23 deletions
diff --git a/svtools/source/config/extcolorcfg.cxx b/svtools/source/config/extcolorcfg.cxx
index b62285f85ea6..424e234b6b50 100644
--- a/svtools/source/config/extcolorcfg.cxx
+++ b/svtools/source/config/extcolorcfg.cxx
@@ -327,12 +327,12 @@ void ExtendedColorConfig_Impl::Load(const rtl::OUString& rScheme)
{
aComponentNames = GetPropertyNames(sBase);
FillComponentColors(aComponentNames,aDisplayNameMap);
- } // if ( bFound )
+ }
if ( !m_sLoadedScheme.getLength() )
m_sLoadedScheme = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("default"));
- if ( !sScheme.equalsAscii("default") )
+ if ( !sScheme.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("default")) )
{
::rtl::OUString sDefault(RTL_CONSTASCII_USTRINGPARAM("default"));
if ( ExistsScheme(sDefault) )
@@ -341,7 +341,7 @@ void ExtendedColorConfig_Impl::Load(const rtl::OUString& rScheme)
aComponentNames = GetPropertyNames(sBaseDefault);
FillComponentColors(aComponentNames,aDisplayNameMap);
}
- } // if ( !sScheme.equalsAscii("default") )
+ }
if ( !bFound && sScheme.getLength() )
{
AddScheme(sScheme);
diff --git a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx
index 6a5d9306241d..efe020b1cbda 100644
--- a/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx
+++ b/svtools/source/filter.vcl/filter/SvFilterOptionsDialog.cxx
@@ -151,7 +151,7 @@ uno::Sequence< beans::PropertyValue > SvFilterOptionsDialog::getPropertyValues()
sal_Int32 i, nCount;
for ( i = 0, nCount = aMediaDescriptor.getLength(); i < nCount; i++ )
{
- if ( aMediaDescriptor[ i ].Name.equalsAscii( "FilterData" ) )
+ if ( aMediaDescriptor[ i ].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("FilterData")) )
break;
}
if ( i == nCount )
@@ -173,7 +173,7 @@ void SvFilterOptionsDialog::setPropertyValues( const uno::Sequence< beans::Prope
sal_Int32 i, nCount;
for ( i = 0, nCount = aMediaDescriptor.getLength(); i < nCount; i++ )
{
- if ( aMediaDescriptor[ i ].Name.equalsAscii( "FilterData" ) )
+ if ( aMediaDescriptor[ i ].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("FilterData")) )
{
aMediaDescriptor[ i ].Value >>= aFilterDataSequence;
break;
diff --git a/svtools/source/filter.vcl/filter/filter.cxx b/svtools/source/filter.vcl/filter/filter.cxx
index a0f53054192a..c443678c7e4b 100644
--- a/svtools/source/filter.vcl/filter/filter.cxx
+++ b/svtools/source/filter.vcl/filter/filter.cxx
@@ -1310,7 +1310,7 @@ USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvS
sal_Int32 i;
for ( i = 0; i < pFilterData->getLength(); i++ )
{
- if ( (*pFilterData)[ i ].Name.equalsAscii( "PreviewSizeHint" ) )
+ if ( (*pFilterData)[ i ].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PreviewSizeHint")) )
{
awt::Size aSize;
if ( (*pFilterData)[ i ].Value >>= aSize )
@@ -1322,7 +1322,7 @@ USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvS
nImportFlags &=~GRFILTER_I_FLAGS_FOR_PREVIEW;
}
}
- else if ( (*pFilterData)[ i ].Name.equalsAscii( "AllowPartialStreamRead" ) )
+ else if ( (*pFilterData)[ i ].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("AllowPartialStreamRead")) )
{
(*pFilterData)[ i ].Value >>= bAllowPartialStreamRead;
if ( bAllowPartialStreamRead )
@@ -1330,7 +1330,7 @@ USHORT GraphicFilter::ImportGraphic( Graphic& rGraphic, const String& rPath, SvS
else
nImportFlags &=~GRFILTER_I_FLAGS_ALLOW_PARTIAL_STREAMREAD;
}
- else if ( (*pFilterData)[ i ].Name.equalsAscii( "CreateNativeLink" ) )
+ else if ( (*pFilterData)[ i ].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("CreateNativeLink")) )
{
(*pFilterData)[ i ].Value >>= bCreateNativeLink;
}
@@ -1867,7 +1867,7 @@ USHORT GraphicFilter::ExportGraphic( const Graphic& rGraphic, const String& rPat
sal_Int32 k, j, i = 0;
for ( i = 0; i < pFilterData->getLength(); i++ )
{
- if ( (*pFilterData)[ i ].Name.equalsAscii( "AdditionalChunks" ) )
+ if ( (*pFilterData)[ i ].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("AdditionalChunks")) )
{
com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > aAdditionalChunkSequence;
if ( (*pFilterData)[ i ].Value >>= aAdditionalChunkSequence )
diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx
index 045dca6fe5d9..a4dcb7f51de8 100644
--- a/svtools/source/graphic/provider.cxx
+++ b/svtools/source/graphic/provider.cxx
@@ -232,19 +232,19 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadStandardImage( co
if( ( 0 == rResourceURL.getToken( 0, '/', nIndex ).compareToAscii( "private:standardimage" ) ) )
{
rtl::OUString sImageName( rResourceURL.copy( nIndex ) );
- if ( sImageName.equalsAscii( "info" ) )
+ if ( sImageName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("info")) )
{
xRet = InfoBox::GetStandardImage().GetXGraphic();
}
- else if ( sImageName.equalsAscii( "warning" ) )
+ else if ( sImageName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("warning")) )
{
xRet = WarningBox::GetStandardImage().GetXGraphic();
}
- else if ( sImageName.equalsAscii( "error" ) )
+ else if ( sImageName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("error")) )
{
xRet = ErrorBox::GetStandardImage().GetXGraphic();
}
- else if ( sImageName.equalsAscii( "query" ) )
+ else if ( sImageName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("query")) )
{
xRet = QueryBox::GetStandardImage().GetXGraphic();
}
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index cd349e233a2c..34886a78915f 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -194,7 +194,7 @@ void SAL_CALL EmbedEventListener_Impl::notifyEvent( const document::EventObject&
{
SolarMutexGuard aGuard;
- if ( pObject && aEvent.EventName.equalsAscii("OnVisAreaChanged") && pObject->GetViewAspect() != embed::Aspects::MSOLE_ICON && !pObject->IsChart() )
+ if ( pObject && aEvent.EventName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("OnVisAreaChanged")) && pObject->GetViewAspect() != embed::Aspects::MSOLE_ICON && !pObject->IsChart() )
{
pObject->UpdateReplacement();
}
diff --git a/svtools/source/productregistration/productregistration.cxx b/svtools/source/productregistration/productregistration.cxx
index ff4ed10bf4f0..909e1e5eb96c 100644
--- a/svtools/source/productregistration/productregistration.cxx
+++ b/svtools/source/productregistration/productregistration.cxx
@@ -441,7 +441,7 @@ namespace svt
OProductRegistration::EventType OProductRegistration::classify( const OUString& _rEventDesc )
{
EventType eReturn = etUnknown;
- if ( _rEventDesc.equalsAscii( "RegistrationRequired" ) )
+ if ( _rEventDesc.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("RegistrationRequired")) )
{
eReturn = etRegistrationRequired;
}
diff --git a/svtools/source/uno/contextmenuhelper.cxx b/svtools/source/uno/contextmenuhelper.cxx
index 4d163f68acaa..16a1bcc8ec96 100644
--- a/svtools/source/uno/contextmenuhelper.cxx
+++ b/svtools/source/uno/contextmenuhelper.cxx
@@ -576,7 +576,7 @@ ContextMenuHelper::getLabelFromCommandURL(
{
for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ )
{
- if ( aPropSeq[i].Name.equalsAscii( "Label" ))
+ if ( aPropSeq[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Label")) )
{
aPropSeq[i].Value >>= aStr;
break;
diff --git a/svtools/source/uno/popupmenucontrollerbase.cxx b/svtools/source/uno/popupmenucontrollerbase.cxx
index bf828175532f..1c1412193c06 100644
--- a/svtools/source/uno/popupmenucontrollerbase.cxx
+++ b/svtools/source/uno/popupmenucontrollerbase.cxx
@@ -371,9 +371,9 @@ void SAL_CALL PopupMenuControllerBase::initialize( const Sequence< Any >& aArgum
{
if ( aArguments[i] >>= aPropValue )
{
- if ( aPropValue.Name.equalsAscii( "Frame" ))
+ if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Frame")) )
aPropValue.Value >>= xFrame;
- else if ( aPropValue.Name.equalsAscii( "CommandURL" ))
+ else if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("CommandURL")) )
aPropValue.Value >>= aCommandURL;
}
}
diff --git a/svtools/source/uno/statusbarcontroller.cxx b/svtools/source/uno/statusbarcontroller.cxx
index 422391f652de..d34405749bd8 100644
--- a/svtools/source/uno/statusbarcontroller.cxx
+++ b/svtools/source/uno/statusbarcontroller.cxx
@@ -189,15 +189,15 @@ throw ( Exception, RuntimeException )
{
if ( aArguments[i] >>= aPropValue )
{
- if ( aPropValue.Name.equalsAscii( "Frame" ))
+ if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Frame")) )
aPropValue.Value >>= m_xFrame;
- else if ( aPropValue.Name.equalsAscii( "CommandURL" ))
+ else if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("CommandURL")) )
aPropValue.Value >>= m_aCommandURL;
- else if ( aPropValue.Name.equalsAscii( "ServiceManager" ))
+ else if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ServiceManager")) )
aPropValue.Value >>= m_xServiceManager;
- else if ( aPropValue.Name.equalsAscii( "ParentWindow" ))
+ else if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ParentWindow")) )
aPropValue.Value >>= m_xParentWindow;
- else if ( aPropValue.Name.equalsAscii( "Identifier" ))
+ else if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Identifier")) )
aPropValue.Value >>= m_nID;
}
}