From f77dedbc97cdddcc0c6dec2e8721049e9041b72f Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Sun, 29 Sep 2013 18:36:53 +0200 Subject: [PATCH] remove a few more auto_ptr Change-Id: I316d5c91bf80ab46f8f29f4986295d48fc4427e7 --- chart2/source/controller/dialogs/tp_ChartType.cxx | 12 ++++-------- chart2/source/controller/dialogs/tp_DataSource.hxx | 3 +-- .../source/controller/dialogs/tp_LegendPosition.hxx | 5 ++--- .../dialogs/tp_Wizard_TitlesAndObjects.hxx | 8 ++++---- 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx index cdc63da44bc1..cb5311bf939f 100644 --- a/chart2/source/controller/dialogs/tp_ChartType.cxx +++ b/chart2/source/controller/dialogs/tp_ChartType.cxx @@ -33,9 +33,6 @@ // header for define RET_OK #include -//for auto_ptr -#include - namespace chart { using namespace ::com::sun::star; @@ -605,15 +602,14 @@ private: FixedText m_aFT_LineType; ListBox m_aLB_LineType; PushButton m_aPB_DetailsDialog; - ::std::auto_ptr< SplinePropertiesDialog > m_pSplinePropertiesDialog; - ::std::auto_ptr< SteppedPropertiesDialog > m_pSteppedPropertiesDialog; + boost::scoped_ptr< SplinePropertiesDialog > m_pSplinePropertiesDialog; + boost::scoped_ptr< SteppedPropertiesDialog > m_pSteppedPropertiesDialog; }; SplineResourceGroup::SplineResourceGroup( Window* pWindow ) : ChangingResource() , m_aFT_LineType( pWindow, SchResId( FT_LINETYPE ) ) , m_aLB_LineType( pWindow, SchResId( LB_LINETYPE ) ) , m_aPB_DetailsDialog( pWindow, SchResId( PB_SPLINE_DIALOG ) ) - , m_pSplinePropertiesDialog() { m_aLB_LineType.InsertEntry(SCH_RESSTR(STR_LINETYPE_STRAIGHT)); m_aLB_LineType.InsertEntry(SCH_RESSTR(STR_LINETYPE_SMOOTH)); @@ -640,14 +636,14 @@ SplineResourceGroup::~SplineResourceGroup() SplinePropertiesDialog& SplineResourceGroup::getSplinePropertiesDialog() { if( !m_pSplinePropertiesDialog.get() ) - m_pSplinePropertiesDialog = ::std::auto_ptr< SplinePropertiesDialog >( new SplinePropertiesDialog( m_aPB_DetailsDialog.GetParent() ) ); + m_pSplinePropertiesDialog.reset( new SplinePropertiesDialog( m_aPB_DetailsDialog.GetParent() ) ); return *m_pSplinePropertiesDialog; } SteppedPropertiesDialog& SplineResourceGroup::getSteppedPropertiesDialog() { if( !m_pSteppedPropertiesDialog.get() ) { - m_pSteppedPropertiesDialog = ::std::auto_ptr< SteppedPropertiesDialog >( new SteppedPropertiesDialog( m_aPB_DetailsDialog.GetParent() ) ); + m_pSteppedPropertiesDialog.reset( new SteppedPropertiesDialog( m_aPB_DetailsDialog.GetParent() ) ); } return *m_pSteppedPropertiesDialog; } diff --git a/chart2/source/controller/dialogs/tp_DataSource.hxx b/chart2/source/controller/dialogs/tp_DataSource.hxx index c83e86cdd773..2fcdecea30f9 100644 --- a/chart2/source/controller/dialogs/tp_DataSource.hxx +++ b/chart2/source/controller/dialogs/tp_DataSource.hxx @@ -44,7 +44,6 @@ #include #include -#include #include "RangeSelectionListener.hxx" #include "RangeSelectionButton.hxx" @@ -129,7 +128,7 @@ protected: private: FixedText m_aFT_CAPTION; FixedText m_aFT_SERIES; - ::std::auto_ptr< SvTreeListBox > m_apLB_SERIES; + boost::scoped_ptr< SvTreeListBox > m_apLB_SERIES; PushButton m_aBTN_ADD; PushButton m_aBTN_REMOVE; PushButton m_aBTN_UP; diff --git a/chart2/source/controller/dialogs/tp_LegendPosition.hxx b/chart2/source/controller/dialogs/tp_LegendPosition.hxx index 7715cd8d4d45..1258880c4290 100644 --- a/chart2/source/controller/dialogs/tp_LegendPosition.hxx +++ b/chart2/source/controller/dialogs/tp_LegendPosition.hxx @@ -23,8 +23,7 @@ #include // header for FixedText #include -//for auto_ptr -#include + #include "TextDirectionListBox.hxx" namespace chart @@ -36,7 +35,7 @@ class SchLegendPosTabPage : public SfxTabPage private: FixedLine aGrpLegend; - ::std::auto_ptr< LegendPositionResources > m_apLegendPositionResources; + boost::scoped_ptr< LegendPositionResources > m_apLegendPositionResources; FixedLine m_aFlTextOrient; FixedText m_aFtTextDirection; diff --git a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx index 753b603e1506..d73aaff9eddd 100644 --- a/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx +++ b/chart2/source/controller/dialogs/tp_Wizard_TitlesAndObjects.hxx @@ -26,10 +26,10 @@ #include #include #include -//for auto_ptr -#include #include +#include + namespace chart { @@ -59,8 +59,8 @@ protected: FixedText m_aFT_TitleDescription; FixedLine m_aFL_Vertical; - ::std::auto_ptr< TitleResources > m_apTitleResources; - ::std::auto_ptr< LegendPositionResources > m_apLegendPositionResources; + boost::scoped_ptr< TitleResources > m_apTitleResources; + boost::scoped_ptr< LegendPositionResources > m_apLegendPositionResources; FixedLine m_aFL_Grids; CheckBox m_aCB_Grid_X;