sc/source/ui/view/output2.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a8818b4d72233e2b600d183605c0c6abcf43b1d3
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Sun Feb 6 17:00:42 2022 +0100
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Sun Feb 6 18:16:51 2022 +0100

    We know the length here
    
    Change-Id: Id201a8e5798230352234d95268d4a6e36c2d1807
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129557
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index ba4a1b13a795..60cc1d4861a3 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -602,8 +602,8 @@ void ScDrawStringsVars::RepeatToFill( tools::Long nColWidth 
)
     if ( nSpaceToFill <= nCharWidth )
         return;
 
-    tools::Long nCharsToInsert = nSpaceToFill / nCharWidth;
-    OUStringBuffer aFill;
+    sal_Int32 nCharsToInsert = nSpaceToFill / nCharWidth;
+    OUStringBuffer aFill(nCharsToInsert);
     comphelper::string::padToLength(aFill, nCharsToInsert, nRepeatChar);
     aString = aString.replaceAt( nRepeatPos, 0, aFill.makeStringAndClear() );
     TextChanged();

Reply via email to