[Libreoffice-commits] core.git: sc/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Wed Mar 30 03:44:30 UTC 2016
sc/source/core/data/fillinfo.cxx | 35 ++++++++++++++++++++---------------
1 file changed, 20 insertions(+), 15 deletions(-)
New commits:
commit 772e66406b90bdb898e73b4fa944a6e55a42683b
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed Mar 30 01:50:53 2016 +0200
extract another function from ScDocument::FillInfo
Change-Id: Iac607e1fe915c8bc90316508c98855a60117d435
Reviewed-on: https://gerrit.libreoffice.org/23631
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/sc/source/core/data/fillinfo.cxx b/sc/source/core/data/fillinfo.cxx
index 99d58c1..07aafe7 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)
More information about the Libreoffice-commits
mailing list