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) | |
~ScMarkArray () | |
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 > const &) |
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 44 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.
References operator=().
ScMarkArray::ScMarkArray | ( | const ScMarkArray & | rArray | ) |
Definition at line 39 of file markarr.cxx.
References operator=().
ScMarkArray::~ScMarkArray | ( | ) |
Definition at line 45 of file markarr.cxx.
bool ScMarkArray::GetMark | ( | SCROW | nRow | ) | const |
Definition at line 95 of file markarr.cxx.
References i, mvData, and Search().
Referenced by ScMultiSel::GetMark(), ScMultiSel::IsRowMarked(), ScMultiSel::IsRowRangeMarked(), and ScMultiSel::SetMarkArea().
Definition at line 313 of file markarr.cxx.
References assert(), mvData, nIndex, and Search().
Referenced by ScMultiSel::IsRowRangeMarked(), ScAttrArray::SearchStyleRange(), and ScMultiSel::SetMarkArea().
Including current row, may return -1 if bUp and not found.
Definition at line 290 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 64 of file markarr.hxx.
Referenced by ScMarkData::GetMarkedColSpans(), ScMultiSel::HasAnyMarks(), ScMultiSel::HasMarks(), ScMultiSel::IsAllMarked(), ScMultiSel::IsEmpty(), ScMultiSelIter::ScMultiSelIter(), and ScMultiSel::SetMarkArea().
Definition at line 235 of file markarr.cxx.
References ScSheetLimits::mnMaxRow, mrSheetLimits, and mvData.
Referenced by ScMultiSel::HasOneMark().
void ScMarkArray::Intersect | ( | const ScMarkArray & | rOther | ) |
Definition at line 355 of file markarr.cxx.
Definition at line 221 of file markarr.cxx.
References mvData, and Search().
Referenced by ScMultiSel::IsAllMarked().
ScMarkArray& ScMarkArray::operator= | ( | ScMarkArray const & | rSource | ) |
Referenced by ScMarkArray().
|
noexcept |
Definition at line 284 of file markarr.cxx.
References mvData.
bool ScMarkArray::operator== | ( | ScMarkArray const & | rOther | ) | const |
Definition at line 273 of file markarr.cxx.
References mvData.
Definition at line 49 of file markarr.cxx.
References assert(), ScSheetLimits::mnMaxRow, mrSheetLimits, and mvData.
Referenced by ScMultiSel::Clear(), ScMarkArray(), and SetMarkArea().
Definition at line 62 of file markarr.cxx.
References assert(), i, and mvData.
Referenced by GetMark(), GetMarkEnd(), GetNextMarked(), IsAllMarked(), and SetMarkArea().
void ScMarkArray::Set | ( | std::vector< ScMarkEntry > const & | ) |
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 216 of file markarr.cxx.
References mvData.
Definition at line 105 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 332 of file markarr.cxx.
References i, ScSheetLimits::mnMaxRow, mrSheetLimits, and mvData.
Referenced by ScMultiSel::ShiftRows().
|
friend |
Definition at line 50 of file markarr.hxx.
|
friend |
Definition at line 49 of file markarr.hxx.
|
private |
Definition at line 46 of file markarr.hxx.
Referenced by GetNextMarked(), HasOneMark(), Reset(), SetMarkArea(), and Shift().
|
private |
Definition at line 47 of file markarr.hxx.
Referenced by ScDocument::FillInfo(), GetMark(), GetMarkEnd(), GetNextMarked(), HasOneMark(), Intersect(), IsAllMarked(), ScMarkArrayIter::Next(), operator=(), operator==(), Reset(), Search(), Set(), SetMarkArea(), and Shift().