summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-12-09 14:02:21 +0100
committerMichael Stahl <mstahl@redhat.com>2015-12-15 17:44:34 +0100
commit8522c20c704cdf8345dc0b8f69a8fdf2a75583e2 (patch)
treeb86b8649f3be98dd3b3e0b1f5d221f3457cd2e01
parent7086ed59512f359bc62963202a08d41e2e5ceccb (diff)
sc: replace boost::ptr_map with std::map<std::unique_ptr>
Change-Id: Idabd8facd21efb2da3e46185272d76bce2d0b44c
-rw-r--r--sc/source/core/tool/callform.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/sc/source/core/tool/callform.cxx b/sc/source/core/tool/callform.cxx
index af3cc33e5f0a..d3de9e652b2d 100644
--- a/sc/source/core/tool/callform.cxx
+++ b/sc/source/core/tool/callform.cxx
@@ -26,7 +26,6 @@
#include <osl/file.hxx>
#include <unotools/transliterationwrapper.hxx>
#include <o3tl/make_unique.hxx>
-#include <boost/ptr_container/ptr_map.hpp>
#include <memory>
#include "callform.hxx"
@@ -125,8 +124,8 @@ namespace {
class ModuleCollection
{
- typedef boost::ptr_map<OUString, ModuleData> MapType;
- MapType maData;
+ typedef std::map<OUString, std::unique_ptr<ModuleData>> MapType;
+ MapType m_Data;
public:
ModuleCollection() {}
@@ -137,8 +136,8 @@ public:
const ModuleData* ModuleCollection::findByName(const OUString& rName) const
{
- MapType::const_iterator it = maData.find(rName);
- return it == maData.end() ? nullptr : it->second;
+ MapType::const_iterator it = m_Data.find(rName);
+ return it == m_Data.end() ? nullptr : it->second.get();
}
void ModuleCollection::insert(ModuleData* pNew)
@@ -147,12 +146,12 @@ void ModuleCollection::insert(ModuleData* pNew)
return;
OUString aName = pNew->GetName();
- maData.insert(aName, pNew);
+ m_Data.insert(std::make_pair(aName, std::unique_ptr<ModuleData>(pNew)));
}
void ModuleCollection::clear()
{
- maData.clear();
+ m_Data.clear();
}
ModuleCollection aModuleCollection;