[Libreoffice-commits] .: desktop/source

Caolán McNamara caolan at kemper.freedesktop.org
Sat Jan 15 08:53:46 PST 2011


 desktop/source/app/configinit.cxx |    2 +-
 desktop/source/app/langselect.cxx |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 4a35eeb3fe0c8521232f881677c7e52da5b1a6cf
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Jan 15 16:51:11 2011 +0000

    equalsAsciiL faster than equalsAscii when length available

diff --git a/desktop/source/app/configinit.cxx b/desktop/source/app/configinit.cxx
index 3704d84..4da030c 100644
--- a/desktop/source/app/configinit.cxx
+++ b/desktop/source/app/configinit.cxx
@@ -243,7 +243,7 @@ private:
 uno::Any SAL_CALL ConfigurationErrorHandler::Context::getValueByName( OUString const & aName) 
         throw (uno::RuntimeException)
 {
-    if ( aName.equalsAscii( CONFIG_ERROR_HANDLER ) )
+    if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CONFIG_ERROR_HANDLER)) )
     {
         if ( !m_xHandler.is() )
             m_xHandler = ConfigurationErrorHandler::getDefaultInteractionHandler();
diff --git a/desktop/source/app/langselect.cxx b/desktop/source/app/langselect.cxx
index c7c69fc..f505fe3 100644
--- a/desktop/source/app/langselect.cxx
+++ b/desktop/source/app/langselect.cxx
@@ -416,7 +416,7 @@ Sequence< OUString > LanguageSelection::getInstalledLanguages()
 static Sequence< OUString > _getFallbackLocales(const OUString& aIsoLang)
 {
     Sequence< OUString > seqFallbacks;
-    if (aIsoLang.equalsAscii("zh-HK")) {
+    if (aIsoLang.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("zh-HK"))) {
         seqFallbacks = Sequence< OUString >(1);
         seqFallbacks[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("zh-TW"));
     }


More information about the Libreoffice-commits mailing list