summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2022-09-04 16:15:06 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-09-05 15:54:20 +0200
commit273ddb469abade5505ea919de77d2a18bc35f0c9 (patch)
tree9e9b734d8e71bd6faa340cc494f74e4b9225ee7e /editeng
parent8364ed3d2f927c6bdb874baff96e0affcc20977b (diff)
Simplify by using replace instead of replaceAt in loop in editeng
Change-Id: I7eb974a4adab74a93a10ff08c8853fbb5ae88885 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139372 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/eehtml.cxx9
1 files changed, 1 insertions, 8 deletions
diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx
index 0820c48dfd83..cc26360df6a2 100644
--- a/editeng/source/editeng/eehtml.cxx
+++ b/editeng/source/editeng/eehtml.cxx
@@ -192,14 +192,7 @@ void EditHTMLParser::NextToken( HtmlTokenId nToken )
{
// Only written until HTML with 319?
if ( IsReadPRE() )
- {
- sal_Int32 nTabPos = aText.indexOf( '\t');
- while ( nTabPos != -1 )
- {
- aText = aText.replaceAt( nTabPos, 1, u" " );
- nTabPos = aText.indexOf( '\t', nTabPos+8 );
- }
- }
+ aText = aText.replaceAll(u"\t", u" ");
ImpInsertText( aText );
}
}