Kaydet (Commit) c30963b8 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Caolán McNamara

tdf#117522 Calc Column Width after Insert Columns

regression from
    commit d6fb5ca5
    dyncolcontainer: use ScCompressedArray for pColWidth

Change-Id: I65d1197c0c638216e063f74def4efb98bfbb9aad
Reviewed-on: https://gerrit.libreoffice.org/54067Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit a111a7ba)
Reviewed-on: https://gerrit.libreoffice.org/55119Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 2f923aa1
...@@ -284,6 +284,9 @@ void ScTable::InsertCol( ...@@ -284,6 +284,9 @@ void ScTable::InsertCol(
if (mpColWidth && mpColFlags) if (mpColWidth && mpColFlags)
{ {
mpColWidth->InsertPreservingSize(nStartCol, nSize, STD_COL_WIDTH); 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); mpColFlags->InsertPreservingSize(nStartCol, nSize, CRFlags::NONE);
} }
if (pOutlineTable) if (pOutlineTable)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment