[Libreoffice-commits] core.git: chart2/source
Kohei Yoshida
kohei.yoshida at collabora.com
Mon Jul 21 21:04:02 PDT 2014
chart2/source/controller/inc/ItemPropertyMap.hxx | 6 ------
chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx | 2 +-
chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx | 3 +--
chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx | 5 +++--
chart2/source/controller/itemsetwrapper/MultipleItemConverter.cxx | 4 ++--
chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx | 2 ++
chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx | 5 +++--
chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx | 5 +++--
8 files changed, 15 insertions(+), 17 deletions(-)
New commits:
commit 7df0cb37a4d39e55dc000b0569a8d2a031e6600b
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Tue Jul 22 00:03:19 2014 -0400
boost::checked_deleter will do.
Change-Id: I952d9dfcffd85aaae49fc1f1eba9ba070900f672
diff --git a/chart2/source/controller/inc/ItemPropertyMap.hxx b/chart2/source/controller/inc/ItemPropertyMap.hxx
index f4de009..d62aa0e 100644
--- a/chart2/source/controller/inc/ItemPropertyMap.hxx
+++ b/chart2/source/controller/inc/ItemPropertyMap.hxx
@@ -67,12 +67,6 @@ private:
bool & m_rOutResult;
};
-struct DeleteItemConverterPtr : public ::std::unary_function< ItemConverter *, void >
-{
- void operator() ( ItemConverter * pConv )
- { delete pConv; }
-};
-
}}
#endif
diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
index 15b06a3..e1c13a1 100644
--- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
@@ -109,7 +109,7 @@ AxisItemConverter::~AxisItemConverter()
delete m_pExplicitScale;
delete m_pExplicitIncrement;
- ::std::for_each( m_aConverters.begin(), m_aConverters.end(), DeleteItemConverterPtr() );
+ ::std::for_each(m_aConverters.begin(), m_aConverters.end(), boost::checked_deleter<ItemConverter>());
}
void AxisItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const
diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
index 2339895..1637858 100644
--- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
@@ -239,8 +239,7 @@ DataPointItemConverter::DataPointItemConverter(
DataPointItemConverter::~DataPointItemConverter()
{
- ::std::for_each( m_aConverters.begin(), m_aConverters.end(),
- DeleteItemConverterPtr() );
+ ::std::for_each(m_aConverters.begin(), m_aConverters.end(), boost::checked_deleter<ItemConverter>());
}
void DataPointItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const
diff --git a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
index f1064f6..561f234 100644
--- a/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/LegendItemConverter.cxx
@@ -33,6 +33,8 @@
#include <functional>
#include <algorithm>
+#include <boost/checked_delete.hpp>
+
using namespace ::com::sun::star;
namespace chart
@@ -59,8 +61,7 @@ LegendItemConverter::LegendItemConverter(
LegendItemConverter::~LegendItemConverter()
{
- ::std::for_each( m_aConverters.begin(), m_aConverters.end(),
- DeleteItemConverterPtr() );
+ ::std::for_each( m_aConverters.begin(), m_aConverters.end(), boost::checked_deleter<ItemConverter>());
}
void LegendItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const
diff --git a/chart2/source/controller/itemsetwrapper/MultipleItemConverter.cxx b/chart2/source/controller/itemsetwrapper/MultipleItemConverter.cxx
index 0a64c31..fd94ccd 100644
--- a/chart2/source/controller/itemsetwrapper/MultipleItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/MultipleItemConverter.cxx
@@ -21,6 +21,7 @@
#include "ItemPropertyMap.hxx"
#include <algorithm>
+#include <boost/checked_delete.hpp>
using namespace ::com::sun::star;
@@ -32,8 +33,7 @@ MultipleItemConverter::MultipleItemConverter( SfxItemPool& rItemPool )
}
MultipleItemConverter::~MultipleItemConverter()
{
- ::std::for_each( m_aConverters.begin(), m_aConverters.end(),
- DeleteItemConverterPtr() );
+ ::std::for_each( m_aConverters.begin(), m_aConverters.end(), boost::checked_deleter<ItemConverter>());
}
void MultipleItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const
diff --git a/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx b/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx
index fc2cc14..7230d94 100644
--- a/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx
@@ -33,6 +33,8 @@
#include <functional>
#include <algorithm>
+#include <boost/checked_delete.hpp>
+
using namespace ::com::sun::star;
namespace
diff --git a/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx b/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx
index d356045..abfd752 100644
--- a/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/RegressionEquationItemConverter.cxx
@@ -32,6 +32,8 @@
#include <functional>
#include <algorithm>
+#include <boost/checked_delete.hpp>
+
using namespace ::com::sun::star;
namespace chart { namespace wrapper {
@@ -67,8 +69,7 @@ RegressionEquationItemConverter::RegressionEquationItemConverter(
RegressionEquationItemConverter::~RegressionEquationItemConverter()
{
- ::std::for_each( m_aConverters.begin(), m_aConverters.end(),
- DeleteItemConverterPtr() );
+ ::std::for_each(m_aConverters.begin(), m_aConverters.end(), boost::checked_deleter<ItemConverter>());
}
void RegressionEquationItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const
diff --git a/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx
index 101d085..613193b 100644
--- a/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/TitleItemConverter.cxx
@@ -32,6 +32,8 @@
#include <functional>
#include <algorithm>
+#include <boost/checked_delete.hpp>
+
using namespace ::com::sun::star;
namespace chart { namespace wrapper {
@@ -125,8 +127,7 @@ TitleItemConverter::TitleItemConverter(
TitleItemConverter::~TitleItemConverter()
{
- ::std::for_each( m_aConverters.begin(), m_aConverters.end(),
- DeleteItemConverterPtr() );
+ ::std::for_each(m_aConverters.begin(), m_aConverters.end(), boost::checked_deleter<ItemConverter>());
}
void TitleItemConverter::FillItemSet( SfxItemSet & rOutItemSet ) const
More information about the Libreoffice-commits
mailing list