diff options
Diffstat (limited to 'sc/source/core/data/table2.cxx')
-rw-r--r-- | sc/source/core/data/table2.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx index b7b169e418b8..4be3a7ec6840 100644 --- a/sc/source/core/data/table2.cxx +++ b/sc/source/core/data/table2.cxx @@ -284,6 +284,9 @@ void ScTable::InsertCol( if (mpColWidth && mpColFlags) { mpColWidth->InsertPreservingSize(nStartCol, nSize, STD_COL_WIDTH); + // The inserted columns have the same widths as the columns, which were selected for insert. + for (SCSIZE i=0; i < std::min(MAXCOL-nSize-nStartCol, nSize); ++i) + mpColWidth->SetValue(nStartCol + i, mpColWidth->GetValue(nStartCol+i+nSize)); mpColFlags->InsertPreservingSize(nStartCol, nSize, CRFlags::NONE); } if (pOutlineTable) |