diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-11-10 15:45:53 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-11-10 15:45:53 -0500 |
commit | eaea417bfdf8d06df2b7f2e42c904c32ce77e871 (patch) | |
tree | eeb4801aa8c1b7cb76a63aba502e7a48162d7331 /sc | |
parent | e67181c0f1edf99b595c4589a668150719642811 (diff) |
Removing the mixed comparison flag, which is no longer needed.
This flag was introduced years ago to deal with Excel's behavior on
incorrectly sorted data range. But later versions of Excel no longer
follow that behavior & keeping this flag would make the evaluation
code unnecessarily more complex & hard to adopt to multi-item matching.
Diffstat (limited to 'sc')
-rw-r--r-- | sc/inc/queryparam.hxx | 1 | ||||
-rw-r--r-- | sc/source/core/data/dociter.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/table3.cxx | 17 | ||||
-rw-r--r-- | sc/source/core/tool/doubleref.cxx | 1 | ||||
-rw-r--r-- | sc/source/core/tool/interpr1.cxx | 3 | ||||
-rw-r--r-- | sc/source/core/tool/queryparam.cxx | 6 |
6 files changed, 2 insertions, 30 deletions
diff --git a/sc/inc/queryparam.hxx b/sc/inc/queryparam.hxx index d04f7b4a4f21..49fa2bceaabd 100644 --- a/sc/inc/queryparam.hxx +++ b/sc/inc/queryparam.hxx @@ -45,7 +45,6 @@ struct ScQueryParamBase bool bCaseSens; bool bRegExp; bool bDuplicate; - bool bMixedComparison; // whether numbers are smaller than strings virtual ~ScQueryParamBase(); diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx index 5efe0163e384..689e68e2e6b4 100644 --- a/sc/source/core/data/dociter.cxx +++ b/sc/source/core/data/dociter.cxx @@ -865,10 +865,6 @@ bool ScDBQueryDataIterator::DataAccessMatrix::isValidQuery(SCROW nRow, const ScM } while (false); } - else if (mpParam->bMixedComparison) - { - // Not used at the moment. - } if (aResults.empty()) // First query entry. diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 16c4793d546d..453905549f10 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -1442,23 +1442,6 @@ bool ScTable::ValidQuery(SCROW nRow, const ScQueryParam& rParam, } } } - else if (rParam.bMixedComparison) - { - if (rItem.meType == ScQueryEntry::ByString && - (rEntry.eOp == SC_LESS || rEntry.eOp == SC_LESS_EQUAL) && - (pCell ? pCell->HasValueData() : - HasValueData( static_cast<SCCOL>(rEntry.nField), nRow))) - { - bOk = true; - } - else if (rItem.meType != ScQueryEntry::ByString && - (rEntry.eOp == SC_GREATER || rEntry.eOp == SC_GREATER_EQUAL) && - (pCell ? pCell->HasStringData() : - HasStringData( static_cast<SCCOL>(rEntry.nField), nRow))) - { - bOk = true; - } - } if (nPos == -1) { diff --git a/sc/source/core/tool/doubleref.cxx b/sc/source/core/tool/doubleref.cxx index 15e6d53c871b..a7414aa75de9 100644 --- a/sc/source/core/tool/doubleref.cxx +++ b/sc/source/core/tool/doubleref.cxx @@ -276,7 +276,6 @@ void ScDBRangeBase::fillQueryOptions(ScQueryParamBase* pParam) pParam->bCaseSens = false; pParam->bRegExp = false; pParam->bDuplicate = true; - pParam->bMixedComparison = false; } ScDocument* ScDBRangeBase::getDoc() const diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index a0a577ffacd9..bc33bf8ce137 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -4473,7 +4473,6 @@ void ScInterpreter::ScMatch() rParam.nRow1 = nRow1; rParam.nCol2 = nCol2; rParam.nTab = nTab1; - rParam.bMixedComparison = true; ScQueryEntry& rEntry = rParam.GetEntry(0); ScQueryEntry::Item& rItem = rEntry.GetQueryItem(); @@ -5805,7 +5804,6 @@ void ScInterpreter::ScLookup() aParam.nCol2 = bVertical ? nCol1 : nCol2; aParam.nRow2 = bVertical ? nRow2 : nRow1; aParam.bByRow = bVertical; - aParam.bMixedComparison = true; rEntry.bDoQuery = true; rEntry.eOp = SC_LESS_EQUAL; @@ -6026,7 +6024,6 @@ void ScInterpreter::CalculateLookup(bool HLookup) rParam.nRow2 = nRow2; rParam.nTab = nTab1; } - rParam.bMixedComparison = true; ScQueryEntry& rEntry = rParam.GetEntry(0); rEntry.bDoQuery = true; diff --git a/sc/source/core/tool/queryparam.cxx b/sc/source/core/tool/queryparam.cxx index 4012f13eaa73..a1df6a2404a5 100644 --- a/sc/source/core/tool/queryparam.cxx +++ b/sc/source/core/tool/queryparam.cxx @@ -48,7 +48,7 @@ ScQueryParamBase::ScQueryParamBase() ScQueryParamBase::ScQueryParamBase(const ScQueryParamBase& r) : bHasHeader(r.bHasHeader), bByRow(r.bByRow), bInplace(r.bInplace), bCaseSens(r.bCaseSens), - bRegExp(r.bRegExp), bDuplicate(r.bDuplicate), bMixedComparison(r.bMixedComparison), + bRegExp(r.bRegExp), bDuplicate(r.bDuplicate), maEntries(r.maEntries) { } @@ -226,7 +226,7 @@ void ScQueryParam::Clear() nCol1=nCol2 = 0; nRow1=nRow2 = 0; nTab = SCTAB_MAX; - bHasHeader = bCaseSens = bRegExp = bMixedComparison = false; + bHasHeader = bCaseSens = bRegExp = false; bInplace = bByRow = bDuplicate = sal_True; boost::ptr_vector<ScQueryEntry>::iterator itr = maEntries.begin(), itrEnd = maEntries.end(); @@ -260,7 +260,6 @@ ScQueryParam& ScQueryParam::operator=( const ScQueryParam& r ) bInplace = r.bInplace; bCaseSens = r.bCaseSens; bRegExp = r.bRegExp; - bMixedComparison = r.bMixedComparison; bDuplicate = r.bDuplicate; bByRow = r.bByRow; bDestPers = r.bDestPers; @@ -297,7 +296,6 @@ bool ScQueryParam::operator==( const ScQueryParam& rOther ) const && (bInplace == rOther.bInplace) && (bCaseSens == rOther.bCaseSens) && (bRegExp == rOther.bRegExp) - && (bMixedComparison == rOther.bMixedComparison) && (bDuplicate == rOther.bDuplicate) && (bDestPers == rOther.bDestPers) && (nDestTab == rOther.nDestTab) |