From 46c2a3688c9ee7f558f75cbe856c26c4b8849b7e Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 30 Sep 2019 15:12:52 +0200 Subject: loplugin:stringadd n sfx2..svl Change-Id: Iaf1bbe37449d4e0cfa817909d56d4bffe1e5a184 Reviewed-on: https://gerrit.libreoffice.org/79893 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svl/qa/unit/svl.cxx | 10 +++++----- svl/source/crypto/cryptosign.cxx | 4 +--- svl/source/misc/inettype.cxx | 3 +-- 3 files changed, 7 insertions(+), 10 deletions(-) (limited to 'svl') diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx index 9136dc76e930..04394af2090b 100644 --- a/svl/qa/unit/svl.cxx +++ b/svl/qa/unit/svl.cxx @@ -410,11 +410,11 @@ void Test::checkPreviewString(SvNumberFormatter& aFormatter, Color** ppColor = &pColor; if (!aFormatter.GetPreviewString(sCode, fPreviewNumber, sStr, ppColor, eLang)) { - OString aMessage = "GetPreviewString( \""; - aMessage += OUStringToOString( sCode, RTL_TEXTENCODING_ASCII_US ); - aMessage += "\", "; - aMessage += OString::number( fPreviewNumber ); - aMessage += ", sStr, ppColor, "; + OString aMessage = "GetPreviewString( \"" + + OUStringToOString( sCode, RTL_TEXTENCODING_ASCII_US ) + + "\", " + + OString::number( fPreviewNumber ) + + ", sStr, ppColor, "; aMessage += OString::number( static_cast(eLang) ); aMessage += " ) failed"; CPPUNIT_FAIL( aMessage.getStr() ); diff --git a/svl/source/crypto/cryptosign.cxx b/svl/source/crypto/cryptosign.cxx index c85b5d5870d4..4f6d757183ef 100644 --- a/svl/source/crypto/cryptosign.cxx +++ b/svl/source/crypto/cryptosign.cxx @@ -370,9 +370,7 @@ OUString PKIStatusToString(int n) OUString PKIStatusInfoToString(const PKIStatusInfo& rStatusInfo) { - OUString result; - - result += "{status="; + OUString result = "{status="; if (rStatusInfo.status.len == 1) result += PKIStatusToString(rStatusInfo.status.data[0]); else diff --git a/svl/source/misc/inettype.cxx b/svl/source/misc/inettype.cxx index 9c620694e36f..ea3675889aaa 100644 --- a/svl/source/misc/inettype.cxx +++ b/svl/source/misc/inettype.cxx @@ -262,8 +262,7 @@ INetContentType INetContentTypes::GetContentType(OUString const & rTypeName) OUString aSubType; if (parse(rTypeName, aType, aSubType)) { - aType += "/"; - aType += aSubType; + aType += "/" + aSubType; MediaTypeEntry const * pEntry = seekEntry(aType, aStaticTypeNameMap, CONTENT_TYPE_LAST + 1); return pEntry ? pEntry->m_eTypeID : CONTENT_TYPE_UNKNOWN; -- cgit