fpicker/source/office/fileview.cxx |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

New commits:
commit afaa86e7e9a0a9effb28d46289805453f3806a74
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Sun Sep 4 16:12:42 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Sep 5 15:54:42 2022 +0200

    Simplify by using replace instead of replaceAt in loop in fpicker
    
    Change-Id: Ibe601294bd55ac9a93a535b6acd092064fdad364
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139371
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/fpicker/source/office/fileview.cxx 
b/fpicker/source/office/fileview.cxx
index 7e78f773ed84..e6ce2abc9405 100644
--- a/fpicker/source/office/fileview.cxx
+++ b/fpicker/source/office/fileview.cxx
@@ -1491,14 +1491,7 @@ void SvtFileView_Impl::implEnumerationSuccess()
 
 OUString SvtFileView_Impl::ReplaceTabWithString(const OUString& rValue)
 {
-    OUString const aTab( "\t" );
-    OUString const aTabString( "%09" );
-
-    sal_Int32 iPos;
-    OUString aValue(rValue);
-    while ( ( iPos = aValue.indexOf( aTab ) ) >= 0 )
-        aValue = aValue.replaceAt( iPos, 1, aTabString );
-    return aValue;
+    return rValue.replaceAll(u"\t", u"%09");
 }
 
 void SvtFileView_Impl::CreateDisplayText_Impl()

Reply via email to