From 10ccf6acde86601beb2d95c5b094cecd41beea2a Mon Sep 17 00:00:00 2001 From: Kohei Yoshida Date: Thu, 17 Oct 2013 21:03:12 -0400 Subject: [PATCH] Reduce the number of arguments. The first argument can go now. Change-Id: Id2b9ca7b6e24edc0da4735c01798ab580fba910d --- sc/inc/compare.hxx | 5 ++++- sc/source/core/tool/compare.cxx | 7 ++----- sc/source/core/tool/interpr1.cxx | 4 ++-- sc/source/core/tool/scmatrix.cxx | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/sc/inc/compare.hxx b/sc/inc/compare.hxx index 9ee2992e95c3..b4e4a50b2a96 100644 --- a/sc/inc/compare.hxx +++ b/sc/inc/compare.hxx @@ -62,7 +62,10 @@ private: CompareOptions& operator=( const CompareOptions & ); }; -double CompareFunc( bool bIgnoreCase, const Compare& rComp, CompareOptions* pOptions = NULL ); +/** @param pOptions + NULL means case sensitivity document option is to be used! + */ +double CompareFunc( const Compare& rComp, CompareOptions* pOptions = NULL ); } 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