summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/inc/unitconv.hxx5
-rw-r--r--sc/source/core/tool/unitconv.cxx8
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;
}