LibreOffice Module sc (master) 1
Public Member Functions | Private Attributes | List of all members
ScRangeList Class Referencefinal

#include <rangelst.hxx>

Inheritance diagram for ScRangeList:
[legend]
Collaboration diagram for ScRangeList:
[legend]

Public Member Functions

 ScRangeList ()
 
 ScRangeList (const ScRangeList &rList)
 
 ScRangeList (ScRangeList &&rList) noexcept
 
 ScRangeList (const ScRange &rRange)
 
virtual ~ScRangeList () override
 
ScRangeListoperator= (const ScRangeList &rList)
 
ScRangeListoperator= (ScRangeList &&rList) noexcept
 
ScRefFlags Parse (std::u16string_view, const ScDocument &, formula::FormulaGrammar::AddressConvention eConv=formula::FormulaGrammar::CONV_OOO, SCTAB nDefaultTab=0, sal_Unicode cDelimiter=0)
 
void Format (OUString &, ScRefFlags nFlags, const ScDocument &, formula::FormulaGrammar::AddressConvention eConv=formula::FormulaGrammar::CONV_OOO, sal_Unicode cDelimiter=0, bool bFullAddressNotation=false) const
 
void Join (const ScRange &, bool bIsInList=false)
 
bool UpdateReference (UpdateRefMode, const ScDocument *, const ScRange &rWhere, SCCOL nDx, SCROW nDy, SCTAB nDz)
 
void InsertRow (SCTAB nTab, SCCOL nColStart, SCCOL nColEnd, SCROW nRowPos, SCSIZE nSize)
 
void InsertCol (SCTAB nTab, SCROW nRowStart, SCROW nRowEnd, SCCOL nColPos, SCSIZE nSize)
 
void InsertCol (SCTAB nTab, SCCOL nColPos)
 
bool DeleteArea (SCCOL nCol1, SCROW nRow1, SCTAB nTab1, SCCOL nCol2, SCROW nRow2, SCTAB nTab2)
 For now this method assumes that nTab1 == nTab2 The algorithm will be much more complicated if nTab1 != nTab2. More...
 
const ScRangeFind (const ScAddress &) const
 
ScRangeFind (const ScAddress &)
 
bool operator== (const ScRangeList &) const
 
bool operator!= (const ScRangeList &r) const
 
bool Intersects (const ScRange &) const
 
bool Contains (const ScRange &) const
 
sal_uInt64 GetCellCount () const
 
ScAddress GetTopLeftCorner () const
 
ScRangeList GetIntersectedRange (const ScRange &rRange) const
 
void Remove (size_t nPos)
 
void RemoveAll ()
 
ScRange Combine () const
 
void AddAndPartialCombine (const ScRange &)
 
bool empty () const
 
size_t size () const
 
ScRangeoperator[] (size_t idx)
 
const ScRangeoperator[] (size_t idx) const
 
ScRangefront ()
 
const ScRangefront () const
 
ScRangeback ()
 
const ScRangeback () const
 
void push_back (const ScRange &rRange)
 
::std::vector< ScRange >::const_iterator begin () const
 
::std::vector< ScRange >::const_iterator end () const
 
::std::vector< ScRange >::iterator begin ()
 
::std::vector< ScRange >::iterator end ()
 
void insert (std::vector< ScRange >::iterator aPos, std::vector< ScRange >::const_iterator aSourceBegin, std::vector< ScRange >::const_iterator aSourceEnd)
 
void swap (ScRangeList &r)
 
- Public Member Functions inherited from SvRefBase
 SvRefBase ()
 
 SvRefBase (const SvRefBase &)
 
SvRefBaseoperator= (const SvRefBase &)
 
void RestoreNoDelete ()
 
void AddNextRef ()
 
void AddFirstRef ()
 
void ReleaseRef ()
 
unsigned int GetRefCount () const
 

Private Attributes

::std::vector< ScRangemaRanges
 
SCROW mnMaxRowUsed
 

Additional Inherited Members

- Protected Member Functions inherited from SvRefBase
virtual ~SvRefBase () COVERITY_NOEXCEPT_FALSE
 

