summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-01-17 15:45:56 +0200
committerNoel Grandin <noel@peralex.com>2014-01-20 13:13:52 +0200
commit3dffe225845a4f1646684ca2e688c5275993d2f7 (patch)
tree85de6fa605d6d3acff289208e3be86cb4a9b5501 /sc
parenta2c49ef9105edb8b136cd138ff0fb13a9bf78947 (diff)
sal_Bool->bool and remove unnecessary param on ScConsData::InitData
since it was only called from one place, and that place unconditionally passed "false" Change-Id: I1b730cfff23da08a86d385737043fcabf16d37cb
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/consoli.hxx14
-rw-r--r--sc/source/core/tool/consoli.cxx23
2 files changed, 17 insertions, 20 deletions
diff --git a/sc/inc/consoli.hxx b/sc/inc/consoli.hxx
index 9ae506096eeb..6bef102a0aae 100644
--- a/sc/inc/consoli.hxx
+++ b/sc/inc/consoli.hxx
@@ -70,12 +70,12 @@ class ScConsData
{
private:
ScSubTotalFunc eFunction;
- sal_Bool bReference;
- sal_Bool bColByName;
- sal_Bool bRowByName;
+ bool bReference;
+ bool bColByName;
+ bool bRowByName;
SCSIZE nColCount;
SCSIZE nRowCount;
- sal_Bool** ppUsed;
+ bool** ppUsed;
double** ppSum;
double** ppCount;
double** ppSumSqr;
@@ -86,7 +86,7 @@ private:
SCSIZE nTitleCount;
OUString* mpTitles;
SCSIZE** ppTitlePos;
- sal_Bool bCornerUsed;
+ bool bCornerUsed;
OUString aCornerText; // only for bColByName && bRowByName
public:
@@ -94,9 +94,9 @@ public:
~ScConsData();
void SetSize( SCCOL nCols, SCROW nRows );
- void SetFlags( ScSubTotalFunc eFunc, sal_Bool bColName, sal_Bool bRowName, sal_Bool bRef );
+ void SetFlags( ScSubTotalFunc eFunc, bool bColName, bool bRowName, bool bRef );
- void InitData(sal_Bool bDelete=sal_True);
+ void InitData();
void DeleteData();
void AddFields( ScDocument* pSrcDoc, SCTAB nTab,
diff --git a/sc/source/core/tool/consoli.cxx b/sc/source/core/tool/consoli.cxx
index 3dbe8f923fc1..71792e6462c1 100644
--- a/sc/source/core/tool/consoli.cxx
+++ b/sc/source/core/tool/consoli.cxx
@@ -159,11 +159,8 @@ void ScConsData::DeleteData()
#undef DELETEARR
#undef DELETESTR
-void ScConsData::InitData( sal_Bool bDelete )
+void ScConsData::InitData()
{
- if (bDelete)
- DeleteData();
-
if (bReference && nColCount && !ppRefs)
{
ppRefs = new ScReferenceList*[nColCount];
@@ -185,11 +182,11 @@ void ScConsData::InitData( sal_Bool bDelete )
if (nColCount && !ppUsed)
{
- ppUsed = new sal_Bool*[nColCount];
+ ppUsed = new bool*[nColCount];
for (SCSIZE i=0; i<nColCount; i++)
{
- ppUsed[i] = new sal_Bool[nRowCount];
- memset( ppUsed[i], 0, nRowCount * sizeof(sal_Bool) );
+ ppUsed[i] = new bool[nRowCount];
+ memset( ppUsed[i], 0, nRowCount * sizeof(bool) );
}
}
@@ -208,7 +205,7 @@ void ScConsData::InitData( sal_Bool bDelete )
void ScConsData::DoneFields()
{
- InitData(false);
+ InitData();
}
void ScConsData::SetSize( SCCOL nCols, SCROW nRows )
@@ -224,7 +221,7 @@ void ScConsData::GetSize( SCCOL& rCols, SCROW& rRows ) const
rRows = static_cast<SCROW>(nRowCount);
}
-void ScConsData::SetFlags( ScSubTotalFunc eFunc, sal_Bool bColName, sal_Bool bRowName, sal_Bool bRef )
+void ScConsData::SetFlags( ScSubTotalFunc eFunc, bool bColName, bool bRowName, bool bRef )
{
DeleteData();
bReference = bRef;
@@ -304,7 +301,7 @@ void ScConsData::AddName( const OUString& rName )
{
if (!ppUsed[nArrX][nArrY])
{
- ppUsed[nArrX][nArrY] = sal_True;
+ ppUsed[nArrX][nArrY] = true;
ppRefs[nArrX][nArrY].Init();
}
ppRefs[nArrX][nArrY].SetFullSize(nMax);
@@ -504,7 +501,7 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab,
else
{
aCornerText = aThisCorner;
- bCornerUsed = sal_True;
+ bCornerUsed = true;
}
}
@@ -585,7 +582,7 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab,
ppRefs[nArrX][nArrY].AddEntry( nCol, nRow, nTab );
else
{
- ppUsed[nArrX][nArrY] = sal_True;
+ ppUsed[nArrX][nArrY] = true;
ppRefs[nArrX][nArrY].Init();
ppRefs[nArrX][nArrY].AddEntry( nCol, nRow, nTab );
}
@@ -600,7 +597,7 @@ void ScConsData::AddData( ScDocument* pSrcDoc, SCTAB nTab,
nVal);
else
{
- ppUsed[nArrX][nArrY] = sal_True;
+ ppUsed[nArrX][nArrY] = true;
lcl_InitArray( eFunction, ppCount[nArrX][nArrY],
ppSum[nArrX][nArrY],
ppSumSqr[nArrX][nArrY], nVal );