summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-03-30 01:50:53 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-03-30 03:43:44 +0000
commit772e66406b90bdb898e73b4fa944a6e55a42683b (patch)
treef50a4696fe98ba7c07a548430eea81fa7c5297f6
parentextract another function from ScDocument::FillInfo (diff)
downloadcore-772e66406b90bdb898e73b4fa944a6e55a42683b.tar.gz
core-772e66406b90bdb898e73b4fa944a6e55a42683b.zip
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>
-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 99d58c1b9259..07aafe7ac565 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)