Detailed Description

Definition at line 31 of file rangelst.hxx.

Constructor & Destructor Documentation

◆ ScRangeList() [1/4]

ScRangeList::ScRangeList ( )

Definition at line 1041 of file rangelst.cxx.

◆ ScRangeList() [2/4]

ScRangeList::ScRangeList ( const ScRangeList rList)

Definition at line 1043 of file rangelst.cxx.

◆ ScRangeList() [3/4]

ScRangeList::ScRangeList ( ScRangeList &&  rList)
noexcept

Definition at line 1050 of file rangelst.cxx.

◆ ScRangeList() [4/4]

ScRangeList::ScRangeList ( const ScRange rRange)

Definition at line 1056 of file rangelst.cxx.

References maRanges, and push_back().

◆ ~ScRangeList()

ScRangeList::~ScRangeList ( )
overridevirtual

Definition at line 88 of file rangelst.cxx.

Member Function Documentation

◆ AddAndPartialCombine()

void ScRangeList::AddAndPartialCombine ( const ScRange rNewRange)

◆ back() [1/2]

ScRange & ScRangeList::back ( )
inline

◆ back() [2/2]

const ScRange & ScRangeList::back ( ) const
inline

Definition at line 95 of file rangelst.hxx.

◆ begin() [1/2]

::std::vector< ScRange >::iterator ScRangeList::begin ( )
inline

Definition at line 99 of file rangelst.hxx.

◆ begin() [2/2]

::std::vector< ScRange >::const_iterator ScRangeList::begin ( ) const
inline

◆ Combine()

ScRange ScRangeList::Combine ( ) const

◆ Contains()

bool ScRangeList::Contains ( const ScRange rRange) const

◆ DeleteArea()

bool ScRangeList::DeleteArea ( SCCOL  nCol1,
SCROW  nRow1,
SCTAB  nTab1,
SCCOL  nCol2,
SCROW  nRow2,
SCTAB  nTab2 
)

For now this method assumes that nTab1 == nTab2 The algorithm will be much more complicated if nTab1 != nTab2.

Definition at line 951 of file rangelst.cxx.

References ScRange::Contains(), i, Join(), maRanges, and Remove().

Referenced by ScConditionalFormat::DeleteArea(), and UpdateReference().

◆ empty()

bool ScRangeList::empty ( ) const
inline

Definition at line 88 of file rangelst.hxx.

Referenced by ScConditionalFormatList::AddToDocument(), ScVbaEventListener::changesOccurred(), oox::xls::DefinedName::convertFormula(), ScViewFunc::CopyToClip(), XclExpNameManagerImpl::CreateBuiltInNames(), ScCondFormatsObj::createByRange(), ScTableSheetObj::createCursorByRange(), ScConditionalFormat::DeleteArea(), ScUndoPaste::DoChange(), ScCellShell::ExecuteEdit(), oox::xls::FormulaProcessorBase::extractCellRange(), oox::xls::Scenario::finalizeImport(), FuInsertChart::FuInsertChart(), ScViewFunc::GetAutoSumFormula(), oox::xls::WorksheetGlobals::getCellRangeList(), ScDocument::GetClipArea(), ScDocument::GetClipStart(), ScCondFormatDlg::GetConditionalFormat(), ScTabViewShell::GetDrawInsState(), ScClipParam::getPasteColSize(), ScClipParam::getPasteRowSize(), ScTableSheetObj::GetTab_Impl(), GetTopLeftCorner(), ScDocument::HasClipFilteredRows(), ScAcceptChgDlg::Init(), ScHighlightChgDlg::Init(), XclExpNameManager::InsertBuiltInName(), ScMyTables::IsPartOfMatrix(), ScTableProtectionImpl::isSelectionEditable(), lcl_collectAllPredOrSuccRanges(), lcl_FirstTab(), lcl_TotalRange(), ScViewFunc::MarkAndJumpToRanges(), ScVbaRange::obtainRangeEvenIfRangeListIsEmpty(), oox::xls::SparklineGroupsContext::onCharacters(), oox::xls::ExtConditionalFormattingContext::onEndElement(), XclImpControlHelper::ReadCellLinkFormula(), XclImpCondFormat::ReadCF(), XclImpValidationManager::ReadDV(), XclImpControlHelper::ReadSourceRangeFormula(), ScCellRangeObj::RefChanged(), ScCellObj::RefChanged(), ScFormulaReferenceHelper::ReleaseFocus(), ScCellsEnumeration::ScCellsEnumeration(), ScCondFormatDlg::ScCondFormatDlg(), oox::xls::SheetDataBuffer::setCellFormat(), ScGridWindow::SetCellSelectionPixel(), ScConditionalFormat::SetRange(), sc::SparklineDataRangeDialog::setupValues(), XclImpXFRangeBuffer::SetXF(), ScMultiBlockUndo::ShowBlock(), ScClipParam::transpose(), ScUndoPaste::Undo(), ScDPCollection::SheetCaches::updateReference(), and ScDocument::UpdateTranspose().

