[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - sc/source

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Tue Aug 24 07:44:42 UTC 2021


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

New commits:
commit 6e990842f827b8c719decb6301a240f64bf82e8d
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Mon Aug 23 12:28:18 2021 +0200
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Tue Aug 24 09:44:05 2021 +0200

    tdf#144022: make sure to create missing columns if needed
    
    Change-Id: I1a0771fbe8023859ab29d8114303b62f6a3d539c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120731
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
    (cherry picked from commit 23c1ec0d498124fbe275145d236db455f83cd850)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120873
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
    (cherry picked from commit e2100a4f6927d3e441881033cf20d6034719a5fb)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120881
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>

diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 3eabcc585850..7dca833d8277 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -2904,20 +2904,20 @@ bool ScTable::RemoveFlags( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCRO
 void ScTable::SetPattern( const ScAddress& rPos, const ScPatternAttr& rAttr )
 {
     if (ValidColRow(rPos.Col(),rPos.Row()))
-        aCol[rPos.Col()].SetPattern( rPos.Row(), rAttr );
+        CreateColumnIfNotExists(rPos.Col()).SetPattern(rPos.Row(), rAttr);
 }
 
 const ScPatternAttr* ScTable::SetPattern( SCCOL nCol, SCROW nRow, std::unique_ptr<ScPatternAttr> pAttr )
 {
     if (ValidColRow(nCol,nRow))
-        return aCol[nCol].SetPattern( nRow, std::move(pAttr) );
+        return CreateColumnIfNotExists(nCol).SetPattern(nRow, std::move(pAttr));
     return nullptr;
 }
 
 void ScTable::SetPattern( SCCOL nCol, SCROW nRow, const ScPatternAttr& rAttr )
 {
     if (ValidColRow(nCol,nRow))
-        aCol[nCol].SetPattern( nRow, rAttr );
+        CreateColumnIfNotExists(nCol).SetPattern(nRow, rAttr);
 }
 
 void ScTable::ApplyAttr( SCCOL nCol, SCROW nRow, const SfxPoolItem& rAttr )


More information about the Libreoffice-commits mailing list