Kaydet (Commit) 79257f61 authored tarafından Michael Stahl's avatar Michael Stahl

sc: replace boost::ptr_map with std::map

Change-Id: If254d2e6ae02cb1dfc4c967c1a8d0a1132bb6ad1
üst be983cfd
......@@ -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:
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment