sc/source/core/data/fillinfo.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit f8d0fb5968f78b363dafe5a5b2f96cc98cd9dfe6
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Jan 23 11:05:31 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Jan 23 11:03:45 2024 +0100

    we seem to need three extra rows in ScTableInfo
    
    or we get lots of
       OSL_FAIL("FillInfo: Range too big" );
    from initRowInfo()
    
    regression from
        commit a86c00414a43c5d87981ffae1018cb242c5e5e1d
        Author: Noel Grandin <noel.gran...@collabora.co.uk>
        Date:   Fri Jan 19 14:27:10 2024 +0200
        cool#6893 reduce allocation in ScGridWindow::PaintTile
    
    Change-Id: I44a925ffab756e52c49280b864a3d4190e9e9b49
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162431
    Reviewed-by: Michael Meeks <michael.me...@collabora.com>
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx
index 193211b1f3ec..d53637456af1 100644
--- a/sc/source/core/data/fillinfo.cxx
+++ b/sc/source/core/data/fillinfo.cxx
@@ -1049,16 +1049,16 @@ void ScDocument::FillInfo(
         rArray.MirrorSelfX();
 }
 
-/// We seem to need to allocate two extra rows here, not sure why
+/// We seem to need to allocate three extra rows here, not sure why
 ///
 ScTableInfo::ScTableInfo(SCROW nStartRow, SCROW nEndRow)
     : mnArrCount(0)
-    , mnArrCapacity(nEndRow - nStartRow + 3)
+    , mnArrCapacity(nEndRow - nStartRow + 4)
     , mbPageMode(false)
 {
     assert(nStartRow >= 0);
     assert(nEndRow >= nStartRow);
-    mpRowInfo.reset(new RowInfo[nEndRow - nStartRow + 3] {});
+    mpRowInfo.reset(new RowInfo[nEndRow - nStartRow + 4] {});
 }
 
 ScTableInfo::~ScTableInfo()

Reply via email to