From cdbac696fb0cbb1d09645bc02799eed5504b192b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 10 Oct 2019 16:23:37 +0200 Subject: simplify "a = a +" to "a +=" mostly so that my stringadd loplugin can point out places to improve Change-Id: I9920ee1c99cdb6b811ba67ff9d8e32aa261884b5 Reviewed-on: https://gerrit.libreoffice.org/80618 Tested-by: Jenkins Reviewed-by: Noel Grandin --- stoc/source/defaultregistry/defaultregistry.cxx | 6 +++--- stoc/source/implementationregistration/implreg.cxx | 4 ++-- stoc/source/javavm/javavm.cxx | 7 +++---- 3 files changed, 8 insertions(+), 9 deletions(-) (limited to 'stoc') diff --git a/stoc/source/defaultregistry/defaultregistry.cxx b/stoc/source/defaultregistry/defaultregistry.cxx index 71a637309c5a..f0a4d0ff18a3 100644 --- a/stoc/source/defaultregistry/defaultregistry.cxx +++ b/stoc/source/defaultregistry/defaultregistry.cxx @@ -827,7 +827,7 @@ sal_Bool SAL_CALL NestedKeyImpl::createLink( const OUString& aLinkName, const OU throw InvalidRegistryException(); } - resolvedName = resolvedName + aLinkName.copy(lastIndex); + resolvedName += aLinkName.copy(lastIndex); } else { @@ -882,7 +882,7 @@ void SAL_CALL NestedKeyImpl::deleteLink( const OUString& rLinkName ) throw InvalidRegistryException(); } - resolvedName = resolvedName + rLinkName.copy(lastIndex); + resolvedName += rLinkName.copy(lastIndex); } else { @@ -925,7 +925,7 @@ OUString SAL_CALL NestedKeyImpl::getLinkTarget( const OUString& rLinkName ) throw InvalidRegistryException(); } - resolvedName = resolvedName + rLinkName.copy(lastIndex); + resolvedName += rLinkName.copy(lastIndex); } else { diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx index c3d0f1e38820..730dd7febdd8 100644 --- a/stoc/source/implementationregistration/implreg.cxx +++ b/stoc/source/implementationregistration/implreg.cxx @@ -194,7 +194,7 @@ void prepareLink( const Reference < XSimpleRegistry > & xDest, if (pShortName) { - linkRefName = linkRefName + link.copy(pShortName - pTmpName + 1); + linkRefName += link.copy(pShortName - pTmpName + 1); linkName = link.copy(0, pShortName - pTmpName); } @@ -515,7 +515,7 @@ void prepareUserKeys(const Reference < XSimpleRegistry >& xDest, OUString linkTarget = xKey->getLinkTarget(relativKey); OUString linkName(xKey->getKeyName().copy(xUnoKey->getKeyName().getLength())); - linkName = linkName + "/" + relativKey; + linkName += "/" + relativKey; if (bRegister) { diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index 71ffbb3fffb1..c6b3bd19dbf8 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -473,8 +473,7 @@ void getJavaPropsFromSafetySettings( case 3: sVal = "none"; break; } - OUString sProperty("appletviewer.security.mode="); - sProperty= sProperty + sVal; + OUString sProperty = "appletviewer.security.mode=" + sVal; pjvm->pushProp(sProperty); } css::uno::Reference key_CheckSecurity= xRegistryRootKey->openKey( @@ -484,9 +483,9 @@ void getJavaPropsFromSafetySettings( bool val = static_cast(key_CheckSecurity->getLongValue()); OUString sProperty("stardiv.security.disableSecurity="); if( val) - sProperty= sProperty + "false"; + sProperty += "false"; else - sProperty= sProperty + "true"; + sProperty += "true"; pjvm->pushProp( sProperty); } } -- cgit