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

New commits:
commit 650c3477aa4120cafcb9f0e77b341b1ac70de048
Author:     Luboš Luňák <l.lu...@collabora.com>
AuthorDate: Mon Jun 13 19:51:43 2022 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Wed Jun 15 06:25:43 2022 +0200

    allocate columns in ScTable::TransposeClip() (tdf#149554)
    
    Change-Id: I2ae151ed9656884bca6963ba09bdf236e09096b7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135774
    Tested-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Reviewed-by: Luboš Luňák <l.lu...@collabora.com>
    (cherry picked from commit ef1be22efb3e1625da1683ea98392cc41657b1cd)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135747
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index 3ba4ce9b5bfd..ab3532b70236 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -990,7 +990,7 @@ void ScTable::TransposeClip(SCCOL nCol1, SCROW nRow1, SCCOL 
nCol2, SCROW nRow2,
 {
     bool bWasCut = rDocument.IsCutMode();
 
-    for (SCCOL nCol=nCol1; nCol<=nCol2; nCol++)
+    for (SCCOL nCol : GetWritableColumnsRange(nCol1, nCol2))
     {
         std::vector<SCROW> aFilteredRows;
 

Reply via email to