diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-19 15:58:58 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-20 10:07:31 +0200 |
commit | 3af99e4d59d89c343965a928681a30f36b1007d2 (patch) | |
tree | 2389765131bdb92817e98bc922ffecbf0184d69b /sfx2/source/appl | |
parent | d665e058246631c8a838c3a731bdd0c56be27903 (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/appl')
-rw-r--r-- | sfx2/source/appl/sfxhelp.cxx | 28 | ||||
-rw-r--r-- | sfx2/source/appl/shutdowniconunx.cxx | 2 |
2 files changed, 15 insertions, 15 deletions
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index a64d124d9831..33224c51ee90 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -328,22 +328,22 @@ OUString SfxHelp::GetHelpModuleName_Impl() aFactoryShortName = "schart" ; else if ( aFactoryShortName == "BasicIDE" ) aFactoryShortName = "sbasic"; - else if ( aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("sweb")) - || aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("sglobal")) - || aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("swxform")) ) + else if ( aFactoryShortName.startsWith("sweb") + || aFactoryShortName.startsWith("sglobal") + || aFactoryShortName.startsWith("swxform") ) aFactoryShortName = "swriter" ; - else if ( aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("dbquery")) - || aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("dbbrowser")) - || aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("dbrelation")) - || aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("dbtable")) - || aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("dbapp")) - || aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("dbreport")) - || aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("swreport")) - || aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("dbbrowser")) - || aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("swform")) ) + else if ( aFactoryShortName.startsWith("dbquery") + || aFactoryShortName.startsWith("dbbrowser") + || aFactoryShortName.startsWith("dbrelation") + || aFactoryShortName.startsWith("dbtable") + || aFactoryShortName.startsWith("dbapp") + || aFactoryShortName.startsWith("dbreport") + || aFactoryShortName.startsWith("swreport") + || aFactoryShortName.startsWith("dbbrowser") + || aFactoryShortName.startsWith("swform") ) aFactoryShortName = "sdatabase"; - else if ( aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("sbibliography")) - || aFactoryShortName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("StartModule")) ) + else if ( aFactoryShortName.startsWith("sbibliography") + || aFactoryShortName.startsWith("StartModule") ) aFactoryShortName = sDefaultModule; } else diff --git a/sfx2/source/appl/shutdowniconunx.cxx b/sfx2/source/appl/shutdowniconunx.cxx index 2d3ecf7c0e8a..937cabe8de6d 100644 --- a/sfx2/source/appl/shutdowniconunx.cxx +++ b/sfx2/source/appl/shutdowniconunx.cxx @@ -212,7 +212,7 @@ static void add_ugly_db_item( GtkMenuShell *pMenuShell, const char *pAsciiURL, aEntry[m].Value >>= aDescription; } - if ( aURL.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(BASE_URL)) && !aDescription.isEmpty() ) + if ( aURL.startsWith(BASE_URL) && !aDescription.isEmpty() ) { add_item (pMenuShell, pAsciiURL, &aDescription, nResId, pFnCallback); break; |