From c7c6f0af6c836ebe0968967a1e7c8320b0ac17d6 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 23 Apr 2021 16:07:32 +0200 Subject: 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 --- ucb/source/core/provprox.cxx | 4 +++- ucb/source/ucp/cmis/cmis_url.cxx | 2 +- ucb/source/ucp/ftp/ftpurl.cxx | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'ucb') 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(); -- cgit