diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-04-11 16:46:49 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-04-12 12:10:13 +0200 |
commit | ab862e060e33eb3b24f363cccce2225f3dc923cf (patch) | |
tree | 13151e725414be3758c05d99096616f91019ba23 /sc | |
parent | 0013f21ecd918e0541f165c3526a58f42dd75481 (diff) |
crashtesting: failure on import of gnome545630-1.xlsx
since...
commit 7282014e362a1529a36c88eb308df8ed359c2cfa
Date: Fri Feb 1 15:15:16 2019 +0100
tdf#50916 Makes numbers of columns dynamic
Change-Id: Ib42b770282753350b9c4016fe7c9f57f68e6c209
Reviewed-on: https://gerrit.libreoffice.org/70603
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/columnspanset.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sc/source/core/data/columnspanset.cxx b/sc/source/core/data/columnspanset.cxx index 89805a7824df..7cc3e7c9e982 100644 --- a/sc/source/core/data/columnspanset.cxx +++ b/sc/source/core/data/columnspanset.cxx @@ -338,12 +338,13 @@ void RangeColumnSpanSet::executeColumnAction(ScDocument& rDoc, sc::ColumnSpanSet { for (SCTAB nTab = range.aStart.Tab(); nTab <= range.aEnd.Tab(); ++nTab) { - for (SCCOL nCol = range.aStart.Col(); nCol <= range.aEnd.Col(); ++nCol) - { - ScTable* pTab = rDoc.FetchTable(nTab); - if (!pTab) - continue; + ScTable* pTab = rDoc.FetchTable(nTab); + if (!pTab) + continue; + SCCOL nEndCol = pTab->ClampToAllocatedColumns(range.aEnd.Col()); + for (SCCOL nCol = range.aStart.Col(); nCol <= nEndCol; ++nCol) + { if (!ValidCol(nCol)) break; |