◆ end() [1/2]

::std::vector< ScRange >::iterator ScRangeList::end ( )
inline

Definition at line 100 of file rangelst.hxx.

◆ end() [2/2]

::std::vector< ScRange >::const_iterator ScRangeList::end ( ) const
inline

◆ Find() [1/2]

ScRange * ScRangeList::Find ( const ScAddress rAdr)

Definition at line 1034 of file rangelst.cxx.

References maRanges.

◆ Find() [2/2]

const ScRange * ScRangeList::Find ( const ScAddress rAdr) const

◆ Format()

void ScRangeList::Format ( OUString &  rStr,
ScRefFlags  nFlags,
const ScDocument rDoc,
formula::FormulaGrammar::AddressConvention  eConv = formula::FormulaGrammar::CONV_OOO,
sal_Unicode  cDelimiter = 0,
bool  bFullAddressNotation = false 
) const

◆ front() [1/2]

ScRange & ScRangeList::front ( )
inline

◆ front() [2/2]

const ScRange & ScRangeList::front ( ) const
inline

Definition at line 93 of file rangelst.hxx.

◆ GetCellCount()

sal_uInt64 ScRangeList::GetCellCount ( ) const

◆ GetIntersectedRange()

ScRangeList ScRangeList::GetIntersectedRange ( const ScRange rRange) const

◆ GetTopLeftCorner()

ScAddress ScRangeList::GetTopLeftCorner ( ) const

◆ insert()

void ScRangeList::insert ( std::vector< ScRange >::iterator  aPos,
std::vector< ScRange >::const_iterator  aSourceBegin,
std::vector< ScRange >::const_iterator  aSourceEnd 
)
inline

Definition at line 101 of file rangelst.hxx.

Referenced by ScMarkData::GetMarkedRowSpans().

◆ InsertCol() [1/2]

void ScRangeList::InsertCol ( SCTAB  nTab,
SCCOL  nColPos 
)

Definition at line 500 of file rangelst.cxx.

References Join(), and maRanges.

◆ InsertCol() [2/2]

void ScRangeList::InsertCol ( SCTAB  nTab,
SCROW  nRowStart,
SCROW  nRowEnd,
SCCOL  nColPos,
SCSIZE  nSize 
)

Definition at line 472 of file rangelst.cxx.

References Join(), and maRanges.

Referenced by ScConditionalFormat::InsertCol().

◆ InsertRow()

void ScRangeList::InsertRow ( SCTAB  nTab,
SCCOL  nColStart,
SCCOL  nColEnd,
SCROW  nRowPos,
SCSIZE  nSize 
)

Definition at line 442 of file rangelst.cxx.

References Join(), maRanges, and mnMaxRowUsed.

Referenced by ScConditionalFormat::InsertRow().

◆ Intersects()

bool ScRangeList::Intersects ( const ScRange rRange) const

◆ Join()

void ScRangeList::Join ( const ScRange rNewRange,
bool  bIsInList = false 
)

◆ operator!=()

bool ScRangeList::operator!= ( const ScRangeList r) const

Definition at line 352 of file rangelst.cxx.

References operator==().

◆ operator=() [1/2]

ScRangeList & ScRangeList::operator= ( const ScRangeList rList)

