registry/source/regimpl.cxx | 3 +-- reportdesign/source/ui/dlg/Navigator.cxx | 6 ++---- sal/osl/unx/file_url.cxx | 3 +-- sal/rtl/uri.cxx | 2 +- 4 files changed, 5 insertions(+), 9 deletions(-)
New commits: commit 27b98e9e3b3d21fded40df1912292f381fae4ab0 Author: Noel Grandin <[email protected]> AuthorDate: Sat Mar 25 18:56:09 2023 +0200 Commit: Noel Grandin <[email protected]> CommitDate: Sat Mar 25 19:03:28 2023 +0000 loplugin:stringadd in registry..sal after my patch to merge the bufferadd loplugin into stringadd Change-Id: I1658b960d44780f7d9c447246b1178cb70be5e66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149581 Tested-by: Jenkins Reviewed-by: Noel Grandin <[email protected]> diff --git a/registry/source/regimpl.cxx b/registry/source/regimpl.cxx index 5f5bf335edb4..7dcbaa272dab 100644 --- a/registry/source/regimpl.cxx +++ b/registry/source/regimpl.cxx @@ -643,8 +643,7 @@ RegError ORegistry::createKey(RegKeyHandle hKey, std::u16string_view keyName, return RegError::CREATE_KEY_FAILED; } - sFullPath.append(token); - sFullPath.append('/'); + sFullPath.append(token + "/"); } } while(nIndex != -1); diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx index 90cc2dc0d45b..24a4e253b849 100644 --- a/reportdesign/source/ui/dlg/Navigator.cxx +++ b/reportdesign/source/ui/dlg/Navigator.cxx @@ -82,16 +82,14 @@ static OUString lcl_getName(const uno::Reference< beans::XPropertySet>& _xElemen uno::Reference< report::XReportControlModel> xReportModel(_xElement,uno::UNO_QUERY); if ( xFixedText.is() ) { - sName.append(" : "); - sName.append(xFixedText->getLabel()); + sName.append(" : " + xFixedText->getLabel()); } else if ( xReportModel.is() && _xElement->getPropertySetInfo()->hasPropertyByName(PROPERTY_DATAFIELD) ) { ReportFormula aFormula( xReportModel->getDataField() ); if ( aFormula.isValid() ) { - sName.append(" : "); - sName.append( aFormula.getUndecoratedContent() ); + sName.append(" : " + aFormula.getUndecoratedContent() ); } } return sName.makeStringAndClear(); diff --git a/sal/osl/unx/file_url.cxx b/sal/osl/unx/file_url.cxx index 4b5a16885cb3..c69670d6373a 100644 --- a/sal/osl/unx/file_url.cxx +++ b/sal/osl/unx/file_url.cxx @@ -955,8 +955,7 @@ oslFileError osl::detail::convertPathnameToUrl(OString const & pathname, OUStrin static sal_Unicode const aHex[16] = { 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46 }; /* '0'--'9', 'A'--'F' */ - buf.append(aHex[c >> 4]); - buf.append(aHex[c & 15]); + buf.append(OUStringChar(aHex[c >> 4]) + OUStringChar(aHex[c & 15])); --convert; continue; } diff --git a/sal/rtl/uri.cxx b/sal/rtl/uri.cxx index 3414552615e6..bb53385dbaab 100644 --- a/sal/rtl/uri.cxx +++ b/sal/rtl/uri.cxx @@ -143,7 +143,7 @@ sal_uInt32 readUcs4(sal_Unicode const ** pBegin, sal_Unicode const * pEnd, } else { - OStringBuffer aBuf; + OStringBuffer aBuf(16); aBuf.append(static_cast< char >(nChar)); rtl_TextToUnicodeConverter aConverter = rtl_createTextToUnicodeConverter(eCharset);
