summaryrefslogtreecommitdiff
path: root/sw
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 /sw
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 'sw')
-rw-r--r--sw/source/core/unocore/unocrsrhelper.cxx2
-rw-r--r--sw/source/core/unocore/unosett.cxx2
-rw-r--r--sw/source/core/unocore/unostyle.cxx2
3 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/unocore/unocrsrhelper.cxx b/sw/source/core/unocore/unocrsrhelper.cxx
index e4404bbd0328..0543f6560f5c 100644
--- a/sw/source/core/unocore/unocrsrhelper.cxx
+++ b/sw/source/core/unocore/unocrsrhelper.cxx
@@ -1184,7 +1184,7 @@ void makeRedline( SwPaM& rPaM,
eType = nsRedlineType_t::REDLINE_FORMAT;
else if ( rRedlineType == "TextTable" )
eType = nsRedlineType_t::REDLINE_TABLE;
- else if( !rRedlineType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "Insert" ) ))
+ else if( !rRedlineType.startsWith( "Insert" ))
throw lang::IllegalArgumentException();
//todo: what about REDLINE_FMTCOLL?
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index cea2d9e26b84..32e74d11a550 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -1108,7 +1108,7 @@ const char aInvalidStyle[] = "__XXX___invalid";
bool SwXNumberingRules::isInvalidStyle(const OUString &rName)
{
- return rName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(aInvalidStyle));
+ return rName.startsWith(aInvalidStyle);
}
namespace
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 8ba76e410507..5560dcc61fef 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1692,7 +1692,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry,
sal_uInt16 nBin = USHRT_MAX;
if ( !( rValue >>= sTmp ) )
throw lang::IllegalArgumentException();
- if ( sTmp.equalsAsciiL ( RTL_CONSTASCII_STRINGPARAM ( "[From printer settings]" ) ) )
+ if ( sTmp.startsWith ( "[From printer settings]" ) )
nBin = USHRT_MAX-1;
else if ( pPrinter )
{