[Libreoffice-commits] .: filter/source unoxml/source

Caolán McNamara caolan at kemper.freedesktop.org
Sun Jan 16 06:25:14 PST 2011


 filter/source/config/cache/filtercache.cxx |    2 -
 unoxml/source/dom/document.cxx             |   32 ++++++++++++++---------------
 2 files changed, 17 insertions(+), 17 deletions(-)

New commits:
commit fb3a1b16020865021ce3a40a91cb4efd13215d6f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sun Jan 16 14:12:26 2011 +0000

    equalsAsciiL faster than equalsAscii & comparetoAscii(const sal_Char*)

diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx
index 199cebc..0d1e387 100644
--- a/filter/source/config/cache/filtercache.cxx
+++ b/filter/source/config/cache/filtercache.cxx
@@ -450,7 +450,7 @@ CacheItem FilterCache::getItem(      EItemType        eType,
         // --> PB 2006-10-18 #142498#
         // In Standalone-Impress the module WriterWeb is not installed
         // but it is there to load help pages
-        sal_Bool bIsHelpFilter = sItem.equalsAscii( "writer_web_HTML_help" );
+        bool bIsHelpFilter = sItem.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("writer_web_HTML_help"));
 
         if ( !bIsHelpFilter && !impl_isModuleInstalled(sDocService) )
         // <--
diff --git a/unoxml/source/dom/document.cxx b/unoxml/source/dom/document.cxx
index 2c92450..c78b7cc 100644
--- a/unoxml/source/dom/document.cxx
+++ b/unoxml/source/dom/document.cxx
@@ -612,29 +612,29 @@ namespace DOM
     {
         events::CEvent *pEvent = 0;
         if (
-            aType.compareToAscii("DOMSubtreeModified")          == 0||
-            aType.compareToAscii("DOMNodeInserted")             == 0||
-            aType.compareToAscii("DOMNodeRemoved")              == 0||
-            aType.compareToAscii("DOMNodeRemovedFromDocument")  == 0||
-            aType.compareToAscii("DOMNodeInsertedIntoDocument") == 0||
-            aType.compareToAscii("DOMAttrModified")             == 0||
-            aType.compareToAscii("DOMCharacterDataModified")    == 0)
+            aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DOMSubtreeModified"))          ||
+            aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DOMNodeInserted"))             ||
+            aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DOMNodeRemoved"))              ||
+            aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DOMNodeRemovedFromDocument"))  ||
+            aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DOMNodeInsertedIntoDocument")) ||
+            aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DOMAttrModified"))             ||
+            aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DOMCharacterDataModified")))
         {
             pEvent = new events::CMutationEvent;
 
         } else if (
-            aType.compareToAscii("DOMFocusIn")  == 0||
-            aType.compareToAscii("DOMFocusOut") == 0||
-            aType.compareToAscii("DOMActivate") == 0)
+            aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DOMFocusIn"))  ||
+            aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DOMFocusOut")) ||
+            aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("DOMActivate")))
         {
             pEvent = new events::CUIEvent;
         } else if (
-            aType.compareToAscii("click")     == 0||
-            aType.compareToAscii("mousedown") == 0||
-            aType.compareToAscii("mouseup")   == 0||
-            aType.compareToAscii("mouseover") == 0||
-            aType.compareToAscii("mousemove") == 0||
-            aType.compareToAscii("mouseout")  == 0 )
+            aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("click"))     ||
+            aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("mousedown")) ||
+            aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("mouseup"))   ||
+            aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("mouseover")) ||
+            aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("mousemove")) ||
+            aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("mouseout")) )
         {
             pEvent = new events::CMouseEvent;
         }


More information about the Libreoffice-commits mailing list