26#include <unordered_map>
97 mpStr =
new OUString( rStr);
120 const QueryCriteria & rCriteria,
123 SCROW lookup(
const QueryCriteria & rCriteria )
const;
132 const QueryCriteria & rCriteria,
134 const bool bAvailable );
173 return (
static_cast<size_t>(r.
mnTab) << 24) ^
174 (
static_cast<size_t>(r.
meOp) << 22) ^
175 static_cast<size_t>(r.
mnRow);
192 std::unordered_map< QueryKey, QueryCriteriaAndResult, QueryKey::Hash >
maQueryMap;
QueryCriteria & operator=(const QueryCriteria &r)=delete
bool operator==(const QueryCriteria &r) const
QueryOp getQueryOp() const
void setDouble(double fVal)
void setString(const OUString &rStr)
QueryCriteria(const ScQueryEntry &rEntry)
bool isEmptyStringQuery() const
Lookup cache for one range used with interpreter functions such as VLOOKUP and MATCH.
ScLookupCache & operator=(const ScLookupCache &)=delete
std::unordered_map< QueryKey, QueryCriteriaAndResult, QueryKey::Hash > maQueryMap
virtual void Notify(const SfxHint &rHint) override
Remove from document structure and delete (!) cache on modify hint.
bool insert(const ScAddress &rResultAddress, const QueryCriteria &rCriteria, const ScAddress &rQueryAddress, const bool bAvailable)
Insert query and result.
@ FOUND
Criteria not available in lookup range.
@ CRITERIA_DIFFERENT
Query not found in cache.
@ NOT_AVAILABLE
Different criteria for same query position exists.
ScLookupCache(ScDocument *pDoc, const ScRange &rRange, ScLookupCacheMap &cacheMap)
MUST be new'd because Notify() deletes.
Result lookup(ScAddress &o_rResultAddress, const QueryCriteria &rCriteria, const ScAddress &rQueryAddress) const
const ScRange & getRange() const
ScLookupCache(const ScLookupCache &)=delete
ScLookupCacheMap & mCacheMap
ScLookupCacheMap & getCacheMap() const
size_t hashStartColumn() const
Hash start column and start and end rows.
std::unordered_map< ScRange, std::unique_ptr< ScLookupCache >, ScLookupCache::Hash > aCacheMap
size_t operator()(const ScRange &rRange) const
QueryCriteriaAndResult(const QueryCriteria &rCriteria, const ScAddress &rAddress)
size_t operator()(const QueryKey &r) const
bool operator==(const QueryKey &r) const
QueryKey(const ScAddress &rAddress, const QueryOp eOp)
Each instance of this struct represents a single filtering criteria.