summaryrefslogtreecommitdiffstats
path: root/unoxml
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-01-16 14:12:26 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-01-16 14:12:26 +0000
commita3f6cded87000e53cb0a1cea004888276f0cd201 (patch)
treef8c039d35b09a2822b8ae1445d7117d5cd6cf651 /unoxml
parentRemove DECLARE_LIST(DescrList, E3dLabelObj*) (diff)
downloadcore-a3f6cded87000e53cb0a1cea004888276f0cd201.tar.gz
core-a3f6cded87000e53cb0a1cea004888276f0cd201.zip
equalsAsciiL faster than equalsAscii & comparetoAscii(const sal_Char*)
Diffstat (limited to 'unoxml')
-rw-r--r--unoxml/source/dom/document.cxx32
1 files changed, 16 insertions, 16 deletions
diff --git a/unoxml/source/dom/document.cxx b/unoxml/source/dom/document.cxx
index 60b044c7f43e..09e3cafc66fc 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;
}