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

todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across more than one table again! More...

#include <markdata.hxx>

Collaboration diagram for ScMarkData:
[legend]

Public Types

typedef std::set< SCTABMarkedTabsType
 
typedef std::set< SCTAB >::iterator iterator
 
typedef std::set< SCTAB >::const_iterator const_iterator
 
typedef std::set< SCTAB >::const_reverse_iterator const_reverse_iterator
 

Public Member Functions

 ScMarkData (const ScSheetLimits &rSheetLimits)
 
 ScMarkData (const ScSheetLimits &rSheetLimits, const ScRangeList &rList)
 Optimise the case of constructing from a range list, speeds up import. More...
 
 ScMarkData (const ScMarkData &rData)=default
 
 ScMarkData (ScMarkData &&rData)=default
 
ScMarkDataoperator= (const ScMarkData &rData)
 
ScMarkDataoperator= (ScMarkData &&rData)
 
 ~ScMarkData ()
 
void ResetMark ()
 
void SetMarkArea (const ScRange &rRange)
 
void SetMultiMarkArea (const ScRange &rRange, bool bMark=true, bool bSetupMulti=false)
 
void MarkToMulti ()
 
void MarkToSimple ()
 
bool IsMarked () const
 
bool IsMultiMarked () const
 
void GetMarkArea (ScRange &rRange) const
 
void GetMultiMarkArea (ScRange &rRange) const
 
void SetAreaTab (SCTAB nTab)
 
void SelectTable (SCTAB nTab, bool bNew)
 
bool GetTableSelect (SCTAB nTab) const
 
void SelectOneTable (SCTAB nTab)
 
SCTAB GetSelectCount () const
 
SCTAB GetFirstSelected () const
 
SCTAB GetLastSelected () const
 
const MarkedTabsTypeGetSelectedTabs () const
 
void SetSelectedTabs (const MarkedTabsType &rTabs)
 
void SetMarkNegative (bool bFlag)
 
bool IsMarkNegative () const
 
void SetMarking (bool bFlag)
 
bool GetMarkingFlag () const
 
const ScMultiSelGetMultiSelData () const
 
ScMarkArray GetMarkArray (SCCOL nCol) const
 
bool IsCellMarked (SCCOL nCol, SCROW nRow, bool bNoSimple=false) const
 
void FillRangeListWithMarks (ScRangeList *pList, bool bClear, SCTAB nForTab=-1) const
 Create a range list of marks. More...
 
void ExtendRangeListTables (ScRangeList *pList) const
 
ScRangeList GetMarkedRanges () const
 
ScRangeList GetMarkedRangesForTab (SCTAB nTab) const
 Get marked ranges with sheet-tab set to nTab. More...
 
void MarkFromRangeList (const ScRangeList &rList, bool bReset)
 
std::vector< sc::ColRowSpanGetMarkedRowSpans () const
 
std::vector< sc::ColRowSpanGetMarkedColSpans () const
 
bool IsColumnMarked (SCCOL nCol) const
 
bool IsRowMarked (SCROW nRow) const
 
bool IsAllMarked (const ScRange &rRange) const
 
SCROW GetNextMarked (SCCOL nCol, SCROW nRow, bool bUp) const
 May return -1. More...
 
bool HasMultiMarks (SCCOL nCol) const
 
bool HasAnyMultiMarks () const
 
void InsertTab (SCTAB nTab)
 
void DeleteTab (SCTAB nTab)
 
void ShiftCols (const ScDocument *pDoc, SCCOL nStartCol, long nColOffset)
 
void ShiftRows (const ScDocument *pDoc, SCROW nStartRow, long nRowOffset)
 
void GetSelectionCover (ScRange &rRange)
 
const ScRangeListGetTopEnvelope () const
 
const ScRangeListGetBottomEnvelope () const
 
const ScRangeListGetLeftEnvelope () const
 
const ScRangeListGetRightEnvelope () const
 
iterator begin ()
 
iterator end ()
 
const_iterator begin () const
 
const_iterator end () const
 
const_reverse_iterator rbegin () const
 

Private Attributes

MarkedTabsType maTabMarked
 
ScRange aMarkRange
 
ScRange aMultiRange
 
ScMultiSel aMultiSel
 
ScRangeList aTopEnvelope
 
ScRangeList aBottomEnvelope
 
ScRangeList aLeftEnvelope
 
ScRangeList aRightEnvelope
 
const ScSheetLimitsmrSheetLimits
 
bool bMarked:1
 
bool bMultiMarked:1
 
bool bMarking:1
 
bool bMarkIsNeg:1
 

