summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2013-10-17 21:03:12 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2013-10-18 23:22:42 -0400
commit10ccf6acde86601beb2d95c5b094cecd41beea2a (patch)
tree0c67d28dfc67477568f6ca571eef9d81cd2cb112 /sc/source
parent60cc84c95364601190dd6c9d731d73c11dc83366 (diff)
Reduce the number of arguments. The first argument can go now.
Change-Id: Id2b9ca7b6e24edc0da4735c01798ab580fba910d
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/tool/compare.cxx7
-rw-r--r--sc/source/core/tool/interpr1.cxx4
-rw-r--r--sc/source/core/tool/scmatrix.cxx2
3 files changed, 5 insertions, 8 deletions
diff --git a/sc/source/core/tool/compare.cxx b/sc/source/core/tool/compare.cxx
index ece2ff209008..5f7dd1292e02 100644
--- a/sc/source/core/tool/compare.cxx
+++ b/sc/source/core/tool/compare.cxx
@@ -38,10 +38,7 @@ CompareOptions::CompareOptions( ScDocument* pDoc, const ScQueryEntry& rEntry, bo
// struct if needed.
}
-/** @param pOptions
- NULL means case sensitivity document option is to be used!
- */
-double CompareFunc( bool bIgnoreCase, const Compare& rComp, CompareOptions* pOptions )
+double CompareFunc( const Compare& rComp, CompareOptions* pOptions )
{
// Keep DoubleError if encountered
// #i40539# if bEmpty is set, bVal/nVal are uninitialized
@@ -165,7 +162,7 @@ double CompareFunc( bool bIgnoreCase, const Compare& rComp, CompareOptions* pOpt
fRes = (double) ScGlobal::GetCaseCollator()->compareString(
*rComp.pVal[ 0 ], *rComp.pVal[ 1 ] );
}
- else if (bIgnoreCase)
+ else if (rComp.mbIgnoreCase)
fRes = (double) ScGlobal::GetCollator()->compareString(
*rComp.pVal[ 0 ], *rComp.pVal[ 1 ] );
else
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 77bcb8ad2f1a..fddd8c3678e8 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -875,7 +875,7 @@ double ScInterpreter::Compare()
if( nGlobalError )
return 0;
nCurFmtType = nFuncFmtType = NUMBERFORMAT_LOGICAL;
- return sc::CompareFunc(pDok->GetDocOptions().IsIgnoreCase(), aComp);
+ return sc::CompareFunc(aComp);
}
@@ -976,7 +976,7 @@ sc::RangeMatrix ScInterpreter::CompareMat( sc::CompareOptions* pOptions )
aComp.bEmpty[i] = false;
}
}
- aRes.mpMat->PutDouble(sc::CompareFunc(pDok->GetDocOptions().IsIgnoreCase(), aComp, pOptions), j, k);
+ aRes.mpMat->PutDouble(sc::CompareFunc(aComp, pOptions), j, k);
}
else
aRes.mpMat->PutString(mrStrPool.intern(ScGlobal::GetRscString(STR_NO_VALUE)), j, k);
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 8b45f00f357b..fbf77cd1624c 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -1332,7 +1332,7 @@ class CompareMatrixFunc : std::unary_function<MatrixImplType::element_block_type
void compare()
{
- maResValues.push_back(sc::CompareFunc(mrComp.mbIgnoreCase, mrComp, mpOptions));
+ maResValues.push_back(sc::CompareFunc(mrComp, mpOptions));
}
public: