summaryrefslogtreecommitdiff
path: root/ucbhelper
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-10 12:42:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-10 15:53:13 +0200
commit43a6b59539ad573436f43303e9fbe17c12dc9c84 (patch)
tree24cbf3a9fc84ad38e17ed92ed0a50db48f20f2c5 /ucbhelper
parentf2a1298ea409141a9190c7789b39546644084980 (diff)
simplify some OUString compareTo calls
to either startsWith or == or != Change-Id: Ie4b4662f5b8e4532cbc1ab36910389e0b3d41ef0 Reviewed-on: https://gerrit.libreoffice.org/39750 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucbhelper')
-rw-r--r--ucbhelper/source/provider/providerhelper.cxx12
1 files changed, 3 insertions, 9 deletions
diff --git a/ucbhelper/source/provider/providerhelper.cxx b/ucbhelper/source/provider/providerhelper.cxx
index 9547ece9a982..f5e3163b5658 100644
--- a/ucbhelper/source/provider/providerhelper.cxx
+++ b/ucbhelper/source/provider/providerhelper.cxx
@@ -313,9 +313,7 @@ bool ContentProviderImplHelper::renameAdditionalPropertySet(
for ( sal_Int32 n = 0; n < nCount; ++n )
{
const OUString& rKey = pKeys[ n ];
- if ( rKey.compareTo(
- aOldKeyWithSlash,
- aOldKeyWithSlash.getLength() ) == 0
+ if ( rKey.startsWith( aOldKeyWithSlash )
|| rKey.equals( aOldKeyWithoutSlash ) )
{
OUString aNewKey
@@ -397,9 +395,7 @@ bool ContentProviderImplHelper::copyAdditionalPropertySet(
for ( sal_Int32 n = 0; n < nCount; ++n )
{
const OUString& rKey = pKeys[ n ];
- if ( rKey.compareTo(
- aSrcKeyWithSlash,
- aSrcKeyWithSlash.getLength() ) == 0
+ if ( rKey.startsWith(aSrcKeyWithSlash )
|| rKey.equals( aSrcKeyWithoutSlash ) )
{
OUString aNewKey
@@ -533,9 +529,7 @@ bool ContentProviderImplHelper::removeAdditionalPropertySet(
for ( sal_Int32 n = 0; n < nCount; ++n )
{
const OUString& rCurrKey = pKeys[ n ];
- if ( rCurrKey.compareTo(
- aKeyWithSlash,
- aKeyWithSlash.getLength() ) == 0
+ if ( rCurrKey.startsWith(aKeyWithSlash )
|| rCurrKey.equals( aKeyWithoutSlash ) )
{
if ( !removeAdditionalPropertySet(