summaryrefslogtreecommitdiff
path: root/sfx2/source/notify
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-19 15:58:58 +0200
committerNoel Grandin <noel@peralex.com>2013-11-20 10:07:31 +0200
commit3af99e4d59d89c343965a928681a30f36b1007d2 (patch)
tree2389765131bdb92817e98bc922ffecbf0184d69b /sfx2/source/notify
parentd665e058246631c8a838c3a731bdd0c56be27903 (diff)
convert equalsAsciiL calls to startsWith calls
Convert code like: aStr.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ActiveConnection" ) ) to aStr.startsWith( "ActiveConnection" ) which compiles down to the same machine code. Change-Id: Id4b0c5e0f9afe716a468d3afc70374699848dc33
Diffstat (limited to 'sfx2/source/notify')
-rw-r--r--sfx2/source/notify/eventsupplier.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx
index a871df6d3ed8..d3095b021d51 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -211,13 +211,13 @@ static void Execute( uno::Any& aEventData, const document::DocumentEvent& aTrigg
nIndex += 1;
}
- if (aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(STAR_BASIC)) && !aScript.isEmpty())
+ if (aType.startsWith(STAR_BASIC) && !aScript.isEmpty())
{
uno::Any aAny;
SfxMacroLoader::loadMacro( aScript, aAny, pDoc );
}
- else if (aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Service")) ||
- aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Script")))
+ else if (aType.startsWith("Service") ||
+ aType.startsWith("Script"))
{
if ( !aScript.isEmpty() )
{
@@ -385,7 +385,7 @@ SvxMacro* SfxEvents_Impl::ConvertToMacro( const uno::Any& rElement, SfxObjectShe
ScriptType eType( STARBASIC );
if ( aType == STAR_BASIC )
eType = STARBASIC;
- else if (aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Script")) && !aScriptURL.isEmpty())
+ else if (aType.startsWith("Script") && !aScriptURL.isEmpty())
eType = EXTENDED_STYPE;
else if ( aType == SVX_MACRO_LANGUAGE_JAVASCRIPT )
eType = JAVASCRIPT;