summaryrefslogtreecommitdiff
path: root/cui
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 /cui
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 'cui')
-rw-r--r--cui/source/customize/cfg.cxx4
-rw-r--r--cui/source/options/treeopt.cxx6
2 files changed, 5 insertions, 5 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 5cb3bb6f10f8..54f745c29760 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -411,8 +411,8 @@ SvxConfigPage::CanConfig( const OUString& aModuleId )
OUString GetModuleName( const OUString& aModuleId )
{
- if ( aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.TextDocument" ) ) ||
- aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.GlobalDocument" ) ) )
+ if ( aModuleId.startsWith( "com.sun.star.text.TextDocument" ) ||
+ aModuleId.startsWith( "com.sun.star.text.GlobalDocument" ) )
return OUString("Writer");
else if ( aModuleId == "com.sun.star.text.WebDocument" )
return OUString("Writer/Web");
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index 062d9c9f7c82..3cfb7ff9e196 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -1615,9 +1615,9 @@ void OfaTreeOptionsDialog::Initialize( const Reference< XFrame >& _xFrame )
{
// text document
ResStringArray& rTextArray = aDlgResource.GetTextArray();
- if ( aFactory.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.TextDocument" ) )
- || aFactory.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.WebDocument" ) )
- || aFactory.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.text.GlobalDocument" ) ) )
+ if ( aFactory.startsWith( "com.sun.star.text.TextDocument" )
+ || aFactory.startsWith( "com.sun.star.text.WebDocument" )
+ || aFactory.startsWith( "com.sun.star.text.GlobalDocument" ) )
{
SfxModule* pSwMod = (*(SfxModule**) GetAppData(SHL_WRITER));
if ( !lcl_isOptionHidden( SID_SW_EDITOPTIONS, aOptionsDlgOpt ) )