sw/source/core/fields/reffld.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8cc530b1ecbb706e998177ab6e85f33ac111b389
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon Sep 19 16:55:34 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Sep 19 21:29:10 2022 +0200

    size this OUStringBuffer at initial construction
    
    Change-Id: I6414281cef5eedf1e797139695bf05c72c300447
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140181
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index eb36f8d44f90..277540d12ee0 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -401,7 +401,7 @@ const SwTextNode* SwGetRefField::GetReferencedTextNode() 
const
 // strikethrough for tooltips using Unicode combining character
 static OUString lcl_formatStringByCombiningCharacter(const OUString& sText, 
const sal_Unicode cChar)
 {
-    OUStringBuffer sRet;
+    OUStringBuffer sRet(sText.getLength() * 2);
     for (sal_Int32 i = 0; i < sText.getLength(); ++i)
     {
         sRet.append(sText[i]);

Reply via email to