Definition at line 1063 of file rangelst.cxx.

References maRanges, and mnMaxRowUsed.

◆ operator=() [2/2]

ScRangeList & ScRangeList::operator= ( ScRangeList &&  rList)
noexcept

Definition at line 1070 of file rangelst.cxx.

◆ operator==()

bool ScRangeList::operator== ( const ScRangeList r) const

Definition at line 344 of file rangelst.cxx.

References maRanges.

Referenced by operator!=().

◆ operator[]() [1/2]

ScRange & ScRangeList::operator[] ( size_t  idx)
inline

Definition at line 90 of file rangelst.hxx.

References idx.

◆ operator[]() [2/2]

const ScRange & ScRangeList::operator[] ( size_t  idx) const
inline

Definition at line 91 of file rangelst.hxx.

References idx.

◆ Parse()

ScRefFlags ScRangeList::Parse ( std::u16string_view  rStr,
const ScDocument rDoc,
formula::FormulaGrammar::AddressConvention  eConv = formula::FormulaGrammar::CONV_OOO,
SCTAB  nDefaultTab = 0,
sal_Unicode  cDelimiter = 0 
)

◆ push_back()

void ScRangeList::push_back ( const ScRange rRange)

Definition at line 1137 of file rangelst.cxx.

References ScRange::aEnd, maRanges, mnMaxRowUsed, and ScAddress::Row().

Referenced by AddAndPartialCombine(), ScMyTables::AddMatrixRange(), ScChartsObj::addNewByName(), XclExpMergedcells::AppendRange(), ScViewFunc::ApplySelectionPattern(), ScVbaEventListener::changesOccurred(), XclImpAddressConverter::ConvertRangeList(), oox::xls::AddressConverter::convertToCellRangeList(), ScDocument::CopyFromClip(), ScDocument::CopyTabToClip(), XclExpNameManagerImpl::CreateBuiltInNames(), ScDBDocFunc::DataPilotUpdate(), ScViewFunc::DeleteContents(), ScViewFunc::DetectiveMarkPred(), ScViewFunc::DetectiveMarkSucc(), ScCellShell::ExecuteEdit(), ScMarkData::ExtendRangeListTables(), ScViewFunc::FillAuto(), XclExpLabelranges::FillRangeList(), ScMarkData::FillRangeListWithMarks(), oox::xls::Scenario::finalizeImport(), ExcelToSc::GetAbsRefs(), ExcelToSc8::GetAbsRefs(), ScViewFunc::GetAutoSumArea(), ScDPCollection::SheetCaches::getCache(), ScHTMLImport::GetHTMLRangeNameList(), ScVbaPageSetup::getPrintArea(), ScRangeStringConverter::GetRangeListFromString(), ScMarkData::GetSelectionCover(), ScCellShell::GetState(), ScHTMLTable::InsertNewCell(), ScTableProtectionImpl::isBlockEditable(), Join(), lcl_GetAutoSumForColumnRange(), lcl_GetAutoSumForRowRange(), lcl_makeXRangeFromSheetCellRanges(), ScStatisticsInputOutputDialog::MakeColumnRangeList(), ScStatisticsInputOutputDialog::MakeRowRangeList(), ScViewFunc::MarkAndJumpToRanges(), ScViewFunc::MoveTable(), ScChart2DataSequence::Notify(), ScModelObj::NotifyChanges(), HelperNotifyChanges::NotifyIfChangesListeners(), Parse(), ScFormulaReferenceHelper::ParseWithNames(), ScDocShell::PostPaint(), ScViewFunc::PostPasteFromClip(), sc::UndoInsertSparkline::Redo(), ScAreaLink::Refresh(), ScClipParam::ScClipParam(), ScCondFormatDlg::ScCondFormatDlg(), ScRangeList(), ScTable::SearchAndReplaceEmptyCells(), oox::xls::SheetDataBuffer::setCellFormat(), ScDocument::SetClipArea(), XclImpXFRangeBuffer::SetMerge(), ScChartObj::setRanges(), ScViewFunc::SetWidthOrHeight(), XclImpXFRangeBuffer::SetXF(), ScVbaRange::SpecialCells(), XclXmlUtils::ToOString(), ScDocShell::TransferTab(), ScClipParam::transpose(), and sc::UndoInsertSparkline::Undo().

