• Dennis Francis's avatar
    Refactor ScAttrArray for tdf#50916 · 06d32945
    Dennis Francis yazdı
    For a default column, now ScAttrArray does not store the default
    format. So the case of default pattern from 0 to MAXROW is represented
    as nCount = 0 and pData = nullptr in ScAttrArray.
    
    A new ScAttrArray object (aNextColAttrArray) is introduced as a member
    of ScTable. This is used to store the formatting of *unallocated*
    columns (whose indices are from aCol.size() to MAXCOL).
    
    In next patches for this bug, I plan to refactor table*.cxx functions
    related to formatting such that :
    
    1) In formatting setter functions, if colspan of the input range
       spans the colrange(aCol.size() to MAXCOL) then instead of
       allocating columns, apply that formatting to aNextColAttrArray.
    
    2) In formatting getter (const) functions, if requested colspan has some
       intersection with the colrange(aCol.size() to MAXCOL) then use the
       formatting info stored in aNextColAttrArray to calculate the formatting
       of the input range.
    
    3) In general setter (non-const) functions if we really need to allocate
       new columns (example, when data is entered), use the formatting info
       stored in aNextColAttrArray to create pAttrArray of the new column.
    
    Change-Id: Ieb56f853209b396d92fdb2c27e39361703576423
    Reviewed-on: https://gerrit.libreoffice.org/27828Tested-by: 's avatarJenkins <ci@libreoffice.org>
    Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
    Tested-by: 's avatarEike Rathke <erack@redhat.com>
    06d32945
attarray.hxx 10.8 KB