diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-03-24 10:09:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-03-24 15:29:18 +0000 |
commit | 637cceeefba0b0e2e09ac734bb0327364e8ddd25 (patch) | |
tree | ba321c814d9806921cbc23c293706cc54c8b82df /comphelper | |
parent | 4d90e2696dd4358b3d02bbbae90160c92d36263f (diff) |
loplugin:stringadd in c*
after my patch to merge the bufferadd loplugin into stringadd
Change-Id: I66f4ce2fd87c1e12eefb14406e0e17212f68ceff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149497
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/misc/AccessibleImplementationHelper.cxx | 3 | ||||
-rw-r--r-- | comphelper/source/misc/diagnose_ex.cxx | 6 | ||||
-rw-r--r-- | comphelper/source/property/property.cxx | 20 |
3 files changed, 13 insertions, 16 deletions
diff --git a/comphelper/source/misc/AccessibleImplementationHelper.cxx b/comphelper/source/misc/AccessibleImplementationHelper.cxx index a45b6e5f3cd7..a02f4380dd33 100644 --- a/comphelper/source/misc/AccessibleImplementationHelper.cxx +++ b/comphelper/source/misc/AccessibleImplementationHelper.cxx @@ -33,8 +33,7 @@ OUString GetkeyBindingStrByXkeyBinding(const Sequence<KeyStroke>& keySet) OUStringBuffer buf; for (const auto& k : keySet) { - buf.append('\n'); - buf.append(k.KeyChar); + buf.append("\n" + OUStringChar(k.KeyChar)); } return buf.makeStringAndClear(); } diff --git a/comphelper/source/misc/diagnose_ex.cxx b/comphelper/source/misc/diagnose_ex.cxx index 8c5cb3dce961..020aa69ca241 100644 --- a/comphelper/source/misc/diagnose_ex.cxx +++ b/comphelper/source/misc/diagnose_ex.cxx @@ -372,12 +372,10 @@ void DbgUnhandledException(const css::uno::Any & caught, const char* currentFunc const char* area, const char* explanatory) { OStringBuffer sMessage( 512 ); - sMessage.append( "DBG_UNHANDLED_EXCEPTION in " ); - sMessage.append(currentFunction); + sMessage.append( OString::Concat("DBG_UNHANDLED_EXCEPTION in ") + currentFunction); if (explanatory) { - sMessage.append("\n when: "); - sMessage.append(explanatory); + sMessage.append(OString::Concat("\n when: ") + explanatory); } sMessage.append(" exception: "); exceptionToStringImpl(sMessage, caught); diff --git a/comphelper/source/property/property.cxx b/comphelper/source/property/property.cxx index 16edc8203255..0627e71436f5 100644 --- a/comphelper/source/property/property.cxx +++ b/comphelper/source/property/property.cxx @@ -87,10 +87,10 @@ void copyProperties(const Reference<XPropertySet>& _rxSource, catch (Exception&) { #if OSL_DEBUG_LEVEL > 0 - OUStringBuffer aBuffer; - aBuffer.append( "::comphelper::copyProperties: could not copy property '" ); - aBuffer.append(rSourceProp.Name ); - aBuffer.append( "' to the destination set (a '" ); + OUStringBuffer aBuffer( + "::comphelper::copyProperties: could not copy property '" + + rSourceProp.Name + + "' to the destination set (a '" ); Reference< XServiceInfo > xSI( _rxDest, UNO_QUERY ); if ( xSI.is() ) @@ -104,16 +104,16 @@ void copyProperties(const Reference<XPropertySet>& _rxSource, aBuffer.append( "' implementation).\n" ); Any aException( ::cppu::getCaughtException() ); - aBuffer.append( "Caught an exception of type '" ); - aBuffer.append( aException.getValueTypeName() ); - aBuffer.append( "'" ); + aBuffer.append( "Caught an exception of type '" + + aException.getValueTypeName() + + "'" ); Exception aBaseException; if ( ( aException >>= aBaseException ) && !aBaseException.Message.isEmpty() ) { - aBuffer.append( ", saying '" ); - aBuffer.append( aBaseException.Message ); - aBuffer.append( "'" ); + aBuffer.append( ", saying '" + + aBaseException.Message + + "'" ); } aBuffer.append( "." ); |