Need help with ScLookupCache

Winfried Donkers winfried.libreoffice at gmail.com
Tue Jun 21 13:12:10 UTC 2022


>> Am I correct when stating that ScLookupCache currently cannot cope with the
>> combinations
>>   eOp SC_GREATER_EQUAL and sorted in ascending order
>> and
>>   eOp SC_LESSER_EQUAL and sorted in descending order?
> 
> As Luboš already said, ScLookupCache just caches results of lookups, to
> be able to reuse them for same lookups with further columns. Using the
> same for example SC_GREATER_EQUAL operator with different ascending or
> descending sort orders should however invalidate the cache for that
> position, so you'll probably also need to take the sort order into
> account in ScLookupCache::QueryCriteria and ScLookupCache::QueryKey.
> 
> That could be accomplished without adding an extra field if the
> ScLookupCache::QueryOp simply would have different values for
> SC_GREATER_EQUAL ascending or descending, similar for SC_LESS_EQUAL; so
> just add them and map accordingly in the
> ScLookupCache::QueryCriteria::QueryCriteria() ctor. You'll probably need
> to add some flag to ScQueryEntry anyway.
> 

Ah, I see, I can get on with that, thank you,

Winfried


More information about the LibreOffice mailing list