[Libreoffice-commits] core.git: sc/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Mon Apr 10 23:55:32 UTC 2017
sc/source/ui/view/output.cxx | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
New commits:
commit 27fa45eab406ba50ad21d4668dd9df38a26c9095
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Mon Apr 10 23:33:01 2017 +0200
rename variable to reflect the limitation to columns
Change-Id: I3511981161ddd4bed38cbdaf15b8b1d1b8ac487d
Reviewed-on: https://gerrit.libreoffice.org/36395
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index f896179a6066..f020a1849df8 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -1019,6 +1019,8 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext)
Application::GetSettings().GetStyleSettings().GetHighContrastMode();
long nPosY = nScrY;
+
+ // iterate through the rows to show
for (SCSIZE nArrY=1; nArrY+1<nArrCount; nArrY++)
{
RowInfo* pThisRowInfo = &pRowInfo[nArrY];
@@ -1056,14 +1058,14 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext)
const Color* pOldColor = nullptr;
const ScDataBarInfo* pOldDataBarInfo = nullptr;
const ScIconSetInfo* pOldIconSetInfo = nullptr;
- SCCOL nMergedCells = 1;
+ SCCOL nMergedCols = 1;
SCCOL nOldMerged = 0;
- for (SCCOL nX=nX1; nX + nMergedCells <= nX2 + 1; nX += nOldMerged)
+ for (SCCOL nX=nX1; nX + nMergedCols <= nX2 + 1; nX += nOldMerged)
{
- CellInfo* pInfo = &pThisRowInfo->pCellInfo[nX+nMergedCells];
+ CellInfo* pInfo = &pThisRowInfo->pCellInfo[nX+nMergedCols];
- nOldMerged = nMergedCells;
+ nOldMerged = nMergedCols;
if (bCellContrast)
{
@@ -1110,15 +1112,15 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext)
drawCells(rRenderContext, pColor, pBackground, pOldColor, pOldBackground, aRect, nPosXLogic, nLayoutSign, nOneXLogic, nOneYLogic, pDataBarInfo, pOldDataBarInfo, pIconSetInfo, pOldIconSetInfo, mpDoc->GetIconSetBitmapMap());
// extend for all merged cells
- nMergedCells = 1;
+ nMergedCols = 1;
if (pInfo->bMerged && pInfo->pPatternAttr)
{
const ScMergeAttr* pMerge =
static_cast<const ScMergeAttr*>(&pInfo->pPatternAttr->GetItem(ATTR_MERGE));
- nMergedCells = std::max<SCCOL>(1, pMerge->GetColMerge());
+ nMergedCols = std::max<SCCOL>(1, pMerge->GetColMerge());
}
- for (SCCOL nMerged = 0; nMerged < nMergedCells; ++nMerged)
+ for (SCCOL nMerged = 0; nMerged < nMergedCols; ++nMerged)
{
SCCOL nCol = nX+nOldMerged+nMerged;
if (nCol > nX2+2)
More information about the Libreoffice-commits
mailing list