Detailed Description

todo: It should be possible to have MarkArrays for each table, in order to enable "search all" across more than one table again!

Definition at line 43 of file markdata.hxx.

Member Typedef Documentation

Definition at line 159 of file markdata.hxx.

Definition at line 160 of file markdata.hxx.

Definition at line 158 of file markdata.hxx.

Definition at line 46 of file markdata.hxx.

Constructor & Destructor Documentation

ScMarkData::ScMarkData ( const ScSheetLimits rSheetLimits)

Definition at line 38 of file markdata.cxx.

References ResetMark().

ScMarkData::ScMarkData ( const ScSheetLimits rSheetLimits,
const ScRangeList rList 
)

Optimise the case of constructing from a range list, speeds up import.

Definition at line 363 of file markdata.cxx.

References aMultiRange, aMultiSel, bMultiMarked, maTabMarked, ResetMark(), ScMultiSel::Set(), and SetMarkArea().

ScMarkData::ScMarkData ( const ScMarkData rData)
default
ScMarkData::ScMarkData ( ScMarkData &&  rData)
default
ScMarkData::~ScMarkData ( )

Definition at line 46 of file markdata.cxx.

Member Function Documentation

ScMarkData::iterator ScMarkData::begin ( )
ScMarkData::const_iterator ScMarkData::begin ( ) const

Definition at line 959 of file markdata.cxx.

References maTabMarked.

void ScMarkData::DeleteTab ( SCTAB  nTab)

Definition at line 638 of file markdata.cxx.

References maTabMarked.

ScMarkData::iterator ScMarkData::end ( )
ScMarkData::const_iterator ScMarkData::end ( ) const

Definition at line 964 of file markdata.cxx.

References maTabMarked.

void ScMarkData::ExtendRangeListTables ( ScRangeList pList) const
void ScMarkData::FillRangeListWithMarks ( ScRangeList pList,
bool  bClear,
SCTAB  nForTab = -1 
) const

Create a range list of marks.

Parameters
nForTabIf -1, use start-sheet-tab of the multi-area in ranges. If >= 0, use given sheet-tab in ranges.

Definition at line 387 of file markdata.cxx.

References ScRange::aEnd, aMarkRange, aMultiRange, aMultiSel, ScRange::aStart, bMarked, bMultiMarked, ScAddress::Col(), ScMultiSel::HasEqualRowsMarked(), ScMultiSel::HasMarks(), ScRangeList::Join(), ScMultiSelIter::Next(), ScRangeList::push_back(), ScRangeList::RemoveAll(), ScAddress::SetRow(), ScAddress::SetTab(), and ScAddress::Tab().

Referenced by ScDocument::ApplySelectionFrame(), ScHeaderControl::Command(), ScViewFunc::CopyToClip(), ScViewFunc::DeleteContents(), ScTable::DeleteSelection(), ScDocument::DeleteSelection(), ScDocument::DeleteSelectionTab(), ScViewFunc::DetectiveMarkPred(), ScViewFunc::DetectiveMarkSucc(), ScTabViewShell::DoAutoSum(), ScCellShell::ExecuteEdit(), FuInsertChart::FuInsertChart(), GetMarkedRanges(), GetMarkedRangesForTab(), ScViewData::GetMultiArea(), ScAccessibleSpreadsheet::getSelectedAccessibleChild(), ScAccessibleSpreadsheet::getSelectedAccessibleChildCount(), ScTabViewObj::getSelection(), ScDocument::GetSelectionFrame(), ScViewFunc::GetSelectionScriptType(), ScCellShell::GetState(), ScPrintAreasDlg::Impl_FillLists(), ScSpellDialogChildWindow::Init(), ScSpellDialogChildWindow::IsSelectionChanged(), ScTable::IsSelectionEditable(), ScTabView::MoveCursorAbs(), ScAccessibleSpreadsheet::Notify(), ScViewFunc::PasteFromClip(), ScCellRangesBase::queryEmptyCells(), ScCellRangesBase::queryVisibleCells(), ScCellRangesObj::removeByName(), ScCellRangesObj::removeRangeAddress(), ScCondFormatDlg::ScCondFormatDlg(), ScTable::SearchAndReplaceEmptyCells(), ScTransferObj::SetDragSource(), and ScViewData::WriteExtOptions().

const ScRangeList& ScMarkData::GetBottomEnvelope ( ) const
inline

Definition at line 153 of file markdata.hxx.

SCTAB ScMarkData::GetFirstSelected ( ) const
SCTAB ScMarkData::GetLastSelected ( ) const
const ScRangeList& ScMarkData::GetLeftEnvelope ( ) const
inline

