sc/source/core/data/table2.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e98325d8996c436394d3e1db357683aa25fc4ca7
Author:     Luboš Luňák <l.lu...@collabora.com>
AuthorDate: Fri Mar 11 17:43:41 2022 +0100
Commit:     Luboš Luňák <l.lu...@collabora.com>
CommitDate: Fri Mar 11 23:10:34 2022 +0100

    allocate column in ScTable::SetPatternAreaCondFormat() (tdf#147894)
    
    Change-Id: Id14bb20ef5e49551cef5216b5149e3c281c04223
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131389
    Tested-by: Jenkins
    Reviewed-by: Luboš Luňák <l.lu...@collabora.com>

diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 59444b7bb61e..8fdee0a9f414 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -2894,7 +2894,7 @@ void ScTable::RemoveCondFormatData( const ScRangeList& 
rRangeList, sal_uInt32 nI
 void  ScTable::SetPatternAreaCondFormat( SCCOL nCol, SCROW nStartRow, SCROW 
nEndRow,
         const ScPatternAttr& rAttr, const ScCondFormatIndexes& 
rCondFormatIndexes )
 {
-    aCol[nCol].SetPatternArea( nStartRow, nEndRow, rAttr);
+    CreateColumnIfNotExists(nCol).SetPatternArea( nStartRow, nEndRow, rAttr);
 
     for (const auto& rIndex : rCondFormatIndexes)
     {

Reply via email to