[Libreoffice-commits] core.git: sc/source
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Sat Apr 27 11:19:33 UTC 2019
sc/source/core/data/fillinfo.cxx | 25 ++++++++++++++++---------
1 file changed, 16 insertions(+), 9 deletions(-)
New commits:
commit 3bf32679971804ade8e85f0e8023dc3b127cc3dc
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sat Apr 27 11:27:32 2019 +0300
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sat Apr 27 13:18:11 2019 +0200
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 at collabora.com>
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
More information about the Libreoffice-commits
mailing list