summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-01-12 11:51:52 +0100
committerMichael Stahl <mstahl@redhat.com>2016-01-12 12:22:34 +0100
commite10f7dd302a0cd42cc6fce3972f32bfb7aa33349 (patch)
tree879b769cfdad15c60863e514c974e00e1a808cd3
parent9ec53cce39f8b337cf6f4b9dd381d1e7ff7b02a2 (diff)
sc: replace boost::ptr_map with std::map<std::unique_ptr>
Change-Id: I2fbce996afcd7d1dabd7c540272d8877d034cf14
-rw-r--r--sc/source/ui/docshell/docfuncutil.cxx6
-rw-r--r--sc/source/ui/inc/undobase.hxx5
2 files changed, 7 insertions, 4 deletions
diff --git a/sc/source/ui/docshell/docfuncutil.cxx b/sc/source/ui/docshell/docfuncutil.cxx
index 3c71dc53f05e..86d82d910bd1 100644
--- a/sc/source/ui/docshell/docfuncutil.cxx
+++ b/sc/source/ui/docshell/docfuncutil.cxx
@@ -24,6 +24,8 @@
#include <global.hxx>
#include <undoblk.hxx>
+#include <o3tl/make_unique.hxx>
+
#include <memory>
#include <utility>
@@ -99,11 +101,11 @@ std::unique_ptr<ScSimpleUndo::DataSpansType> DocFuncUtil::getNonEmptyCellSpans(
SCROW nRow1 = rRange.aStart.Row(), nRow2 = rRange.aEnd.Row();
std::pair<ScSimpleUndo::DataSpansType::iterator,bool> r =
- pDataSpans->insert(nTab, new sc::ColumnSpanSet(false));
+ pDataSpans->insert(std::make_pair(nTab, o3tl::make_unique<sc::ColumnSpanSet>(false)));
if (r.second)
{
- sc::ColumnSpanSet* pSet = r.first->second;
+ sc::ColumnSpanSet *const pSet = r.first->second.get();
pSet->scan(rDoc, nTab, nCol1, nRow1, nCol2, nRow2, true);
}
}
diff --git a/sc/source/ui/inc/undobase.hxx b/sc/source/ui/inc/undobase.hxx
index f501f5b305b5..b81af2091f3b 100644
--- a/sc/source/ui/inc/undobase.hxx
+++ b/sc/source/ui/inc/undobase.hxx
@@ -26,7 +26,8 @@
#include "docsh.hxx"
#include <columnspanset.hxx>
-#include <boost/ptr_container/ptr_map.hpp>
+#include <memory>
+#include <map>
class ScDocument;
class ScDocShell;
@@ -39,7 +40,7 @@ class ScSimpleUndo: public SfxUndoAction
ScSimpleUndo(const ScSimpleUndo&) = delete;
public:
- typedef boost::ptr_map<SCTAB,sc::ColumnSpanSet> DataSpansType;
+ typedef std::map<SCTAB, std::unique_ptr<sc::ColumnSpanSet>> DataSpansType;
ScSimpleUndo( ScDocShell* pDocSh );
virtual ~ScSimpleUndo();