sc/source/ui/navipi/content.cxx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
New commits: commit 25436ac4de0e08c41463fe0239f2614453d3057f Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Sun Sep 4 09:31:53 2022 +0200 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Sun Sep 4 10:10:11 2022 +0200 Simplify by using replace instead of replaceAt in loop (sc/navipi/content.cxx) Change-Id: If0daf975928ef90e83152f71d24ece3a5c7cfac0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139356 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index 29787ab6ffb7..1387abd44346 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -940,11 +940,7 @@ const ScAreaLink* ScContentTree::GetLink( sal_uLong nIndex ) static OUString lcl_NoteString( const ScPostIt& rNote ) { - OUString aText = rNote.GetText(); - sal_Int32 nAt; - while ( (nAt = aText.indexOf( '\n' )) != -1 ) - aText = aText.replaceAt( nAt, 1, u" " ); - return aText; + return rNote.GetText().replace('\n', ' '); } void ScContentTree::GetNoteStrings()