Kaydet (Commit) 6d29f0ab authored tarafından Kohei Yoshida's avatar Kohei Yoshida

Adjusted this to the latest code base to get it to apply...

Change-Id: I95cc141d4d13cf27fcf1e736862093837cc1e065
üst 5bf2a07f
...@@ -967,24 +967,27 @@ double ScInterpreter::CompareFunc( const ScCompare& rComp, ScCompareOptions* pOp ...@@ -967,24 +967,27 @@ double ScInterpreter::CompareFunc( const ScCompare& rComp, ScCompareOptions* pOp
fRes = (double) ScGlobal::GetCaseCollator()->compareString( fRes = (double) ScGlobal::GetCaseCollator()->compareString(
*rComp.pVal[ 0 ], *rComp.pVal[ 1 ] ); *rComp.pVal[ 0 ], *rComp.pVal[ 1 ] );
} }
#ifdef FIXME_REMOVE_WHEN_RE_BASE_COMPLETE
if (nStringQuery && pOptions) if (nStringQuery && pOptions)
{ {
const ScQueryEntry& rEntry = pOptions->aQueryEntry; const ScQueryEntry& rEntry = pOptions->aQueryEntry;
if (!rEntry.bQueryByString && rEntry.pStr->Len() && const ScQueryEntry::QueryItemsType& rItems = rEntry.GetQueryItems();
(rEntry.eOp == SC_EQUAL || rEntry.eOp == SC_NOT_EQUAL)) if (!rItems.empty())
{ {
// As in ScTable::ValidQuery() match a numeric string for a const ScQueryEntry::Item& rItem = rItems[0];
// number query that originated from a string, e.g. in SUMIF if (rItem.meType != ScQueryEntry::ByString && !rItem.maString.isEmpty() &&
// and COUNTIF. Transliteration is not needed here. (rEntry.eOp == SC_EQUAL || rEntry.eOp == SC_NOT_EQUAL))
bool bEqual = rComp.pVal[nStringQuery-1]->Equals( *rEntry.pStr); {
// match => fRes=0, else fRes=1 // As in ScTable::ValidQuery() match a numeric string for a
fRes = (rEntry.eOp == SC_NOT_EQUAL) ? bEqual : !bEqual; // number query that originated from a string, e.g. in SUMIF
// and COUNTIF. Transliteration is not needed here.
bool bEqual = rComp.pVal[nStringQuery-1]->Equals(rItem.maString);
// match => fRes=0, else fRes=1
fRes = (rEntry.eOp == SC_NOT_EQUAL) ? bEqual : !bEqual;
}
} }
} }
#else
(void)nStringQuery;
#endif
return fRes; return fRes;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment