21 const std::map<OUString, ScRangeName*>& rOldNames,
22 const std::map<OUString, ScRangeName>& rNewNames)
25 for (
const auto& [rName, pRangeName] : rOldNames)
27 m_OldNames.insert(std::make_pair(rName, *pRangeName));
30 for (
auto const& it : rNewNames)
32 m_NewNames.insert(std::make_pair(it.first, it.second));
61 return ScResId(STR_UNDO_RANGENAMES);
131 return ScResId(STR_UNDO_RANGENAMES);
SfxApplication * SfxGetpApp()
const ScDocument & GetDocument() const
SC_DLLPUBLIC void SetAllRangeNames(const std::map< OUString, ScRangeName > &rRangeMap)
SC_DLLPUBLIC void CompileHybridFormula()
Call this immediately after updating named ranges.
SC_DLLPUBLIC void PreprocessAllRangeNamesUpdate(const std::map< OUString, ScRangeName > &rRangeMap)
Call this immediately before updating all named ranges.
SC_DLLPUBLIC ScRangeName * GetRangeName(SCTAB nTab) const
void erase(const ScRangeData &r)
SC_DLLPUBLIC bool insert(ScRangeData *p, bool bReuseFreeIndex=true)
Insert object into set.
std::unique_ptr< ScRangeData > mpRangeData
virtual void Undo() override
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
ScUndoAddRangeData(ScDocShell *pDocSh, const ScRangeData *pRangeData, SCTAB nTab)
virtual ~ScUndoAddRangeData() override
virtual OUString GetComment() const override
virtual void Repeat(SfxRepeatTarget &rTarget) override
virtual void Redo() override
virtual OUString GetComment() const override
virtual void Redo() override
std::map< OUString, ScRangeName > m_NewNames
void DoChange(const std::map< OUString, ScRangeName > &rNames)
virtual ~ScUndoAllRangeNames() override
virtual void Undo() override
ScUndoAllRangeNames(ScDocShell *pDocSh, const std::map< OUString, ScRangeName * > &rOldNames, const std::map< OUString, ScRangeName > &rNewNames)
std::map< OUString, ScRangeName > m_OldNames
virtual bool CanRepeat(SfxRepeatTarget &rTarget) const override
virtual void Repeat(SfxRepeatTarget &rTarget) override
OUString ScResId(TranslateId aId)