Definition at line 154 of file markdata.hxx.

void ScMarkData::GetMarkArea ( ScRange rRange) const
ScMarkArray ScMarkData::GetMarkArray ( SCCOL  nCol) const
std::vector< sc::ColRowSpan > ScMarkData::GetMarkedColSpans ( ) const
ScRangeList ScMarkData::GetMarkedRanges ( ) const
ScRangeList ScMarkData::GetMarkedRangesForTab ( SCTAB  nTab) const

Get marked ranges with sheet-tab set to nTab.

Marks are stored for the currently active sheet respectively the multi-area start-sheet-tab, update ranges with the sheet for which this is called.

Definition at line 472 of file markdata.cxx.

References FillRangeListWithMarks().

Referenced by ScGridWindow::dumpCellProperties(), sc::SingleColumnSpanSet::scan(), and ScTable::UpdateSelectionFunction().

std::vector< sc::ColRowSpan > ScMarkData::GetMarkedRowSpans ( ) const
bool ScMarkData::GetMarkingFlag ( ) const
inline

Definition at line 104 of file markdata.hxx.

Referenced by ScTabView::DoneBlockMode(), and ScTabView::PaintBlock().

void ScMarkData::GetMultiMarkArea ( ScRange rRange) const
const ScMultiSel& ScMarkData::GetMultiSelData ( ) const
inline
SCROW ScMarkData::GetNextMarked ( SCCOL  nCol,
SCROW  nRow,
bool  bUp 
) const

May return -1.

Definition at line 601 of file markdata.cxx.

References aMultiSel, bMultiMarked, and ScMultiSel::GetNextMarked().

Referenced by ScTable::GetNextPos(), ScColumn::GetNextSpellingCell(), and ScTable::SkipRow().

const ScRangeList& ScMarkData::GetRightEnvelope ( ) const
inline

Definition at line 155 of file markdata.hxx.

SCTAB ScMarkData::GetSelectCount ( ) const
const MarkedTabsType& ScMarkData::GetSelectedTabs ( ) const
inline
void ScMarkData::GetSelectionCover ( ScRange rRange)
bool ScMarkData::GetTableSelect ( SCTAB  nTab) const
const ScRangeList& ScMarkData::GetTopEnvelope ( ) const
inline

Definition at line 152 of file markdata.hxx.

bool ScMarkData::HasAnyMultiMarks ( ) const

Definition at line 617 of file markdata.cxx.

References aMultiSel, bMultiMarked, and ScMultiSel::HasAnyMarks().

Referenced by MarkToMulti().

bool ScMarkData::HasMultiMarks ( SCCOL  nCol) const

Definition at line 609 of file markdata.cxx.

References aMultiSel, bMultiMarked, and ScMultiSel::HasMarks().

Referenced by ScTable::GetSelectionStyle().

void ScMarkData::InsertTab ( SCTAB  nTab)

Definition at line 625 of file markdata.cxx.

References maTabMarked.

bool ScMarkData::IsAllMarked ( const ScRange rRange) const
bool ScMarkData::IsCellMarked ( SCCOL  nCol,
SCROW  nRow,
bool  bNoSimple = false 
) const
bool ScMarkData::IsColumnMarked ( SCCOL  nCol) const
bool ScMarkData::IsMarked ( ) const
inline

Definition at line 82 of file markdata.hxx.

