sc/source/core/data/column2.cxx |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit fc91d611a231ae6fc498d0ac32944afb72775b95
Author:     Luboš Luňák <l.lu...@collabora.com>
AuthorDate: Wed Aug 31 11:23:05 2022 +0200
Commit:     Luboš Luňák <l.lu...@collabora.com>
CommitDate: Wed Aug 31 16:46:23 2022 +0200

    assert when formula group size is not large enough
    
    That should never happen, as the size should originally come
    from the formula group size.
    
    Change-Id: Ic429ef498bb56d589c04a07d0fb44d9841deb19f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139090
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lu...@collabora.com>

diff --git a/sc/source/core/data/column2.cxx b/sc/source/core/data/column2.cxx
index 9fa08657e328..08391bd24150 100644
--- a/sc/source/core/data/column2.cxx
+++ b/sc/source/core/data/column2.cxx
@@ -3163,8 +3163,11 @@ void ScColumn::SetFormulaResults( SCROW nRow, const 
double* pResults, size_t nLe
 
     size_t nBlockLen = it->size - aPos.second;
     if (nBlockLen < nLen)
+    {
         // Result array is longer than the length of formula cells. Not good.
+        assert( false );
         return;
+    }
 
     sc::formula_block::iterator itCell = sc::formula_block::begin(*it->data);
     std::advance(itCell, aPos.second);
@@ -3199,8 +3202,11 @@ void ScColumn::CalculateInThread( ScInterpreterContext& 
rContext, SCROW nRow, si
 
     size_t nBlockLen = it->size - aPos.second;
     if (nBlockLen < nLen)
+    {
         // Length is longer than the length of formula cells. Not good.
+        assert( false );
         return;
+    }
 
     sc::formula_block::iterator itCell = sc::formula_block::begin(*it->data);
     std::advance(itCell, aPos.second);
@@ -3232,8 +3238,11 @@ void ScColumn::HandleStuffAfterParallelCalculation( 
SCROW nRow, size_t nLen, ScI
 
     size_t nBlockLen = it->size - aPos.second;
     if (nBlockLen < nLen)
+    {
         // Length is longer than the length of formula cells. Not good.
+        assert( false );
         return;
+    }
 
     sc::formula_block::iterator itCell = sc::formula_block::begin(*it->data);
     std::advance(itCell, aPos.second);

Reply via email to