[Libreoffice-commits] core.git: sc/inc sc/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Sun Sep 13 13:17:02 UTC 2020
sc/inc/compare.hxx | 2 +-
sc/source/core/tool/compare.cxx | 4 ++--
sc/source/core/tool/interpr1.cxx | 6 +++---
3 files changed, 6 insertions(+), 6 deletions(-)
New commits:
commit d08ac694a60af612fe603e90eb60d25a1ce290c8
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Sep 12 16:29:03 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Sep 13 15:16:18 2020 +0200
CompareOptions pDoc arg is never null
Change-Id: I9b8822c5abef04cfeec7a80e82220f2638b77618
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102526
Tested-by: Caolán McNamara <caolanm at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/inc/compare.hxx b/sc/inc/compare.hxx
index bdd86c1cdf54..dbad76f6b985 100644
--- a/sc/inc/compare.hxx
+++ b/sc/inc/compare.hxx
@@ -55,7 +55,7 @@ struct CompareOptions
utl::SearchParam::SearchType eSearchType;
bool bMatchWholeCell;
- CompareOptions( const ScDocument* pDoc, const ScQueryEntry& rEntry, utl::SearchParam::SearchType eSrchTyp );
+ CompareOptions( const ScDocument& rDoc, const ScQueryEntry& rEntry, utl::SearchParam::SearchType eSrchTyp );
private:
CompareOptions( const CompareOptions & ) = delete;
CompareOptions& operator=( const CompareOptions & ) = delete;
diff --git a/sc/source/core/tool/compare.cxx b/sc/source/core/tool/compare.cxx
index 493c33c92d33..b3462e74ac23 100644
--- a/sc/source/core/tool/compare.cxx
+++ b/sc/source/core/tool/compare.cxx
@@ -35,10 +35,10 @@ Compare::Cell::Cell() :
Compare::Compare() :
meOp(SC_EQUAL), mbIgnoreCase(true) {}
-CompareOptions::CompareOptions( const ScDocument* pDoc, const ScQueryEntry& rEntry, utl::SearchParam::SearchType eSrchTyp ) :
+CompareOptions::CompareOptions( const ScDocument& rDoc, const ScQueryEntry& rEntry, utl::SearchParam::SearchType eSrchTyp ) :
aQueryEntry(rEntry),
eSearchType(eSrchTyp),
- bMatchWholeCell(pDoc->GetDocOptions().IsMatchWholeCell())
+ bMatchWholeCell(rDoc.GetDocOptions().IsMatchWholeCell())
{
// Wildcard and Regex search work only with equal or not equal.
if (eSearchType != utl::SearchParam::SearchType::Normal &&
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 4a3f1cbfb60b..f52475378abf 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -5487,7 +5487,7 @@ void ScInterpreter::IterateParametersIf( ScIterFuncIf eFunc )
if (pQueryMatrix)
{
// Never case-sensitive.
- sc::CompareOptions aOptions( &mrDoc, rEntry, rParam.eSearchType);
+ sc::CompareOptions aOptions( mrDoc, rEntry, rParam.eSearchType);
ScMatrixRef pResultMatrix = QueryMat( pQueryMatrix, aOptions);
if (nGlobalError != FormulaError::NONE || !pResultMatrix)
{
@@ -5797,7 +5797,7 @@ void ScInterpreter::ScCountIf()
if (pQueryMatrix)
{
// Never case-sensitive.
- sc::CompareOptions aOptions( &mrDoc, rEntry, rParam.eSearchType);
+ sc::CompareOptions aOptions( mrDoc, rEntry, rParam.eSearchType);
ScMatrixRef pResultMatrix = QueryMat( pQueryMatrix, aOptions);
if (nGlobalError != FormulaError::NONE || !pResultMatrix)
{
@@ -6144,7 +6144,7 @@ void ScInterpreter::IterateParametersIfs( double(*ResultFunc)( const sc::ParamIf
if (pQueryMatrix)
{
// Never case-sensitive.
- sc::CompareOptions aOptions(&mrDoc, rEntry, rParam.eSearchType);
+ sc::CompareOptions aOptions(mrDoc, rEntry, rParam.eSearchType);
ScMatrixRef pResultMatrix = QueryMat( pQueryMatrix, aOptions);
if (nGlobalError != FormulaError::NONE || !pResultMatrix)
{
More information about the Libreoffice-commits
mailing list