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

New commits:
commit e445eac863ac616fb99c9d6bf5510b965fd15957
Author:     Luboš Luňák <l.lu...@collabora.com>
AuthorDate: Wed Jun 15 09:29:20 2022 +0200
Commit:     Luboš Luňák <l.lu...@collabora.com>
CommitDate: Thu Jun 16 10:04:29 2022 +0200

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

diff --git a/sc/source/core/data/table7.cxx b/sc/source/core/data/table7.cxx
index f7576361c8a1..9af01cba748e 100644
--- a/sc/source/core/data/table7.cxx
+++ b/sc/source/core/data/table7.cxx
@@ -115,7 +115,7 @@ void ScTable::DeleteBeforeCopyFromClip(
             if (nClipCol > aClipRange.aEnd.Col())
                 nClipCol = aClipRange.aStart.Col(); // loop through columns.
 
-            const ScColumn& rClipCol = rClipTab.aCol[nClipCol];
+            const ScColumn& rClipCol = 
const_cast<ScTable&>(rClipTab).CreateColumnIfNotExists(nClipCol);
             aCol[nCol].DeleteBeforeCopyFromClip(rCxt, rClipCol, 
rBroadcastSpans);
         }
     }

Reply via email to