LibreOffice Module sc (master) 1
Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
sc::ColumnSpanSet Class Reference

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
 
ColumnSpanSetoperator= (const ColumnSpanSet &)=delete
 
 ColumnSpanSet (ColumnSpanSet &&)=default
 
ColumnSpanSetoperator= (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

ColumnTypegetColumn (const ScDocument &rDoc, SCTAB nTab, SCCOL nCol)
 

Private Attributes

std::vector< TableTypemaTables
 

Detailed Description

Structure that stores segments of boolean flags per column, and perform custom action on those segments.

Definition at line 49 of file columnspanset.hxx.

Member Typedef Documentation

◆ ColumnSpansType

typedef mdds::flat_segment_tree<SCROW, bool> sc::ColumnSpanSet::ColumnSpansType

Definition at line 52 of file columnspanset.hxx.

◆ TableType

typedef std::vector<std::optional<ColumnType> > sc::ColumnSpanSet::TableType
private

Definition at line 64 of file columnspanset.hxx.

Constructor & Destructor Documentation

◆ ColumnSpanSet() [1/3]

sc::ColumnSpanSet::ColumnSpanSet ( )

Definition at line 64 of file columnspanset.cxx.

◆ ColumnSpanSet() [2/3]

sc::ColumnSpanSet::ColumnSpanSet ( const ColumnSpanSet )
delete

◆ ColumnSpanSet() [3/3]

sc::ColumnSpanSet::ColumnSpanSet ( ColumnSpanSet &&  )
default

◆ ~ColumnSpanSet()

sc::ColumnSpanSet::~ColumnSpanSet ( )

Definition at line 66 of file columnspanset.cxx.

Member Function Documentation

◆ executeAction()

void sc::ColumnSpanSet::executeAction ( ScDocument rDoc,
Action ac 
) const

◆ executeColumnAction()

void sc::ColumnSpanSet::executeColumnAction ( ScDocument rDoc,
ColumnAction ac 
) const

◆ getColumn()

ColumnSpanSet::ColumnType & sc::ColumnSpanSet::getColumn ( const ScDocument rDoc,
SCTAB  nTab,
SCCOL  nCol 
)
private

Definition at line 70 of file columnspanset.cxx.

References o3tl::make_unsigned(), maTables, and ScDocument::MaxRow().

Referenced by scan(), and set().

◆ operator=() [1/2]

ColumnSpanSet & sc::ColumnSpanSet::operator= ( ColumnSpanSet &&  )
default

◆ operator=() [2/2]

ColumnSpanSet & sc::ColumnSpanSet::operator= ( const ColumnSpanSet )
delete

◆ scan()

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().

◆ set() [1/4]

void sc::ColumnSpanSet::set ( const ScDocument rDoc,
const ScRange rRange,
bool  bVal 
)

◆ set() [2/4]

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().

◆ set() [3/4]

void sc::ColumnSpanSet::set ( const ScDocument rDoc,
SCTAB  nTab,
SCCOL  nCol,
SCROW  nRow,
bool  bVal 
)

◆ set() [4/4]

void sc::ColumnSpanSet::set ( const ScDocument rDoc,
SCTAB  nTab,
SCCOL  nCol,
SCROW  nRow1,
SCROW  nRow2,
bool  bVal 
)

Member Data Documentation

◆ maTables

std::vector<TableType> sc::ColumnSpanSet::maTables
private

Definition at line 66 of file columnspanset.hxx.

Referenced by executeAction(), executeColumnAction(), and getColumn().


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