LibreOffice Module sc (master) 1
|
Structure that stores segments of boolean flags per column, and perform custom action on those segments. More...
#include <columnspanset.hxx>
Classes | |
class | Action |
class | ColumnAction |
struct | ColumnType |
Public Types | |
typedef mdds::flat_segment_tree< SCROW, bool > | ColumnSpansType |
Public Member Functions | |
ColumnSpanSet () | |
ColumnSpanSet (const ColumnSpanSet &)=delete | |
ColumnSpanSet & | operator= (const ColumnSpanSet &)=delete |
ColumnSpanSet (ColumnSpanSet &&)=default | |
ColumnSpanSet & | operator= (ColumnSpanSet &&)=default |
~ColumnSpanSet () | |
void | set (const ScDocument &rDoc, SCTAB nTab, SCCOL nCol, SCROW nRow, bool bVal) |
void | set (const ScDocument &rDoc, SCTAB nTab, SCCOL nCol, SCROW nRow1, SCROW nRow2, bool bVal) |
void | set (const ScDocument &rDoc, const ScRange &rRange, bool bVal) |
void | set (const ScDocument &rDoc, SCTAB nTab, SCCOL nCol, const SingleColumnSpanSet &rSingleSet, bool bVal) |
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. More... | |
void | executeAction (ScDocument &rDoc, Action &ac) const |
void | executeColumnAction (ScDocument &rDoc, ColumnAction &ac) const |
Private Types | |
typedef std::vector< std::optional< ColumnType > > | TableType |
Private Member Functions | |
ColumnType & | getColumn (const ScDocument &rDoc, SCTAB nTab, SCCOL nCol) |
Private Attributes | |
std::vector< TableType > | maTables |
Structure that stores segments of boolean flags per column, and perform custom action on those segments.
Definition at line 49 of file columnspanset.hxx.
typedef mdds::flat_segment_tree<SCROW, bool> sc::ColumnSpanSet::ColumnSpansType |
Definition at line 52 of file columnspanset.hxx.
|
private |
Definition at line 64 of file columnspanset.hxx.
sc::ColumnSpanSet::ColumnSpanSet | ( | ) |
Definition at line 64 of file columnspanset.cxx.
|
delete |
|
default |
sc::ColumnSpanSet::~ColumnSpanSet | ( | ) |
Definition at line 66 of file columnspanset.cxx.
void sc::ColumnSpanSet::executeAction | ( | ScDocument & | rDoc, |
Action & | ac | ||
) | const |
Definition at line 152 of file columnspanset.cxx.
References sc::ColumnSpanSet::Action::execute(), ScDocument::FetchTable(), ScTable::GetAllocatedColumnsCount(), sc::ColumnSpanSet::ColumnType::maSpans, maTables, and sc::ColumnSpanSet::Action::startColumn().
Referenced by ScDocument::GetRangeScriptType(), sc::EndListeningContext::purgeEmptyBroadcasters(), and sc::CopyFromClipContext::startListeningFormulas().
void sc::ColumnSpanSet::executeColumnAction | ( | ScDocument & | rDoc, |
ColumnAction & | ac | ||
) | const |
Definition at line 189 of file columnspanset.cxx.
References ScTable::aCol, sc::ColumnSpanSet::ColumnAction::execute(), ScDocument::FetchTable(), ScTable::GetAllocatedColumnsCount(), sc::ColumnSpanSet::ColumnType::maSpans, maTables, and sc::ColumnSpanSet::ColumnAction::startColumn().
Referenced by ScDocument::CopyFromClip(), ScDocument::CopyMultiRangeFromClip(), sc::FormulaGroupAreaListener::notifyBulkChange(), ScExternalRefManager::refreshSrcDocument(), and ScTable::SortReorderByRowRefUpdate().
|
private |
Definition at line 70 of file columnspanset.cxx.
References o3tl::make_unsigned(), maTables, and ScDocument::MaxRow().
|
default |
|
delete |
void sc::ColumnSpanSet::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.
Definition at line 123 of file columnspanset.cxx.
References ScTable::aCol, ScTable::ClampToAllocatedColumns(), ScDocument::FetchTable(), getColumn(), sc::ColumnSpanSet::ColumnType::maSpans, sc::ColumnSpanSet::ColumnType::miPos, sc::ParseBlock(), and ScDocument::ValidColRow().
Referenced by sc::DocFuncUtil::getNonEmptyCellSpans().
void sc::ColumnSpanSet::set | ( | const ScDocument & | rDoc, |
const ScRange & | rRange, | ||
bool | bVal | ||
) |
Definition at line 103 of file columnspanset.cxx.
References ScRange::aEnd, ScRange::aStart, ScAddress::Col(), getColumn(), sc::ColumnSpanSet::ColumnType::maSpans, sc::ColumnSpanSet::ColumnType::miPos, ScAddress::Row(), and ScAddress::Tab().
void sc::ColumnSpanSet::set | ( | const ScDocument & | rDoc, |
SCTAB | nTab, | ||
SCCOL | nCol, | ||
const SingleColumnSpanSet & | rSingleSet, | ||
bool | bVal | ||
) |
Definition at line 115 of file columnspanset.cxx.
References sc::SingleColumnSpanSet::getSpans(), and set().
void sc::ColumnSpanSet::set | ( | const ScDocument & | rDoc, |
SCTAB | nTab, | ||
SCCOL | nCol, | ||
SCROW | nRow, | ||
bool | bVal | ||
) |
Definition at line 85 of file columnspanset.cxx.
References getColumn(), sc::ColumnSpanSet::ColumnType::maSpans, sc::ColumnSpanSet::ColumnType::miPos, ScDocument::ValidCol(), ScDocument::ValidRow(), and ValidTab().
Referenced by sc::EndListeningContext::addEmptyBroadcasterPosition(), ScColumn::DeleteArea(), ScColumn::DeleteBeforeCopyFromClip(), ScDocument::GetRangeScriptType(), set(), sc::CopyFromClipContext::setListeningFormulaSpans(), and ScTable::SortReorderByRowRefUpdate().
void sc::ColumnSpanSet::set | ( | const ScDocument & | rDoc, |
SCTAB | nTab, | ||
SCCOL | nCol, | ||
SCROW | nRow1, | ||
SCROW | nRow2, | ||
bool | bVal | ||
) |
Definition at line 94 of file columnspanset.cxx.
References getColumn(), sc::ColumnSpanSet::ColumnType::maSpans, sc::ColumnSpanSet::ColumnType::miPos, ScDocument::ValidCol(), ScDocument::ValidRow(), and ValidTab().
|
private |
Definition at line 66 of file columnspanset.hxx.
Referenced by executeAction(), executeColumnAction(), and getColumn().