27#include <unordered_set>
30#include <mdds/flat_segment_tree.hpp>
117 bool isRowActive(sal_Int32 nRow, sal_Int32* pLastRow =
nullptr)
const;
122 const std::unordered_set<sal_Int32>& rRepeatIfEmptyDims);
139 void filterTable(
const std::vector<Criterion>& rCriteria,
140 css::uno::Sequence<css::uno::Sequence<css::uno::Any>>& rTabData,
141 const std::unordered_set<sal_Int32>& rRepeatIfEmptyDims);
160 bool isRowQualified(sal_Int32 nRow, const ::std::vector<Criterion>& rCriteria,
161 const std::unordered_set<sal_Int32>& rRepeatIfEmptyDims)
const;
This class represents the cached data part of the datapilot cache table implementation.
interface class used for filtering of rows.
virtual std::vector< ScDPItemData > getMatchValues() const =0
virtual bool match(const ScDPItemData &rCellData) const =0
returns true if the matching condition is met for a single cell value, or false otherwise.
multi-item (group) filter.
virtual std::vector< ScDPItemData > getMatchValues() const override
::std::vector< ScDPItemData > maItems
void addMatchItem(const ScDPItemData &rItem)
virtual bool match(const ScDPItemData &rCellData) const override
returns true if the matching condition is met for a single cell value, or false otherwise.
size_t getMatchItemCount() const
ordinary single-item filter.
virtual bool match(const ScDPItemData &rCellData) const override
returns true if the matching condition is met for a single cell value, or false otherwise.
virtual std::vector< ScDPItemData > getMatchValues() const override
SingleFilter(const ScDPItemData &rItem)
This class is only a wrapper to the actual cache, to provide filtering on the raw data based on the q...
sal_Int32 getColSize() const
void filterTable(const std::vector< Criterion > &rCriteria, css::uno::Sequence< css::uno::Sequence< css::uno::Any > > &rTabData, const std::unordered_set< sal_Int32 > &rRepeatIfEmptyDims)
Filter the table based on the specified criteria, and copy the result to rTabData.
RowFlagType maShowByFilter
Rows visible by standard filter query.
ScDPFilteredCache(const ScDPFilteredCache &)=delete
mdds::flat_segment_tree< SCROW, bool > RowFlagType
const ScDPItemData * getCell(SCCOL nCol, SCROW nRow, bool bRepeatIfEmpty) const
Get the cell instance at specified location within the data grid.
bool isRowQualified(sal_Int32 nRow, const ::std::vector< Criterion > &rCriteria, const std::unordered_set< sal_Int32 > &rRepeatIfEmptyDims) const
Check if a given row meets all specified criteria.
RowFlagType maShowByPage
Rows visible by page dimension filtering.
ScDPFilteredCache(const ScDPCache &rCache)
void filterByPageDimension(const std::vector< Criterion > &rCriteria, const std::unordered_set< sal_Int32 > &rRepeatIfEmptyDims)
Set filter on/off flag to each row to control visibility.
sal_Int32 getRowSize() const
OUString getFieldName(SCCOL nIndex) const
static void dumpRowFlag(const RowFlagType &rFlag)
const ScDPCache & mrCache
const ::std::vector< SCROW > & getFieldEntries(sal_Int32 nColumn) const
Get the unique entries for a field specified by index.
void getValue(ScDPValue &rVal, SCCOL nCol, SCROW nRow) const
bool isRowActive(sal_Int32 nRow, sal_Int32 *pLastRow=nullptr) const
Check whether a specified row is active or not.
::std::vector<::std::vector< SCROW > > maFieldEntries
unique field entries for each field (column).
const ScDPCache & getCache() const
When assigning a string value, you can also assign an interned string whose life-cycle is managed by ...
single filtering criterion.
std::shared_ptr< FilterBase > mpFilter