summaryrefslogtreecommitdiff
path: root/sc/inc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-11-21 05:09:10 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2011-11-23 06:25:33 +0100
commit106f128f359deb1c9553c105eff4bf829fdd9736 (patch)
tree57a563b4e8549de6c88ac5d686b17aa85c8b4361 /sc/inc
parent26c86c78c5eb4b15e6f4fa9074045c97fcb50173 (diff)
ManageNames: make global undo work again with dialog
Diffstat (limited to 'sc/inc')
-rw-r--r--sc/inc/document.hxx1
-rw-r--r--sc/inc/undorangename.hxx15
2 files changed, 7 insertions, 9 deletions
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 3095f0c6cd36..9f29bfe7a7e1 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -466,6 +466,7 @@ public:
*/
SC_DLLPUBLIC void GetAllTabRangeNames(ScRangeName::TabNameCopyMap& rRangeNames) const;
SC_DLLPUBLIC void SetAllTabRangeNames(const ScRangeName::TabNameCopyMap& rRangeNames);
+ SC_DLLPUBLIC void SetAllRangeNames( const boost::ptr_map<rtl::OUString, ScRangeName>& rRangeMap);
void GetTabRangeNameMap(std::map<rtl::OUString, ScRangeName*>& rRangeName);
void GetRangeNameMap(std::map<rtl::OUString, ScRangeName*>& rRangeName);
SC_DLLPUBLIC ScRangeName* GetRangeName(SCTAB nTab) const;
diff --git a/sc/inc/undorangename.hxx b/sc/inc/undorangename.hxx
index 131a404c3edd..f1c1668a7b8b 100644
--- a/sc/inc/undorangename.hxx
+++ b/sc/inc/undorangename.hxx
@@ -31,6 +31,7 @@
#include "undobase.hxx"
#include "rangenam.hxx"
+#include <boost/ptr_container/ptr_map.hpp>
class ScDocShell;
@@ -41,10 +42,8 @@ class ScUndoAllRangeNames : public ScSimpleUndo
{
public:
ScUndoAllRangeNames(ScDocShell* pDocSh,
- const ScRangeName* pOldGlobal,
- const ScRangeName* pNewGlobal,
- const ScRangeName::TabNameCopyMap& rOldLocal,
- const ScRangeName::TabNameCopyMap& rNewLocal);
+ const std::map<rtl::OUString, ScRangeName*>& rOldNames,
+ const boost::ptr_map<rtl::OUString, ScRangeName>& rNewNames);
virtual ~ScUndoAllRangeNames();
@@ -55,13 +54,11 @@ public:
virtual String GetComment() const;
private:
- void DoChange(const ScRangeName& rGlobal, const ScRangeName::TabNameMap& rLocal);
+ void DoChange(const boost::ptr_map<rtl::OUString, ScRangeName*>& rNames);
private:
- ScRangeName maOldGlobalNames;
- ScRangeName maNewGlobalNames;
- ScRangeName::TabNameMap maOldLocalNames;
- ScRangeName::TabNameMap maNewLocalNames;
+ boost::ptr_map<rtl::OUString, ScRangeName> maOldNames;
+ boost::ptr_map<rtl::OUString, ScRangeName> maNewNames;
};
#endif