summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-03-30 01:50:53 +0200
committerAshod Nakashian <ashnakash@gmail.com>2016-05-22 03:34:46 +0000
commitb2a02da8e7866dd5ce61bf5cff56d6066f3e4a06 (patch)
tree6ceaf6f18a3c0feb1b2b2cb5c9c62ada200db789
parent40b2e53d22347e625cd22f0ac8fd6c79165b3703 (diff)
extract another function from ScDocument::FillInfo
Change-Id: Iac607e1fe915c8bc90316508c98855a60117d435 Reviewed-on: https://gerrit.libreoffice.org/23631 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 772e66406b90bdb898e73b4fa944a6e55a42683b) Reviewed-on: https://gerrit.libreoffice.org/25286 Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> Tested-by: Ashod Nakashian <ashnakash@gmail.com>
-rw-r--r--sc/source/core/data/fillinfo.cxx35
1 files changed, 20 insertions, 15 deletions
diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx
index 6e5dc7b9f1de..b29155059774 100644
--- a/sc/source/core/data/fillinfo.cxx
+++ b/sc/source/core/data/fillinfo.cxx
@@ -318,6 +318,25 @@ void initCellInfo(RowInfo* pRowInfo, SCSIZE nArrCount, SCCOL nRotMax, bool bPain
}
}
+void initColWidths(RowInfo* pRowInfo, ScDocument* pDoc, double fColScale, SCTAB nTab, SCCOL nCol2, SCCOL nRotMax)
+{
+ for (SCCOL nArrCol=nCol2+3; nArrCol<=nRotMax+2; nArrCol++) // Add remaining widths
+ {
+ SCCOL nX = nArrCol-1;
+ if ( ValidCol(nX) )
+ {
+ if (!pDoc->ColHidden(nX, nTab))
+ {
+ sal_uInt16 nThisWidth = (sal_uInt16) (pDoc->GetColWidth( nX, nTab ) * fColScale);
+ if (!nThisWidth)
+ nThisWidth = 1;
+
+ pRowInfo[0].pCellInfo[nArrCol].nWidth = nThisWidth;
+ }
+ }
+ }
+}
+
}
void ScDocument::FillInfo(
@@ -412,21 +431,7 @@ void ScDocument::FillInfo(
initCellInfo(pRowInfo, nArrCount, nRotMax, bPaintMarks, pDefShadow,
nBlockStartY, nBlockEndY, nBlockStartX, nBlockEndX);
- for (nArrCol=nCol2+3; nArrCol<=nRotMax+2; nArrCol++) // Add remaining widths
- {
- nX = nArrCol-1;
- if ( ValidCol(nX) )
- {
- if (!ColHidden(nX, nTab))
- {
- sal_uInt16 nThisWidth = (sal_uInt16) (GetColWidth( nX, nTab ) * fColScale);
- if (!nThisWidth)
- nThisWidth = 1;
-
- pRowInfo[0].pCellInfo[nArrCol].nWidth = nThisWidth;
- }
- }
- }
+ initColWidths(pRowInfo, this, fColScale, nTab, nCol2, nRotMax);
ScConditionalFormatList* pCondFormList = GetCondFormList(nTab);
if(pCondFormList)