Referenced by ScViewFunc::ApplyPatternLines(), ScDocument::ApplySelectionPattern(), ScDocument::ApplySelectionStyle(), ScViewFunctionSet::BeginDrag(), ScTabView::CalcZoom(), ScTabView::CheckSelectionTransfer(), ScColumn::ClearSelectionItems(), ScCellRangesBase::computeFunction(), ScSelectionTransferObj::CreateFromView(), ScTabViewShell::CreateRefDialogController(), ScDocument::CreateSelectionPattern(), ScViewFunc::CutToClip(), ScDocFunc::DeleteContents(), ScViewFunc::DeleteContents(), ScViewFunc::DetectiveMarkPred(), ScViewFunc::DetectiveMarkSucc(), ScTabViewShell::DoAutoSum(), ScViewFunc::DoRefConversion(), ScGridWindow::dumpCellProperties(), ScViewFunc::EnterMatrix(), ScCellShell::Execute(), ScTabViewShell::Execute(), ScCellShell::ExecuteDataPilotDialog(), ScCellShell::ExecuteEdit(), ScCellShell::ExecuteExternalSource(), ScModelObj::FillRenderMarkData(), ScViewFunc::FillTab(), ScTabView::FindNextUnprot(), FuInsertChart::FuInsertChart(), ScDBFunc::GetAnonymousDBData(), ScCellShell::GetCellState(), ScFormatShell::GetCurrentNumberFormatType(), ScDBFunc::GetDBData(), ScTabViewShell::GetFunction(), ScTable::GetNextPos(), ScColumn::GetOptimalColWidth(), ScTabViewObj::getSelection(), ScViewFunc::GetSelectionFrame(), ScDocument::GetSelectionFrame(), ScViewFunc::GetSelectionPattern(), ScViewFunc::GetSelectionScriptType(), ScDocument::GetSelectionStyle(), ScViewData::GetSimpleArea(), ScCellShell::GetState(), ScTabViewShell::GetState(), ScViewFunc::GetStyleSheetFromMarked(), ScPrintFuncCache::InitLocations(), ScTabView::InitOwnBlockMode(), lcl_GetTextToColumnsRange(), ScTabView::MarkColumns(), ScTabView::MarkCursor(), ScTabView::MarkRows(), ScViewFunc::MergeCells(), ScGridWindow::MouseButtonUp(), ScTabView::MoveCursorAbs(), ScTabView::MoveCursorEnter(), ScAccessibleSpreadsheet::Notify(), ScTabView::PaintBlock(), ScViewFunc::PasteFromClip(), ScPrintFuncCache::ScPrintFuncCache(), ScUndoDeleteContents::ScUndoDeleteContents(), ScViewFunc::SearchAndReplace(), ScTable::SearchAndReplaceEmptyCells(), ScTabView::SelectAll(), ScViewFunc::SelectionEditable(), ScViewFunctionSet::SetAnchor(), ScViewFunctionSet::SetCursorAtCell(), ScInputHandler::StartTable(), ScViewFunc::TestMergeCells(), ScViewFunc::TransliterateText(), ScTabView::Unmark(), and ScTable::UpdateSelectionFunction().

bool ScMarkData::IsMarkNegative ( ) const
inline

Definition at line 102 of file markdata.hxx.

Referenced by ScTabView::MarkCursor().

bool ScMarkData::IsMultiMarked ( ) const
inline

Definition at line 83 of file markdata.hxx.

Referenced by ScDocFunc::ApplyAttributes(), ScViewFunc::ApplyPatternLines(), ScColumn::ApplySelectionCache(), ScColumn::ApplySelectionLineStyle(), ScDocument::ApplySelectionPattern(), ScColumn::ApplySelectionStyle(), ScDocument::ApplySelectionStyle(), ScDocFunc::ApplyStyle(), ScViewFunctionSet::BeginDrag(), ScTabView::CalcZoom(), ScViewFunc::ChangeIndent(), ScColumn::ChangeSelectionIndent(), ScColumn::ClearSelectionItems(), ScColumn::CopyToColumn(), ScSelectionTransferObj::CreateFromView(), ScTabViewShell::CreateRefDialogController(), ScDocument::CreateSelectionPattern(), ScViewFunc::CutToClip(), ScDocFunc::DeleteContents(), ScViewFunc::DeleteContents(), ScDrawLayer::DeleteObjectsInSelection(), ScColumn::DeleteSelection(), ScViewFunc::DetectiveMarkPred(), ScViewFunc::DetectiveMarkSucc(), ScTabViewShell::DoAutoSum(), ScUndoConversion::DoChange(), ScViewFunc::DoRefConversion(), ScViewFunc::DoSheetConversion(), ScGridWindow::dumpCellProperties(), ScViewFunc::EnterBlock(), ScViewFunc::EnterMatrix(), ScCellShell::Execute(), ScTabViewShell::Execute(), ScCellShell::ExecuteDataPilotDialog(), ScCellShell::ExecuteEdit(), ScDocument::FillInfo(), ScModelObj::FillRenderMarkData(), ScViewFunc::FillTab(), ScTabView::FindNextUnprot(), FuInsertChart::FuInsertChart(), ScDBFunc::GetAnonymousDBData(), ScFormatShell::GetCurrentNumberFormatType(), ScDBFunc::GetDBData(), ScTabViewShell::GetFunction(), ScViewData::GetMultiArea(), ScTable::GetNextPos(), ScColumn::GetOptimalColWidth(), ScGridWindow::GetPixelRectsFor(), ScTabViewObj::getSelection(), ScViewFunc::GetSelectionFrame(), ScDocument::GetSelectionFrame(), ScDocument::GetSelectionFunction(), ScViewFunc::GetSelectionPattern(), ScViewFunc::GetSelectionScriptType(), ScColumn::GetSelectionStyle(), ScDocument::GetSelectionStyle(), ScViewData::GetSimpleArea(), ScCellShell::GetState(), ScViewFunc::GetStyleSheetFromMarked(), ScColumn::HasAttribSelection(), ScColumn::HasSelectionMatrixFragment(), ScTabView::InitOwnBlockMode(), ScViewFunctionSet::IsSelectionAtPoint(), lcl_GetMultiMarkRange(), lcl_GetTextToColumnsRange(), ScDocShell::MakeScenario(), ScTabView::MarkCursor(), ScColumn::MergeSelectionPattern(), ScColumn::MixMarked(), ScGridWindow::MouseButtonUp(), ScTabView::MoveCursorAbs(), ScTabView::MoveCursorEnter(), ScAccessibleSpreadsheet::Notify(), ScTabView::PaintBlock(), ScViewFunc::PasteFromClip(), ScSelectionState::ScSelectionState(), ScUndoDeleteContents::ScUndoDeleteContents(), ScViewFunc::SearchAndReplace(), ScTable::SearchAndReplaceEmptyCells(), ScColumn::SearchStyle(), ScColumn::SearchStyleRange(), ScViewFunc::SelectionEditable(), ScViewFunctionSet::SetAnchor(), ScViewFunctionSet::SetCursorAtCell(), ScViewFunc::SetMarkedWidthOrHeight(), ScInputHandler::StartTable(), ScViewFunc::TestMergeCells(), ScViewFunc::TransliterateText(), ScDocument::TransliterateText(), ScTabView::Unmark(), ScViewFunc::UpdateSelectionArea(), and ScTable::UpdateSelectionFunction().

