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
 
const ColumnSpanSetoperator= (const ColumnSpanSet &)=delete
 
 ~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 (Action &ac) const
 
void executeColumnAction (ScDocument &rDoc, ColumnAction &ac) const
 

Private Types

typedef std::vector< std::unique_ptr< ColumnType > > TableType
 

Private Member Functions

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

Private Attributes

std::vector< std::unique_ptr< TableType > > maTables
 

Detailed Description

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

Definition at line 48 of file columnspanset.hxx.

Member Typedef Documentation

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

Definition at line 51 of file columnspanset.hxx.

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

Definition at line 62 of file columnspanset.hxx.

Constructor & Destructor Documentation

sc::ColumnSpanSet::ColumnSpanSet ( )

Definition at line 61 of file columnspanset.cxx.

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

Definition at line 63 of file columnspanset.cxx.

Member Function Documentation

void sc::ColumnSpanSet::executeAction ( Action ac) const
void sc::ColumnSpanSet::executeColumnAction ( ScDocument rDoc,
ColumnAction ac 
) const
ColumnSpanSet::ColumnType & sc::ColumnSpanSet::getColumn ( const ScDocument rDoc,
SCTAB  nTab,
SCCOL  nCol 
)
private

Definition at line 67 of file columnspanset.cxx.

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

Referenced by scan(), and set().

const ColumnSpanSet& sc::ColumnSpanSet::operator= ( const ColumnSpanSet )
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::ParseBlock(), and ScDocument::ValidColRow().

Referenced by sc::DocFuncUtil::getNonEmptyCellSpans().

void sc::ColumnSpanSet::set ( const ScDocument rDoc,
SCTAB  nTab,
SCCOL  nCol,
SCROW  nRow,
bool  bVal 
)
void sc::ColumnSpanSet::set ( const ScDocument rDoc,
SCTAB  nTab,
SCCOL  nCol,
SCROW  nRow1,
SCROW  nRow2,
bool  bVal 
)
void sc::ColumnSpanSet::set ( const ScDocument rDoc,
const ScRange rRange,
bool  bVal 
)
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().

Member Data Documentation

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

Definition at line 64 of file columnspanset.hxx.

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


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