16#include <mdds/flat_segment_tree.hpp>
26struct ColumnBlockConstPosition;
27class SingleColumnSpanSet;
58 ColumnSpansType::const_iterator
miPos;
64 typedef std::vector<std::optional<ColumnType>>
TableType;
145 void getRows(std::vector<SCROW> &rRows)
const;
166 :
range( spanRange ) {}
todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across...
virtual void startColumn(SCTAB nTab, SCCOL nCol)
virtual void execute(const ScAddress &rPos, SCROW nLength, bool bVal)=0
virtual void execute(SCROW nRow1, SCROW nRow2, bool bVal)=0
virtual ~ColumnAction()=0
virtual void startColumn(ScColumn *pCol)=0
Structure that stores segments of boolean flags per column, and perform custom action on those segmen...
ColumnSpanSet & operator=(ColumnSpanSet &&)=default
mdds::flat_segment_tree< SCROW, bool > ColumnSpansType
void scan(const ScDocument &rDoc, SCTAB nTab, SCCOL nCol1, SCROW nRow1, SCCOL nCol2, SCROW nRow2, bool bVal)
Scan specified range in a specified sheet and mark all non-empty cells with specified boolean value.
ColumnType & getColumn(const ScDocument &rDoc, SCTAB nTab, SCCOL nCol)
ColumnSpanSet(const ColumnSpanSet &)=delete
ColumnSpanSet(ColumnSpanSet &&)=default
std::vector< std::optional< ColumnType > > TableType
std::vector< TableType > maTables
ColumnSpanSet & operator=(const ColumnSpanSet &)=delete
void executeAction(ScDocument &rDoc, Action &ac) const
void executeColumnAction(ScDocument &rDoc, ColumnAction &ac) const
void set(const ScDocument &rDoc, SCTAB nTab, SCCOL nCol, SCROW nRow, bool bVal)
Optimized ColumnSpanSet version that operates on a single ScRange.
RangeColumnSpanSet(const ScRange &spanRange)
void executeColumnAction(ScDocument &rDoc, sc::ColumnSpanSet::ColumnAction &ac) const
Keep track of spans in a single column only.
void scan(const ScColumn &rColumn)
Scan an entire column and tag all non-empty cell positions.
ScSheetLimits const & mrSheetLimits
SingleColumnSpanSet(ScSheetLimits const &)
void swap(SingleColumnSpanSet &r)
std::vector< RowSpan > SpansType
void getSpans(SpansType &rSpans) const
void getRows(std::vector< SCROW > &rRows) const
bool empty() const
Whether there isn't any row tagged.
void set(SCROW nRow1, SCROW nRow2, bool bVal)
mdds::flat_segment_tree< SCROW, bool > ColumnSpansType
CAUTION! The following defines must be in the same namespace as the respective type.
ColumnType(SCROW nStart, SCROW nEnd, bool bInit)
ColumnSpansType::const_iterator miPos
RowSpan(SCROW nRow1, SCROW nRow2)
sal_Int32 SCCOLROW
a type capable of holding either SCCOL or SCROW