LibreOffice Module sc (master) 1
|
#include <rangenam.hxx>
Public Types | |
typedef ::std::map< SCTAB, const ScRangeName * > | TabNameCopyMap |
Map that stores non-managed pointers to ScRangeName instances. More... | |
typedef DataType::const_iterator | const_iterator |
typedef DataType::iterator | iterator |
Public Member Functions | |
ScRangeName () | |
SC_DLLPUBLIC | ScRangeName (const ScRangeName &r) |
SC_DLLPUBLIC const ScRangeData * | findByRange (const ScRange &rRange) const |
SC_DLLPUBLIC ScRangeData * | findByUpperName (const OUString &rName) |
SC_DLLPUBLIC const ScRangeData * | findByUpperName (const OUString &rName) const |
SC_DLLPUBLIC ScRangeData * | findByIndex (sal_uInt16 i) const |
void | UpdateReference (sc::RefUpdateContext &rCxt, SCTAB nLocalTab=-1) |
void | UpdateInsertTab (sc::RefUpdateInsertTabContext &rCxt, SCTAB nLocalTab=-1) |
void | UpdateDeleteTab (sc::RefUpdateDeleteTabContext &rCxt, SCTAB nLocalTab=-1) |
void | UpdateMoveTab (sc::RefUpdateMoveTabContext &rCxt, SCTAB nLocalTab=-1) |
void | UpdateTranspose (const ScRange &rSource, const ScAddress &rDest) |
void | UpdateGrow (const ScRange &rArea, SCCOL nGrowX, SCROW nGrowY) |
void | CompileUnresolvedXML (sc::CompileFormulaContext &rCxt) |
Compile those names that couldn't be resolved during loading and inserting because they may have referred a name that was inserted later. More... | |
void | CopyUsedNames (const SCTAB nLocalTab, const SCTAB nOldTab, const SCTAB nNewTab, const ScDocument &rOldDoc, ScDocument &rNewDoc, const bool bGlobalNamesToLocal) const |
Copy names while copying a sheet if they reference the sheet to be copied. More... | |
SC_DLLPUBLIC const_iterator | begin () const |
SC_DLLPUBLIC const_iterator | end () const |
SC_DLLPUBLIC size_t | size () const |
SC_DLLPUBLIC size_t | index_size () const |
bool | empty () const |
SC_DLLPUBLIC bool | insert (ScRangeData *p, bool bReuseFreeIndex=true) |
Insert object into set. More... | |
void | erase (const ScRangeData &r) |
void | erase (const OUString &rName) |
void | erase (const_iterator itr) |
Erase by iterator position. More... | |
void | clear () |
bool | operator== (const ScRangeName &r) const |
bool | hasPossibleAddressConflict () const |
Private Types | |
typedef std::vector< ScRangeData * > | IndexDataType |
typedef ::std::map< OUString, std::unique_ptr< ScRangeData > > | DataType |
Private Member Functions | |
void | checkHasPossibleAddressConflict () const |
Private Attributes | |
DataType | m_Data |
IndexDataType | maIndexToData |
bool | mHasPossibleAddressConflict: 1 |
bool | mHasPossibleAddressConflictDirty: 1 |
Definition at line 185 of file rangenam.hxx.
typedef DataType::const_iterator ScRangeName::const_iterator |
Definition at line 203 of file rangenam.hxx.
|
private |
Definition at line 189 of file rangenam.hxx.
|
private |
Definition at line 188 of file rangenam.hxx.
typedef DataType::iterator ScRangeName::iterator |
Definition at line 204 of file rangenam.hxx.
typedef ::std::map<SCTAB, const ScRangeName*> ScRangeName::TabNameCopyMap |
Map that stores non-managed pointers to ScRangeName instances.
Definition at line 201 of file rangenam.hxx.
ScRangeName::ScRangeName | ( | ) |
Definition at line 669 of file rangenam.cxx.
ScRangeName::ScRangeName | ( | const ScRangeName & | r | ) |
Definition at line 675 of file rangenam.cxx.
References m_Data, maIndexToData, and nPos.
|
inline |
Definition at line 245 of file rangenam.hxx.
References m_Data.
Referenced by ScCellShell::ExecuteDataPilotDialog(), and ScAreaNameIterator::ScAreaNameIterator().
|
private |
Definition at line 877 of file rangenam.cxx.
References m_Data, mHasPossibleAddressConflict, and mHasPossibleAddressConflictDirty.
Referenced by hasPossibleAddressConflict().
void ScRangeName::clear | ( | ) |
Definition at line 869 of file rangenam.cxx.
References m_Data, maIndexToData, mHasPossibleAddressConflict, and mHasPossibleAddressConflictDirty.
Referenced by ScDocument::TransposeClip().
void ScRangeName::CompileUnresolvedXML | ( | sc::CompileFormulaContext & | rCxt | ) |
Compile those names that couldn't be resolved during loading and inserting because they may have referred a name that was inserted later.
Definition at line 778 of file rangenam.cxx.
References m_Data.
void ScRangeName::CopyUsedNames | ( | const SCTAB | nLocalTab, |
const SCTAB | nOldTab, | ||
const SCTAB | nNewTab, | ||
const ScDocument & | rOldDoc, | ||
ScDocument & | rNewDoc, | ||
const bool | bGlobalNamesToLocal | ||
) | const |
Copy names while copying a sheet if they reference the sheet to be copied.
Assumes that new sheet was already inserted, global names have been updated/adjusted, but sheet-local names on nOldTab are not, as is the case in ScDocument::CopyTab()
nLocalTab | -1 when operating on global names, else sheet/tab of sheet-local name scope. The already adjusted tab on which to find the name. |
nOldTab | The original unadjusted tab position. |
nNewTab | The new tab position. |
Definition at line 786 of file rangenam.cxx.
References ScDocument::CopyAdjustRangeName(), m_Data, nIndex, and ScAddress::SetTab().
Referenced by ScDocument::CopyTab(), and ScDocument::TransferTab().
|
inline |
Definition at line 249 of file rangenam.hxx.
References m_Data.
Referenced by ScDBFunc::DoSubTotals(), ScDBDocFunc::DoSubTotals(), ScPosWnd::FillRangeNames(), ScContentTree::GetAreaNames(), ScPrintAreasDlg::Impl_FillLists(), ScDBFunc::RepeatDB(), ScDBDocFunc::RepeatDB(), ScRefUndoData::ScRefUndoData(), and ScXMLExport::WriteTable().
|
inline |
Definition at line 246 of file rangenam.hxx.
References m_Data.
Referenced by ScCellShell::ExecuteDataPilotDialog(), and ScAreaNameIterator::ScAreaNameIterator().
void ScRangeName::erase | ( | const OUString & | rName | ) |
Definition at line 851 of file rangenam.cxx.
void ScRangeName::erase | ( | const ScRangeData & | r | ) |
Definition at line 846 of file rangenam.cxx.
References erase(), and ScRangeData::GetUpperName().
Referenced by ScDocFunc::CreateOneName(), sc::SolverSettings::DeleteAllNamedRanges(), erase(), insert(), ScViewFunc::InsertName(), ScNameDlg::NameModified(), ScNameDlg::RemovePushed(), and ScUndoAddRangeData::Undo().
void ScRangeName::erase | ( | const_iterator | itr | ) |
Erase by iterator position.
Note that this method doesn't check for iterator's validity. The caller must make sure that the iterator is valid.
Definition at line 858 of file rangenam.cxx.
References m_Data, maIndexToData, mHasPossibleAddressConflict, mHasPossibleAddressConflictDirty, and nIndex.
ScRangeData * ScRangeName::findByIndex | ( | sal_uInt16 | i | ) | const |
Definition at line 716 of file rangenam.cxx.
References i, maIndexToData, and nPos.
Referenced by ScGroupTokenConverter::convert(), ScDocument::CopyAdjustRangeName(), sc::SolverSettings::DeleteAllNamedRanges(), ScDocument::FindRangeNameBySheetAndIndex(), XclExpNameManagerImpl::InsertName(), ScDocument::MarkUsedExternalReferences(), ScDocument::PreprocessAllRangeNamesUpdate(), and ScLinkedAreaDlg::UpdateSourceRanges().
const ScRangeData * ScRangeName::findByRange | ( | const ScRange & | rRange | ) | const |
Definition at line 697 of file rangenam.cxx.
References m_Data.
Referenced by ScDocument::GetRangeAtBlock(), and XclExpWebQueryBuffer::XclExpWebQueryBuffer().
ScRangeData * ScRangeName::findByUpperName | ( | const OUString & | rName | ) |
Definition at line 704 of file rangenam.cxx.
References m_Data.
Referenced by ScNamedRangesObj::addNewByName(), ScDocument::CopyAdjustRangeName(), ScDocFunc::CreateOneName(), ScDocShell::DdeCreateLinkSource(), ScPosWnd::DoEnter(), ScAreaLink::FindExtRange(), ScRangeManagerTable::findRangeData(), ScHTMLImport::GetHTMLRangeNameList(), ScCompiler::GetRangeData(), ScNamedRangeObj::GetRangeData_Impl(), ScRangeStringConverter::GetRangeDataFromString(), ScExternalRefManager::getRangeNameTokensFromSrcDoc(), ScSheetSourceDesc::GetSourceRange(), ScNamedRangesObj::hasByName(), ScViewFunc::InsertName(), ScDocFunc::InsertNameList(), ScNameDefDlg::IsNameValid(), ScNameDlg::IsNameValid(), lcl_FillRangeFromName(), lcl_GetRange(), ScRangeUtil::MakeRangeFromName(), ScNamedRangeObj::Modify_Impl(), ScNameDlg::NameModified(), ScCompiler::ParseNamedRange(), sc::SolverSettings::ReadConstraintPart(), sc::SolverSettings::ReadParamValue(), ScNamedRangesObj::removeByName(), ScNameDlg::RemovePushed(), ScNameDlg::ShowOptions(), ScEEImport::WriteToDocument(), and ScHTMLImport::WriteToDocument().
const ScRangeData * ScRangeName::findByUpperName | ( | const OUString & | rName | ) | const |
Definition at line 710 of file rangenam.cxx.
References m_Data.
|
inline |
Definition at line 278 of file rangenam.hxx.
References checkHasPossibleAddressConflict(), mHasPossibleAddressConflict, and mHasPossibleAddressConflictDirty.
Referenced by ScCompiler::HasPossibleNamedRangeConflict().
|
inline |
Definition at line 248 of file rangenam.hxx.
References maIndexToData.
Referenced by ScLinkedAreaDlg::UpdateSourceRanges().
bool ScRangeName::insert | ( | ScRangeData * | p, |
bool | bReuseFreeIndex = true |
||
) |
Insert object into set.
@ATTENTION: The underlying ::std::map<std::unique_ptr>::insert(p) takes ownership of p and if it can't insert it deletes the object! So, if this insert here returns false the object where p pointed to is gone!
bReuseFreeIndex | If the ScRangeData p points to has an index value of 0: If TRUE then reuse a free index slot if available. If FALSE then assign a new index slot. The Manage Names dialog uses this so that deleting and adding ranges in the same run is guaranteed to not reuse previously assigned indexes. |
Definition at line 802 of file rangenam.cxx.
References aName, erase(), m_Data, maIndexToData, mHasPossibleAddressConflictDirty, nPos, and p.
Referenced by ScNameDefDlg::AddPushed(), ScOrcusNamedExpression::commit(), ScDocFunc::CreateOneName(), ScPosWnd::DoEnter(), ScPosWnd::FillRangeNames(), ScContentTree::GetAreaNames(), ScViewFunc::InsertName(), XclImpName::InsertName(), ScDocument::InsertNewRangeName(), ScHTMLImport::InsertRangeName(), ScNameDlg::NameModified(), ScUndoAddRangeData::Redo(), sc::SolverSettings::WriteConstraintPart(), sc::SolverSettings::WriteParamValue(), and ScEEImport::WriteToDocument().
bool ScRangeName::operator== | ( | const ScRangeName & | r | ) | const |
Definition at line 891 of file rangenam.cxx.
References m_Data.
|
inline |
Definition at line 247 of file rangenam.hxx.
References m_Data.
Referenced by sc::SolverSettings::DeleteAllNamedRanges(), and ScConsolidateDlg::Init().
void ScRangeName::UpdateDeleteTab | ( | sc::RefUpdateDeleteTabContext & | rCxt, |
SCTAB | nLocalTab = -1 |
||
) |
Definition at line 746 of file rangenam.cxx.
References m_Data.
Definition at line 770 of file rangenam.cxx.
References m_Data.
void ScRangeName::UpdateInsertTab | ( | sc::RefUpdateInsertTabContext & | rCxt, |
SCTAB | nLocalTab = -1 |
||
) |
Definition at line 738 of file rangenam.cxx.
References m_Data.
void ScRangeName::UpdateMoveTab | ( | sc::RefUpdateMoveTabContext & | rCxt, |
SCTAB | nLocalTab = -1 |
||
) |
Definition at line 754 of file rangenam.cxx.
References m_Data.
void ScRangeName::UpdateReference | ( | sc::RefUpdateContext & | rCxt, |
SCTAB | nLocalTab = -1 |
||
) |
Definition at line 726 of file rangenam.cxx.
References m_Data, sc::RefUpdateContext::meMode, and URM_COPY.
Definition at line 762 of file rangenam.cxx.
References m_Data.
|
private |
Definition at line 190 of file rangenam.hxx.
Referenced by begin(), checkHasPossibleAddressConflict(), clear(), CompileUnresolvedXML(), CopyUsedNames(), empty(), end(), erase(), findByRange(), findByUpperName(), insert(), operator==(), ScRangeName(), size(), UpdateDeleteTab(), UpdateGrow(), UpdateInsertTab(), UpdateMoveTab(), UpdateReference(), and UpdateTranspose().
|
private |
Definition at line 191 of file rangenam.hxx.
Referenced by clear(), erase(), findByIndex(), index_size(), insert(), and ScRangeName().
|
mutableprivate |
Definition at line 194 of file rangenam.hxx.
Referenced by checkHasPossibleAddressConflict(), clear(), erase(), and hasPossibleAddressConflict().
|
mutableprivate |
Definition at line 195 of file rangenam.hxx.
Referenced by checkHasPossibleAddressConflict(), clear(), erase(), hasPossibleAddressConflict(), and insert().