bool ScMarkData::IsRowMarked ( SCROW  nRow) const
void ScMarkData::MarkFromRangeList ( const ScRangeList rList,
bool  bReset 
)
void ScMarkData::MarkToMulti ( )
void ScMarkData::MarkToSimple ( )
ScMarkData & ScMarkData::operator= ( const ScMarkData rData)
ScMarkData & ScMarkData::operator= ( ScMarkData &&  rData)
ScMarkData::const_reverse_iterator ScMarkData::rbegin ( ) const

Definition at line 969 of file markdata.cxx.

References maTabMarked.

void ScMarkData::ResetMark ( )
void ScMarkData::SelectOneTable ( SCTAB  nTab)
void ScMarkData::SelectTable ( SCTAB  nTab,
bool  bNew 
)
void ScMarkData::SetAreaTab ( SCTAB  nTab)
void ScMarkData::SetMarkArea ( const ScRange rRange)
void ScMarkData::SetMarking ( bool  bFlag)
inline
void ScMarkData::SetMarkNegative ( bool  bFlag)
inline
void ScMarkData::SetMultiMarkArea ( const ScRange rRange,
bool  bMark = true,
bool  bSetupMulti = false 
)
void ScMarkData::SetSelectedTabs ( const MarkedTabsType rTabs)
void ScMarkData::ShiftCols ( const ScDocument pDoc,
SCCOL  nStartCol,
long  nColOffset 
)
void ScMarkData::ShiftRows ( const ScDocument pDoc,
SCROW  nStartRow,
long  nRowOffset 
)

Member Data Documentation

ScRangeList ScMarkData::aBottomEnvelope
private

Definition at line 54 of file markdata.hxx.

Referenced by GetSelectionCover(), operator=(), and ResetMark().

ScRangeList ScMarkData::aLeftEnvelope
private

Definition at line 55 of file markdata.hxx.

Referenced by GetSelectionCover(), operator=(), and ResetMark().

ScRange ScMarkData::aMarkRange
private
ScRange ScMarkData::aMultiRange
private
ScMultiSel ScMarkData::aMultiSel
private
ScRangeList ScMarkData::aRightEnvelope
private

Definition at line 56 of file markdata.hxx.

Referenced by GetSelectionCover(), operator=(), and ResetMark().

ScRangeList ScMarkData::aTopEnvelope
private

Definition at line 53 of file markdata.hxx.

Referenced by GetSelectionCover(), operator=(), and ResetMark().

bool ScMarkData::bMarked
private
bool ScMarkData::bMarking
private

Definition at line 61 of file markdata.hxx.

Referenced by MarkToMulti(), MarkToSimple(), operator=(), and ResetMark().

bool ScMarkData::bMarkIsNeg
private
bool ScMarkData::bMultiMarked
private
MarkedTabsType ScMarkData::maTabMarked
private
const ScSheetLimits& ScMarkData::mrSheetLimits
private

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