some more auto_ptr -> scoped_ptr in chart2

This commit is contained in:
Markus Mohrhard 2012-03-06 02:30:55 +01:00
parent e319053190
commit db5cdd9cb2
7 changed files with 14 additions and 10 deletions

View File

@ -34,6 +34,7 @@
#include "macros.hxx"
#include <memory>
#include <boost/scoped_ptr.hpp>
//.............................................................................
namespace chart
@ -167,7 +168,7 @@ void VAxisBase::setExplicitScaleAndIncrement(
void VAxisBase::createAllTickInfos( ::std::vector< ::std::vector< TickInfo > >& rAllTickInfos )
{
std::auto_ptr< TickFactory > apTickFactory( this->createTickFactory() );
boost::scoped_ptr< TickFactory > apTickFactory( this->createTickFactory() );
if( m_aScale.ShiftedCategoryPosition )
apTickFactory->getAllTicksShifted( rAllTickInfos );
else

View File

@ -38,7 +38,7 @@
#include <com/sun/star/drawing/LineStyle.hpp>
#include <vector>
#include <memory>
#include <boost/scoped_ptr.hpp>
//.............................................................................
namespace chart
@ -229,7 +229,7 @@ void VCartesianGrid::createShapes()
//-----------------------------------------
//create all scaled tickmark values
std::auto_ptr< TickFactory > apTickFactory( this->createTickFactory() );
boost::scoped_ptr< TickFactory > apTickFactory( this->createTickFactory() );
TickFactory& aTickFactory = *apTickFactory.get();
::std::vector< ::std::vector< TickInfo > > aAllTickInfos;
aTickFactory.getAllTicks( aAllTickInfos );

View File

@ -259,7 +259,7 @@ void VCoordinateSystem::impl_adjustDimensionAndIndex( sal_Int32& rDimensionIndex
void VCoordinateSystem::setExplicitCategoriesProvider( ExplicitCategoriesProvider* pExplicitCategoriesProvider /*takes ownership*/ )
{
m_apExplicitCategoriesProvider = ::std::auto_ptr< ExplicitCategoriesProvider >(pExplicitCategoriesProvider);
m_apExplicitCategoriesProvider.reset(pExplicitCategoriesProvider);
}
ExplicitCategoriesProvider* VCoordinateSystem::getExplicitCategoriesProvider()

View File

@ -36,7 +36,7 @@
#include "PolarLabelPositionHelper.hxx"
#include <tools/color.hxx>
#include <memory>
#include <boost/scoped_ptr.hpp>
//.............................................................................
namespace chart
@ -182,7 +182,7 @@ void VPolarAngleAxis::createLabels()
{
//-----------------------------------------
//get the transformed screen values for all tickmarks in aAllTickInfos
std::auto_ptr< TickFactory > apTickFactory( this->createTickFactory() );
boost::scoped_ptr< TickFactory > apTickFactory( this->createTickFactory() );
//create tick mark text shapes
//@todo: iterate through all tick depth wich should be labeled

View File

@ -33,7 +33,7 @@
#include "Tickmarks.hxx"
#include "ShapeFactory.hxx"
#include <memory>
#include <boost/scoped_ptr.hpp>
//.............................................................................
namespace chart

View File

@ -43,6 +43,8 @@
#include <com/sun/star/container/XChild.hpp>
#include <rtl/math.hxx>
#include <boost/scoped_ptr.hpp>
//.............................................................................
namespace chart
{
@ -429,11 +431,11 @@ void PieChart::createShapes()
//---------------------------
//point color:
std::auto_ptr< tPropertyNameValueMap > apOverwritePropertiesMap(0);
boost::scoped_ptr< tPropertyNameValueMap > apOverwritePropertiesMap(NULL);
{
if(!pSeries->hasPointOwnColor(nPointIndex) && m_xColorScheme.is())
{
apOverwritePropertiesMap = std::auto_ptr< tPropertyNameValueMap >( new tPropertyNameValueMap() );
apOverwritePropertiesMap.reset( new tPropertyNameValueMap() );
(*apOverwritePropertiesMap)[C2U("FillColor")] = uno::makeAny(
m_xColorScheme->getColorByIndex( nPointIndex ));
}

View File

@ -45,6 +45,7 @@
#include<map>
#include <vector>
#include <boost/shared_ptr.hpp>
#include <boost/scoped_ptr.hpp>
//.............................................................................
namespace chart
@ -201,7 +202,7 @@ private:
tFullExplicitScaleMap m_aSecondaryExplicitScales;
tFullExplicitIncrementMap m_aSecondaryExplicitIncrements;
::std::auto_ptr< ExplicitCategoriesProvider > m_apExplicitCategoriesProvider;
boost::scoped_ptr< ExplicitCategoriesProvider > m_apExplicitCategoriesProvider;
};
//.............................................................................