◆ Remove()

void ScRangeList::Remove ( size_t  nPos)

◆ RemoveAll()

void ScRangeList::RemoveAll ( )

◆ size()

size_t ScRangeList::size ( ) const
inline

Definition at line 89 of file rangelst.hxx.

Referenced by ScVbaNames::Add(), ScTable::AddCondFormatData(), ScAcceptChgDlg::AppendChangeAction(), ScAcceptChgDlg::AppendFilteredAction(), XclImpValidationManager::Apply(), ScHelperFunctions::ApplyBorder(), XMLTableStyleContext::ApplyCondFormat(), ScMatrixComparisonGenerator::ApplyOutput(), ScDocument::ApplySelectionFrame(), ScAccessibleSpreadsheet::CalcScAddressFromRangeList(), ScAccessibleSpreadsheet::CalcScRangeListDifferenceMax(), ScFunctionAccess::callFunction(), ScOptSolverDlg::CallSolver(), ScClipUtil::CheckDestRanges(), ScCellCursorObj::collapseToCurrentArray(), ScCellCursorObj::collapseToCurrentRegion(), ScCellCursorObj::collapseToMergedArea(), ScCellCursorObj::collapseToSize(), ScDocument::ContainsNotesInRange(), oox::xls::DefinedName::convertFormula(), XclExpAddressConverter::ConvertRangeList(), ScDocument::CopyFromClip(), ScDocument::CopyMultiRangeFromClip(), ScDocument::CopyScenario(), ScTable::CopyToClip(), ScViewFunc::CopyToClip(), ScViewFunc::CopyToClipMultiRange(), ScTableSheetObj::createCursorByRange(), XclExpFormulaCompiler::CreateFormula(), ScDocument::DeleteSelection(), ScTable::DeleteSelection(), ScDocument::DeleteSelectionTab(), ScTabViewShell::DoAutoSum(), ScUndoPaste::DoChange(), ScTabView::DoChartSelection(), ScGridWindow::dumpCellProperties(), ScXMLTableScenarioContext::endFastElement(), ScXMLTableContext::endFastElement(), ExcEScenario::ExcEScenario(), ScCellCursorObj::expandToEntireColumns(), ScCellCursorObj::expandToEntireRows(), ScMarkData::ExtendRangeListTables(), ScConditionEntry::FillCache(), ScHTMLTable::FillEmptyCells(), sc::SearchResultsDlg::FillResults(), XclImpXFRangeBuffer::Finalize(), ScDocument::ForgetNoteCaptions(), FuInsertChart::FuInsertChart(), ScDocument::GetAllNoteCaptionsState(), ScViewFunc::GetAutoSumFormula(), XclExpMergedcells::GetBaseXFId(), ScDPCollection::SheetCaches::getCache(), getCellRangeAddressForVBARange(), ScTableSheetsObj::getCellRangesByName(), ScDocument::GetClipArea(), ScConditionalFormatList::GetCombinedRange(), ScVbaRange::getEntireColumnOrRow(), ScMarkData::GetMarkedRowSpans(), ScDocument::GetNotesInRange(), ScClipParam::getPasteColSize(), ScClipParam::getPasteRowSize(), getRangeForName(), ScTableSheetObj::getRanges(), ScDocument::GetRangeScriptType(), getScRangeListForAddress(), ScTabViewObj::getSelection(), ScDocument::GetSelectionFrame(), ScTableSheetObj::GetTab_Impl(), GetTopLeftCorner(), ScColorFormat::getValues(), ScCellCursorObj::gotoEnd(), ScCellCursorObj::gotoEndOfUsedArea(), ScCellCursorObj::gotoNext(), ScCellCursorObj::gotoOffset(), ScCellCursorObj::gotoPrevious(), ScCellCursorObj::gotoStart(), ScCellCursorObj::gotoStartOfUsedArea(), ScDocument::HasClipFilteredRows(), ScGridWindow::HasScenarioButton(), ScTable::HasScenarioRange(), ScColumn::HasSelectionMatrixFragment(), IMPL_LINK_NOARG(), sc::IMPL_LINK_NOARG(), ScAcceptChgDlg::InsertChangeActionContent(), oox::xls::SparklineGroupsContext::insertSparkline(), ScDocument::InterpretCellsIfNeeded(), ScDocument::InterpretDirtyCells(), ScTableProtectionImpl::isBlockEditable(), ScAccessibleCell::IsDropdown(), ScClipParam::isMultiRange(), ScTable::IsSelectionEditable(), ScTableProtectionImpl::isSelectionEditable(), ScAcceptChgDlg::IsValidAction(), lcl_collectAllPredOrSuccRanges(), lcl_FindRangeByName(), lcl_makeXRangeFromSheetCellRanges(), lcl_TabInRanges(), lcl_TotalRange(), lcl_WholeSheet(), ScViewFunc::MarkAndJumpToRanges(), ScMarkData::MarkFromRangeList(), ScCellsEnumeration::Notify(), ScChart2DataSequence::Notify(), ScDataPilotTableObj::Notify(), ScModelObj::NotifyChanges(), ScVbaRange::Offset(), oox::xls::CondFormatContext::onEndElement(), oox::xls::ExtConditionalFormattingContext::onEndElement(), operator<<(), ScViewFunc::PasteFromClip(), ScClipUtil::PasteFromClipboard(), ScViewFunc::PasteFromClipToMultiRanges(), ScDocShell::PostPaint(), ScViewFunc::PostPasteFromClip(), XclImpCondFormat::ReadCF(), XclImpLabelranges::ReadLabelranges(), ScCellRangeObj::RefChanged(), ScCellObj::RefChanged(), ScAreaLink::Refresh(), ScTableLink::Refresh(), ScDBCollection::RefreshDirtyTableColumnNames(), ScTable::RemoveCondFormatData(), ScTable::ReplaceAll(), ScAnalysisOfVarianceDialog::RowColumn(), XclExpMergedcells::SaveXml(), sc::SingleColumnSpanSet::scan(), ScMarkData::ScMarkData(), ScViewFunc::SearchAndReplace(), ScTable::SearchAndReplaceEmptyCells(), ScTabViewObj::select(), ScMultiSel::Set(), ScTabViewObj::setActiveSheet(), oox::xls::SheetDataBuffer::setCellFormat(), ScUndoPaste::SetChangeTrack(), ScVbaPageSetup::setPrintArea(), ScMultiBlockUndo::ShowBlock(), ScFormulaReferenceHelper::ShowSimpleReference(), ScTable::SortReorderByRowRefUpdate(), ScVbaRange::SpecialCells(), ScFormulaListener::startListening(), oox::xls::AddressConverter::toApiSequence(), ScClipParam::transpose(), ScDocument::TransposeClip(), ScUndoDragDrop::Undo(), ScGridWindow::UpdateCopySourceOverlay(), ScConditionalFormat::UpdateDeleteTab(), ScConditionalFormat::UpdateInsertTab(), ScConditionalFormat::UpdateMoveTab(), ScChart2DataSequence::UpdateTokensFromRanges(), ScTabViewShell::UseSubTotal(), oox::xls::AddressConverter::validateCellRangeList(), XclExpAddressConverter::ValidateRangeList(), and XclExpLabelranges::XclExpLabelranges().

◆ swap()

void ScRangeList::swap ( ScRangeList r)

Definition at line 1144 of file rangelst.cxx.

References maRanges, and mnMaxRowUsed.

Referenced by sc::QueryRange::swapRanges().

◆ UpdateReference()

bool ScRangeList::UpdateReference ( UpdateRefMode  eUpdateRefMode,
const ScDocument pDoc,
const ScRange rWhere,
SCCOL  nDx,
SCROW  nDy,
SCTAB  nDz 
)

Member Data Documentation

◆ maRanges

::std::vector<ScRange> ScRangeList::maRanges
private

◆ mnMaxRowUsed

SCROW ScRangeList::mnMaxRowUsed
private

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