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 --- sw/source/uibase/wrtsh/wrtundo.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw/source/uibase/wrtsh') diff --git a/sw/source/uibase/wrtsh/wrtundo.cxx b/sw/source/uibase/wrtsh/wrtundo.cxx index 49d73d75e579..6b087fad7b6d 100644 --- a/sw/source/uibase/wrtsh/wrtundo.cxx +++ b/sw/source/uibase/wrtsh/wrtundo.cxx @@ -130,7 +130,7 @@ void SwWrtShell::GetDoStrings( DoType eDoType, SfxStringListItem& rStrs ) const for (const OUString & comment : comments) { OSL_ENSURE(!comment.isEmpty(), "no Undo/Redo Text set"); - buf.append(comment).append("\n"); + buf.append(comment + "\n"); } rStrs.SetString(buf.makeStringAndClear()); } -- cgit