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 iterator | begin () |
SC_DLLPUBLIC iterator | end () |
SC_DLLPUBLIC size_t | 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 |
Private Types | |
typedef std::vector< ScRangeData * > | IndexDataType |
typedef ::std::map< OUString, std::unique_ptr< ScRangeData > > | DataType |
Private Attributes | |
DataType | m_Data |
IndexDataType | maIndexToData |
Definition at line 184 of file rangenam.hxx.
typedef DataType::const_iterator ScRangeName::const_iterator |
Definition at line 196 of file rangenam.hxx.
|
private |
Definition at line 188 of file rangenam.hxx.
|
private |
Definition at line 187 of file rangenam.hxx.
typedef DataType::iterator ScRangeName::iterator |
Definition at line 197 of file rangenam.hxx.
typedef ::std::map<SCTAB, const ScRangeName*> ScRangeName::TabNameCopyMap |
Map that stores non-managed pointers to ScRangeName instances.
Definition at line 194 of file rangenam.hxx.
ScRangeName::ScRangeName | ( | ) |
Definition at line 650 of file rangenam.cxx.
ScRangeName::ScRangeName | ( | const ScRangeName & | r | ) |
Definition at line 652 of file rangenam.cxx.
References m_Data, maIndexToData, and nPos.
ScRangeName::const_iterator ScRangeName::begin | ( | ) | const |
Definition at line 777 of file rangenam.cxx.
References m_Data.
Referenced by ScCellShell::ExecuteDataPilotDialog(), and ScAreaNameIterator::ScAreaNameIterator().
ScRangeName::iterator ScRangeName::begin | ( | ) |
Definition at line 787 of file rangenam.cxx.
References m_Data.
void ScRangeName::clear | ( | ) |
Definition at line 871 of file rangenam.cxx.
References m_Data, and maIndexToData.
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 753 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 761 of file rangenam.cxx.
References ScDocument::CopyAdjustRangeName(), m_Data, nIndex, and ScAddress::SetTab().
Referenced by ScDocument::CopyTab(), and ScDocument::TransferTab().
bool ScRangeName::empty | ( | ) | const |
Definition at line 802 of file rangenam.cxx.
References m_Data.
Referenced by ScDBFunc::DoSubTotals(), ScDBDocFunc::DoSubTotals(), ScPosWnd::FillRangeNames(), ScDocument::GetAllTabRangeNames(), ScContentTree::GetAreaNames(), ScPrintAreasDlg::Impl_FillLists(), ScDBFunc::RepeatDB(), ScDBDocFunc::RepeatDB(), ScRefUndoData::ScRefUndoData(), ScDocument::SetAllRangeNames(), and ScXMLExport::WriteTable().
ScRangeName::const_iterator ScRangeName::end | ( | ) | const |
Definition at line 782 of file rangenam.cxx.
References m_Data.
Referenced by ScCellShell::ExecuteDataPilotDialog(), and ScAreaNameIterator::ScAreaNameIterator().
ScRangeName::iterator ScRangeName::end | ( | ) |
Definition at line 792 of file rangenam.cxx.
References m_Data.
void ScRangeName::erase | ( | const ScRangeData & | r | ) |
Definition at line 850 of file rangenam.cxx.
References ScRangeData::GetUpperName().
Referenced by ScDocFunc::CreateOneName(), erase(), insert(), ScViewFunc::InsertName(), ScNameDlg::NameModified(), ScNameDlg::RemovePushed(), and ScUndoAddRangeData::Undo().
void ScRangeName::erase | ( | const OUString & | rName | ) |
Definition at line 855 of file rangenam.cxx.
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 862 of file rangenam.cxx.
References m_Data, maIndexToData, and nIndex.
ScRangeData * ScRangeName::findByIndex | ( | sal_uInt16 | i | ) | const |
Definition at line 691 of file rangenam.cxx.
References maIndexToData, and nPos.
Referenced by ScGroupTokenConverter::convert(), ScDocument::CopyAdjustRangeName(), ScDocument::FindRangeNameBySheetAndIndex(), XclExpNameManagerImpl::InsertName(), and ScDocument::PreprocessAllRangeNamesUpdate().
const ScRangeData * ScRangeName::findByRange | ( | const ScRange & | rRange | ) | const |
Definition at line 672 of file rangenam.cxx.
References m_Data.
Referenced by ScDocument::GetRangeAtBlock(), and XclExpWebQueryBuffer::XclExpWebQueryBuffer().
ScRangeData * ScRangeName::findByUpperName | ( | const OUString & | rName | ) |
Definition at line 679 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(), ScNamedRangeObj::GetRangeData_Impl(), ScRangeStringConverter::GetRangeDataFromString(), ScExternalRefManager::getRangeNameTokensFromSrcDoc(), ScSheetSourceDesc::GetSourceRange(), ScNamedRangesObj::hasByName(), ScViewFunc::InsertName(), ScCompiler::IsNamedRange(), ScNameDefDlg::IsNameValid(), ScNameDlg::IsNameValid(), lcl_FillRangeFromName(), lcl_GetRange(), ScRangeUtil::MakeRangeFromName(), ScNamedRangeObj::Modify_Impl(), ScNameDlg::NameModified(), ScNamedRangesObj::removeByName(), ScNameDlg::RemovePushed(), ScNameDlg::ShowOptions(), ScHTMLImport::WriteToDocument(), and ScEEImport::WriteToDocument().
const ScRangeData * ScRangeName::findByUpperName | ( | const OUString & | rName | ) | const |
Definition at line 685 of file rangenam.cxx.
References m_Data.
bool ScRangeName::insert | ( | ScRangeData * | p, |
bool | bReuseFreeIndex = true |
||
) |
Insert object into set.
: 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 807 of file rangenam.cxx.
References aName, erase(), ScRangeData::GetIndex(), ScRangeData::GetUpperName(), m_Data, maIndexToData, nPos, and ScRangeData::SetIndex().
Referenced by ScNameDefDlg::AddPushed(), ScOrcusNamedExpression::commit(), ScDocFunc::CreateOneName(), ScPosWnd::DoEnter(), ScPosWnd::FillRangeNames(), ScContentTree::GetAreaNames(), XclImpName::InsertName(), ScViewFunc::InsertName(), ScDocument::InsertNewRangeName(), ScHTMLImport::InsertRangeName(), ScNameDlg::NameModified(), ScUndoAddRangeData::Redo(), and ScEEImport::WriteToDocument().
bool ScRangeName::operator== | ( | const ScRangeName & | r | ) | const |
Definition at line 877 of file rangenam.cxx.
References m_Data.
size_t ScRangeName::size | ( | ) | const |
Definition at line 797 of file rangenam.cxx.
References m_Data.
Referenced by ScConsolidateDlg::Init().
void ScRangeName::UpdateDeleteTab | ( | sc::RefUpdateDeleteTabContext & | rCxt, |
SCTAB | nLocalTab = -1 |
||
) |
Definition at line 721 of file rangenam.cxx.
References m_Data.
Definition at line 745 of file rangenam.cxx.
References m_Data.
void ScRangeName::UpdateInsertTab | ( | sc::RefUpdateInsertTabContext & | rCxt, |
SCTAB | nLocalTab = -1 |
||
) |
Definition at line 713 of file rangenam.cxx.
References m_Data.
void ScRangeName::UpdateMoveTab | ( | sc::RefUpdateMoveTabContext & | rCxt, |
SCTAB | nLocalTab = -1 |
||
) |
Definition at line 729 of file rangenam.cxx.
References m_Data.
void ScRangeName::UpdateReference | ( | sc::RefUpdateContext & | rCxt, |
SCTAB | nLocalTab = -1 |
||
) |
Definition at line 701 of file rangenam.cxx.
References m_Data, sc::RefUpdateContext::meMode, and URM_COPY.
Referenced by ScUndoDragDrop::Undo().
Definition at line 737 of file rangenam.cxx.
References m_Data.
|
private |
Definition at line 189 of file rangenam.hxx.
Referenced by begin(), clear(), CompileUnresolvedXML(), CopyUsedNames(), empty(), end(), erase(), findByRange(), findByUpperName(), insert(), operator==(), ScRangeName(), size(), UpdateDeleteTab(), UpdateGrow(), UpdateInsertTab(), UpdateMoveTab(), UpdateReference(), and UpdateTranspose().
|
private |
Definition at line 190 of file rangenam.hxx.
Referenced by clear(), erase(), findByIndex(), insert(), and ScRangeName().