LibreOffice Module sc (master) 1
Public Member Functions | Private Types | Private Member Functions | List of all members
ScQueryCellIterator< accessType > Class Template Reference

#include <queryiter.hxx>

Inheritance diagram for ScQueryCellIterator< accessType >:
[legend]
Collaboration diagram for ScQueryCellIterator< accessType >:
[legend]

Public Member Functions

 ScQueryCellIterator (ScDocument &rDocument, ScInterpreterContext &rContext, SCTAB nTable, const ScQueryParam &aParam, bool bMod)
 
bool GetFirst ()
 
bool GetNext ()
 
SCCOL GetCol () const
 
SCROW GetRow () const
 
bool FindEqualOrSortedLastInRange (SCCOL &nFoundCol, SCROW &nFoundRow)
 In a range assumed to be sorted find either the last of a sequence of equal entries or the last being less than (or greater than) the queried value. More...
 
- Public Member Functions inherited from ScQueryCellIteratorBase< accessType, ScQueryCellIteratorType::Generic >
 ScQueryCellIteratorBase (ScDocument &rDocument, ScInterpreterContext &rContext, SCTAB nTable, const ScQueryParam &aParam, bool bMod)
 
void SetAdvanceQueryParamEntryField (bool bVal)
 
void AdvanceQueryParamEntryField ()
 

Private Types

typedef ScQueryCellIteratorBase< accessType, ScQueryCellIteratorType::GenericBase
 

Private Member Functions

bool GetThis ()
 

Additional Inherited Members

- Protected Types inherited from ScQueryCellIteratorBase< accessType, ScQueryCellIteratorType::Generic >
enum  StopOnMismatchBits
 
enum  TestEqualConditionBits
 
- Protected Member Functions inherited from ScQueryCellIteratorBase< accessType, ScQueryCellIteratorType::Generic >
void InitPos ()
 
void PerformQuery ()
 
bool BinarySearch (SCCOL col, bool forEqual=false)
 
void SetStopOnMismatch (bool bVal)
 If set, iterator stops on first non-matching cell content. More...
 
bool StoppedOnMismatch () const
 
void SetTestEqualCondition (bool bVal)
 If set, an additional test for SC_EQUAL condition is executed in ScTable::ValidQuery() if SC_LESS_EQUAL or SC_GREATER_EQUAL conditions are to be tested. More...
 
bool IsEqualConditionFulfilled () const
 
- Protected Member Functions inherited from ScQueryCellIteratorTypeSpecific< queryType >
bool HandleItemFound ()
 
- Protected Attributes inherited from ScQueryCellIteratorBase< accessType, ScQueryCellIteratorType::Generic >
sal_uInt8 nStopOnMismatch
 
sal_uInt8 nTestEqualCondition
 
bool bAdvanceQuery
 
bool bIgnoreMismatchOnLeadingStrings
 

Detailed Description

template<ScQueryCellIteratorAccess accessType>
class ScQueryCellIterator< accessType >

Definition at line 254 of file queryiter.hxx.

Member Typedef Documentation

◆ Base

template<ScQueryCellIteratorAccess accessType>
typedef ScQueryCellIteratorBase< accessType, ScQueryCellIteratorType::Generic > ScQueryCellIterator< accessType >::Base
private

Definition at line 257 of file queryiter.hxx.

Constructor & Destructor Documentation

◆ ScQueryCellIterator()

template<ScQueryCellIteratorAccess accessType>
ScQueryCellIterator< accessType >::ScQueryCellIterator ( ScDocument rDocument,
ScInterpreterContext rContext,
SCTAB  nTable,
const ScQueryParam aParam,
bool  bMod 
)
inline

Definition at line 286 of file queryiter.hxx.

Member Function Documentation

◆ FindEqualOrSortedLastInRange()

template<ScQueryCellIteratorAccess accessType>
bool ScQueryCellIterator< accessType >::FindEqualOrSortedLastInRange ( SCCOL nFoundCol,
SCROW nFoundRow 
)

In a range assumed to be sorted find either the last of a sequence of equal entries or the last being less than (or greater than) the queried value.

Used by the interpreter for [HV]?LOOKUP() and MATCH(). Column and row position of the found entry are returned, otherwise invalid.

The search does not stop when encountering a string and does not assume that no values follow anymore. If querying for a string a mismatch on the first entry, e.g. column header, is ignored.

@ATTENTION! StopOnMismatch, TestEqualCondition and the internal IgnoreMismatchOnLeadingStrings and query params are in an undefined state upon return! The iterator is not usable anymore except for obtaining the number format!

Definition at line 666 of file queryiter.cxx.

References ScQueryEntry::bDoQuery, ScQueryEntry::ByString, ScQueryEntry::ByValue, ScQueryEntry::eOp, ScQueryEntry::nField, utl::SearchParam::Normal, SC_EQUAL, SC_GREATER_EQUAL, and SC_LESS_EQUAL.

Referenced by ScInterpreter::CalculateLookup(), lcl_LookupQuery(), ScInterpreter::ScLookup(), and ScInterpreter::ScMatch().

◆ GetCol()

template<ScQueryCellIteratorAccess accessType>
SCCOL ScQueryCellIterator< accessType >::GetCol ( ) const
inline

◆ GetFirst()

template<ScQueryCellIteratorAccess accessType>
bool ScQueryCellIterator< accessType >::GetFirst

◆ GetNext()

template<ScQueryCellIteratorAccess accessType>
bool ScQueryCellIterator< accessType >::GetNext

◆ GetRow()

template<ScQueryCellIteratorAccess accessType>
SCROW ScQueryCellIterator< accessType >::GetRow ( ) const
inline

◆ GetThis()

template<ScQueryCellIteratorAccess accessType>
bool ScQueryCellIterator< accessType >::GetThis
private

Definition at line 1315 of file queryiter.cxx.


The documentation for this class was generated from the following files: