diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-23 16:07:32 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-27 14:07:56 +0200 |
commit | c7c6f0af6c836ebe0968967a1e7c8320b0ac17d6 (patch) | |
tree | 4bc5b2fa623b9765b88bbfe7de10a7590c87d5c8 /ucb | |
parent | 99482297c7dd497e41fad2e7193759043e305101 (diff) |
loplugin:stringadd convert chained append to +
which can use the more efficient *StringConcat
Also fix a crash in stringview plugin which
started happening while I working on this.
Change-Id: I91a5b9b7707d1594d27d80b73930f5afac8ae608
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114568
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/core/provprox.cxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/cmis/cmis_url.cxx | 2 | ||||
-rw-r--r-- | ucb/source/ucp/ftp/ftpurl.cxx | 2 |
3 files changed, 5 insertions, 3 deletions
diff --git a/ucb/source/core/provprox.cxx b/ucb/source/core/provprox.cxx index 08836311b0cf..3424b27aca94 100644 --- a/ucb/source/core/provprox.cxx +++ b/ucb/source/core/provprox.cxx @@ -351,7 +351,9 @@ UcbContentProviderProxy::getContentProvider() } OSL_ENSURE( m_xProvider.is(), - OStringBuffer("UcbContentProviderProxy::getContentProvider - No provider for '").append(OUStringToOString(m_aService, osl_getThreadTextEncoding())).append(".").getStr() ); + OStringBuffer("UcbContentProviderProxy::getContentProvider - No provider for '" + + OUStringToOString(m_aService, osl_getThreadTextEncoding()) + + ".").getStr() ); return m_xTargetProvider; } diff --git a/ucb/source/ucp/cmis/cmis_url.cxx b/ucb/source/ucp/cmis/cmis_url.cxx index ae2bce9dd59a..38c63df8bf9f 100644 --- a/ucb/source/ucp/cmis/cmis_url.cxx +++ b/ucb/source/ucp/cmis/cmis_url.cxx @@ -90,7 +90,7 @@ namespace cmis if ( !sSegment.isEmpty( ) ) { - sEncodedPath.append("/").append(rtl::Uri::encode( sSegment, + sEncodedPath.append("/" + rtl::Uri::encode( sSegment, rtl_UriCharClassRelSegment, rtl_UriEncodeKeepEscapes, RTL_TEXTENCODING_UTF8 )); diff --git a/ucb/source/ucp/ftp/ftpurl.cxx b/ucb/source/ucp/ftp/ftpurl.cxx index da2db0eaa208..d6afdc8610df 100644 --- a/ucb/source/ucp/ftp/ftpurl.cxx +++ b/ucb/source/ucp/ftp/ftpurl.cxx @@ -332,7 +332,7 @@ OUString FTPURL::parent(bool internal) const if(last.isEmpty()) bff.append(".."); else if ( last == ".." ) - bff.append(last).append("/.."); + bff.append(last + "/.."); bff.append(m_aType); return bff.makeStringAndClear(); |