From 79257f615e87dbd140bd8a6bd191cf7f027c137c Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Tue, 12 Jan 2016 11:50:32 +0100 Subject: sc: replace boost::ptr_map with std::map Change-Id: If254d2e6ae02cb1dfc4c967c1a8d0a1132bb6ad1 --- sc/inc/unitconv.hxx | 5 +++-- 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 -#include + +#include class ScUnitConverterData { @@ -44,7 +45,7 @@ public: class ScUnitConverter : public boost::noncopyable { - typedef boost::ptr_map MapType; + typedef std::map 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; } -- cgit