remove a few more auto_ptr

Change-Id: I316d5c91bf80ab46f8f29f4986295d48fc4427e7
This commit is contained in:
Markus Mohrhard 2013-09-29 18:36:53 +02:00
parent 00669d5976
commit f77dedbc97
4 changed files with 11 additions and 17 deletions

View File

@ -33,9 +33,6 @@
// header for define RET_OK
#include <vcl/msgbox.hxx>
//for auto_ptr
#include <memory>
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;
}

View File

@ -44,7 +44,6 @@
#include <utility>
#include <vector>
#include <memory>
#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;

View File

@ -23,8 +23,7 @@
#include <sfx2/tabdlg.hxx>
// header for FixedText
#include <vcl/fixed.hxx>
//for auto_ptr
#include <memory>
#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;

View File

@ -26,10 +26,10 @@
#include <svtools/wizardmachine.hxx>
#include <vcl/edit.hxx>
#include <vcl/fixed.hxx>
//for auto_ptr
#include <memory>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <boost/scoped_ptr.hpp>
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;