diff options
author | Michael Stahl <mstahl@redhat.com> | 2016-01-12 11:50:32 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-01-12 12:22:33 +0100 |
commit | 79257f615e87dbd140bd8a6bd191cf7f027c137c (patch) | |
tree | 017ffd6a9896f1e3941cf654d6861a99cfdb4b5e | |
parent | be983cfdd1205a02f9ced9b26e79eea5b1d2db44 (diff) |
sc: replace boost::ptr_map with std::map
Change-Id: If254d2e6ae02cb1dfc4c967c1a8d0a1132bb6ad1
-rw-r--r-- | sc/inc/unitconv.hxx | 5 | ||||
-rw-r--r-- | sc/source/core/tool/unitconv.cxx | 8 |
2 files changed, 7 insertions, 6 deletions
diff --git a/sc/inc/unitconv.hxx b/sc/inc/unitconv.hxx index 2afa84dbf04a..607cc5d4e56a 100644 --- a/sc/inc/unitconv.hxx +++ b/sc/inc/unitconv.hxx @@ -21,7 +21,8 @@ #define INCLUDED_SC_INC_UNITCONV_HXX #include <boost/noncopyable.hpp> -#include <boost/ptr_container/ptr_map.hpp> + +#include <map> class ScUnitConverterData { @@ -44,7 +45,7 @@ public: class ScUnitConverter : public boost::noncopyable { - typedef boost::ptr_map<OUString, ScUnitConverterData> MapType; + typedef std::map<OUString, ScUnitConverterData> MapType; MapType maData; public: diff --git a/sc/source/core/tool/unitconv.cxx b/sc/source/core/tool/unitconv.cxx index ef7218490935..c7560bf52661 100644 --- a/sc/source/core/tool/unitconv.cxx +++ b/sc/source/core/tool/unitconv.cxx @@ -103,9 +103,9 @@ ScUnitConverter::ScUnitConverter() pProperties[nIndex++] >>= sToUnit; pProperties[nIndex++] >>= fFactor; - ScUnitConverterData* pNew = new ScUnitConverterData( sFromUnit, sToUnit, fFactor ); - OUString aIndex = pNew->GetIndexString(); - maData.insert(aIndex, pNew); + ScUnitConverterData aNew(sFromUnit, sToUnit, fFactor); + OUString const aIndex = aNew.GetIndexString(); + maData.insert(std::make_pair(aIndex, aNew)); } } } @@ -124,7 +124,7 @@ bool ScUnitConverter::GetValue( return false; } - fValue = it->second->GetValue(); + fValue = it->second.GetValue(); return true; } |