svx/source/dialog/fntctrl.cxx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)
New commits: commit 076be52655f2cf4e331b344e0f6497f41b37fa8c Author: Julien Nabet <serval2...@yahoo.fr> AuthorDate: Thu Sep 1 12:07:30 2022 +0200 Commit: Julien Nabet <serval2...@yahoo.fr> CommitDate: Thu Sep 1 13:42:39 2022 +0200 tdf#150712: Format->Conditional->Condition 100% CPU Flamegraph showed this part, see: https://bugs.documentfoundation.org/attachment.cgi?id=182121 Change-Id: Id14ea4f95d8912847f77eed561b14d3edee2f67f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139152 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2...@yahoo.fr> diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx index 58b412f1e822..04af6deae0b6 100644 --- a/svx/source/dialog/fntctrl.cxx +++ b/svx/source/dialog/fntctrl.cxx @@ -124,15 +124,9 @@ void setFont(const SvxFont& rNewFont, SvxFont& rImplFont) */ bool CleanAndCheckEmpty(OUString& rText) { - bool bEmpty = true; - for (sal_Int32 i = 0; i < rText.getLength(); ++i) - { - if (0xa == rText[i] || 0xd == rText[i]) - rText = rText.replaceAt(i, 1, u" "); - else - bEmpty = false; - } - return bEmpty; + rText = rText.replaceAll("\xa", u" "); + rText = rText.replaceAll("\xd", u" "); + return rText.isEmpty(); } } // end anonymous namespace