summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-04-27 11:27:32 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-04-27 13:18:11 +0200
commit3bf32679971804ade8e85f0e8023dc3b127cc3dc (patch)
tree24969995a2dc8fb4789937167012d1a1e6c50ff0 /sc
parentc08f23b1470c0f49336c83c711d473584ce5c96f (diff)
tdf#124997: only skip parsing non-empty cells for unallocated columns
Otherwise, not-yet-allocated columns have STD_COL_WIDTH (1280), while normal columns have widths like 82 (pixel), making the oversized grid look as if the columns not having vertical lines at all. Also, we need to consider default attrubutes here, to properly render cell properties like borders and background for unallocated columns. Regression after commit 7282014e362a1529a36c88eb308df8ed359c2cfa Change-Id: Ibb37c0c621d009bda2c5c0176cf5d3b238c45964 Reviewed-on: https://gerrit.libreoffice.org/71408 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/fillinfo.cxx25
1 files changed, 16 insertions, 9 deletions
diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx
index aef2e64ce579..35c164dd4b82 100644
--- a/sc/source/core/data/fillinfo.cxx
+++ b/sc/source/core/data/fillinfo.cxx
@@ -433,7 +433,7 @@ void ScDocument::FillInfo(
{
SCCOL nX = (nArrCol>0) ? nArrCol-1 : MAXCOL+1; // negative -> invalid
- if ( ValidCol(nX) && nX < maTabs[nTab]->GetAllocatedColumnsCount() )
+ if (ValidCol(nX))
{
// #i58049#, #i57939# Hidden columns must be skipped here, or their attributes
// will disturb the output
@@ -447,18 +447,25 @@ void ScDocument::FillInfo(
pRowInfo[0].pCellInfo[nArrCol].nWidth = nThisWidth; //TODO: this should be enough
- ScColumn* pThisCol = &maTabs[nTab]->aCol[nX]; // Column data
+ const ScAttrArray* pThisAttrArr; // Attribute
+ if (nX < maTabs[nTab]->GetAllocatedColumnsCount())
+ {
+ ScColumn* pThisCol = &maTabs[nTab]->aCol[nX]; // Column data
+
+ nArrRow = 1;
+ // Iterate between rows nY1 and nY2 and pick up non-empty
+ // cells that are not hidden.
+ RowInfoFiller aFunc(*this, nTab, pRowInfo, nArrCol, nArrRow);
+ sc::ParseAllNonEmpty(pThisCol->maCells.begin(), pThisCol->maCells, nRow1, nRow2,
+ aFunc);
- nArrRow = 1;
- // Iterate between rows nY1 and nY2 and pick up non-empty
- // cells that are not hidden.
- RowInfoFiller aFunc(*this, nTab, pRowInfo, nArrCol, nArrRow);
- sc::ParseAllNonEmpty(
- pThisCol->maCells.begin(), pThisCol->maCells, nRow1, nRow2, aFunc);
+ pThisAttrArr = pThisCol->pAttrArray.get();
+ }
+ else
+ pThisAttrArr = &maTabs[nTab]->aDefaultColAttrArray;
if (nX+1 >= nCol1) // Attribute/Blockmark from nX1-1
{
- ScAttrArray* pThisAttrArr = pThisCol->pAttrArray.get(); // Attribute
nArrRow = 0;
SCROW nCurRow=nRow1; // single rows