LibreOffice Module sc (master) 1
|
This is a rather odd datastructure. More...
#include <markarr.hxx>
Public Member Functions | |
ScMarkArray (const ScSheetLimits &rLimits) | |
ScMarkArray (ScMarkArray &&rArray) noexcept | |
ScMarkArray (const ScMarkArray &rArray) | |
void | Reset (bool bMarked=false, SCSIZE nNeeded=1) |
bool | GetMark (SCROW nRow) const |
void | SetMarkArea (SCROW nStartRow, SCROW nEndRow, bool bMarked) |
void | Set (std::vector< ScMarkEntry > &&) |
optimised init-from-range-list. More... | |
bool | IsAllMarked (SCROW nStartRow, SCROW nEndRow) const |
bool | HasOneMark (SCROW &rStartRow, SCROW &rEndRow) const |
bool | HasMarks () const |
ScMarkArray & | operator= (ScMarkArray const &rSource) |
ScMarkArray & | operator= (ScMarkArray &&rSource) noexcept |
bool | operator== (ScMarkArray const &rOther) const |
bool | Search (SCROW nRow, SCSIZE &nIndex) const |
SCROW | GetNextMarked (SCROW nRow, bool bUp) const |
Including current row, may return -1 if bUp and not found. More... | |
SCROW | GetMarkEnd (SCROW nRow, bool bUp) const |
void | Shift (SCROW nStartRow, tools::Long nOffset) |
void | Intersect (const ScMarkArray &rOther) |
Private Attributes | |
const ScSheetLimits & | mrSheetLimits |
std::vector< ScMarkEntry > | mvData |
Friends | |
class | ScMarkArrayIter |
class | ScDocument |
This is a rather odd datastructure.
We store alternating marked/not-marked entries, and for each entry the range is defined as : [previousEntry.nRow+1, currentEntry.nRow]
Definition at line 43 of file markarr.hxx.
ScMarkArray::ScMarkArray | ( | const ScSheetLimits & | rLimits | ) |
Definition at line 25 of file markarr.cxx.
References Reset().
|
noexcept |
Definition at line 32 of file markarr.cxx.
ScMarkArray::ScMarkArray | ( | const ScMarkArray & | rArray | ) |
Definition at line 39 of file markarr.cxx.
References operator=().
bool ScMarkArray::GetMark | ( | SCROW | nRow | ) | const |
Definition at line 91 of file markarr.cxx.
References i, mvData, and Search().
Referenced by ScMultiSel::GetMark(), ScMultiSel::IsRowMarked(), ScMultiSel::IsRowRangeMarked(), and ScMultiSel::SetMarkArea().
Definition at line 309 of file markarr.cxx.
References mvData, nIndex, and Search().
Referenced by ScTable::GetNextMarkedCell(), ScMultiSel::IsRowRangeMarked(), ScAttrArray::SearchStyleRange(), and ScMultiSel::SetMarkArea().
Including current row, may return -1 if bUp and not found.
Definition at line 286 of file markarr.cxx.
References mrSheetLimits, mvData, nIndex, Search(), and ScSheetLimits::ValidRow().
Referenced by ScMultiSel::GetNextMarked(), ScTable::GetNextMarkedCell(), ScAttrArray::SearchStyle(), and ScMultiSel::SetMarkArea().
|
inline |
Definition at line 62 of file markarr.hxx.
References mvData.
Referenced by ScMarkData::GetMarkedColSpans(), ScMultiSel::HasAnyMarks(), ScMultiSel::HasMarks(), ScMultiSel::IsAllMarked(), ScMultiSel::IsEmpty(), ScMultiSelIter::ScMultiSelIter(), and ScMultiSel::SetMarkArea().
Definition at line 231 of file markarr.cxx.
References ScSheetLimits::mnMaxRow, mrSheetLimits, and mvData.
Referenced by ScMultiSel::HasOneMark().
void ScMarkArray::Intersect | ( | const ScMarkArray & | rOther | ) |
Definition at line 351 of file markarr.cxx.
Definition at line 217 of file markarr.cxx.
References mvData, and Search().
Referenced by ScMultiSel::IsAllMarked().
|
noexcept |
Definition at line 280 of file markarr.cxx.
References mvData.
ScMarkArray & ScMarkArray::operator= | ( | ScMarkArray const & | rSource | ) |
bool ScMarkArray::operator== | ( | ScMarkArray const & | rOther | ) | const |
Definition at line 269 of file markarr.cxx.
References mvData.
void ScMarkArray::Reset | ( | bool | bMarked = false , |
SCSIZE | nNeeded = 1 |
||
) |
Definition at line 45 of file markarr.cxx.
References ScSheetLimits::mnMaxRow, mrSheetLimits, and mvData.
Referenced by ScMultiSel::Clear(), ScMarkArray(), and SetMarkArea().
Definition at line 58 of file markarr.cxx.
References i, mvData, and nIndex.
Referenced by ScDocument::FillInfo(), GetMark(), GetMarkEnd(), GetNextMarked(), IsAllMarked(), and SetMarkArea().
void ScMarkArray::Set | ( | std::vector< ScMarkEntry > && | rMarkEntries | ) |
optimised init-from-range-list.
Specifically this is optimised for cases where we have very large data columns with lots and lots of ranges.
Definition at line 212 of file markarr.cxx.
References mvData.
Definition at line 101 of file markarr.cxx.
References ScSheetLimits::GetMaxRowCount(), ScSheetLimits::mnMaxRow, mrSheetLimits, mvData, nIndex, Reset(), Search(), and ScSheetLimits::ValidRow().
Referenced by ScMultiSel::GetMarkArray(), ScMultiSel::Set(), and ScMultiSel::SetMarkArea().
void ScMarkArray::Shift | ( | SCROW | nStartRow, |
tools::Long | nOffset | ||
) |
Definition at line 328 of file markarr.cxx.
References i, ScSheetLimits::mnMaxRow, mrSheetLimits, and mvData.
Referenced by ScMultiSel::ShiftRows().
|
friend |
Definition at line 49 of file markarr.hxx.
|
friend |
Definition at line 48 of file markarr.hxx.
|
private |
Definition at line 45 of file markarr.hxx.
Referenced by GetNextMarked(), HasOneMark(), Reset(), SetMarkArea(), and Shift().
|
private |
Definition at line 46 of file markarr.hxx.
Referenced by ScDocument::FillInfo(), GetMark(), GetMarkEnd(), GetNextMarked(), HasOneMark(), Intersect(), IsAllMarked(), ScMarkArrayIter::Next(), operator=(), operator==(), Reset(), Search(), Set(), SetMarkArea(), and Shift().