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

chart2: replace boost::ptr_map with std::map

Change-Id: Id647a5b681e10defd944ccb2ec8509689df704af
üst 25ad18c1
......@@ -35,8 +35,8 @@
#include <memory>
#include <vector>
#include <map>
#include <boost/noncopyable.hpp>
#include <boost/ptr_container/ptr_map.hpp>
namespace chart
{
......@@ -206,7 +206,7 @@ private: //member
VDataSequence* m_pValueSequenceForDataLabelNumberFormatDetection;
boost::ptr_map<OUString, VDataSequence> maPropertyMap;
std::map<OUString, VDataSequence> m_PropertyMap;
mutable double m_fXMeanValue;
mutable double m_fYMeanValue;
......
......@@ -229,9 +229,9 @@ VDataSeries::VDataSeries( const uno::Reference< XDataSeries >& xDataSeries )
m_aValues_Bubble_Size.init( xDataSequence );
else
{
VDataSequence* pSequence = new VDataSequence();
pSequence->init( xDataSequence );
maPropertyMap.insert(aRole, pSequence);
VDataSequence aSequence;
aSequence.init(xDataSequence);
m_PropertyMap.insert(std::make_pair(aRole, aSequence));
}
}
catch( const uno::Exception& e )
......@@ -1087,7 +1087,7 @@ VDataSeries* VDataSeries::createCopyForTimeBased() const
pNew->m_aValues_Y_First = m_aValues_Y_First;
pNew->m_aValues_Y_Last = m_aValues_Y_Last;
pNew->m_aValues_Bubble_Size = m_aValues_Bubble_Size;
pNew->maPropertyMap = maPropertyMap;
pNew->m_PropertyMap = m_PropertyMap;
pNew->m_nPointCount = m_nPointCount;
......@@ -1096,16 +1096,15 @@ VDataSeries* VDataSeries::createCopyForTimeBased() const
double VDataSeries::getValueByProperty( sal_Int32 nIndex, const OUString& rPropName ) const
{
boost::ptr_map<OUString, VDataSequence>::const_iterator itr =
maPropertyMap.find(rPropName);
if(itr == maPropertyMap.end())
auto const itr = m_PropertyMap.find(rPropName);
if (itr == m_PropertyMap.end())
{
double fNan;
::rtl::math::setNan( &fNan );
return fNan;
}
const VDataSequence* pData = itr->second;
const VDataSequence* pData = &itr->second;
double fValue = pData->getValue(nIndex);
if(mpOldSeries && mpOldSeries->hasPropertyMapping(rPropName))
{
......@@ -1129,7 +1128,7 @@ double VDataSeries::getValueByProperty( sal_Int32 nIndex, const OUString& rPropN
bool VDataSeries::hasPropertyMapping(const OUString& rPropName ) const
{
return maPropertyMap.find(rPropName) != maPropertyMap.end();
return m_PropertyMap.find(rPropName) != m_PropertyMap.end();
}
} //namespace chart
......
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