diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-09-29 18:27:20 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-09-29 20:26:06 +0200 |
commit | 00669d59762347d1ccdc34be0fa15cf8444715ef (patch) | |
tree | 8890a474a392a370ec9e985b4508261e80688bb2 /chart2 | |
parent | e880a88834e2a34163ece6eb4ca62d8244d6155c (diff) |
replace some auto_ptr with boost::scoped_ptr in chart2
Change-Id: I45abfdee2e4a4e51d2066afc867e730008579814
Diffstat (limited to 'chart2')
7 files changed, 18 insertions, 18 deletions
diff --git a/chart2/source/controller/dialogs/DataBrowser.hxx b/chart2/source/controller/dialogs/DataBrowser.hxx index 31f471e38268..ee3b0a0a4b46 100644 --- a/chart2/source/controller/dialogs/DataBrowser.hxx +++ b/chart2/source/controller/dialogs/DataBrowser.hxx @@ -28,6 +28,7 @@ #include <vector> #include <memory> #include <boost/shared_ptr.hpp> +#include <boost/scoped_ptr.hpp> namespace com { namespace sun { namespace star { namespace chart2 { @@ -152,7 +153,7 @@ public: private: ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > m_xChartDoc; - ::std::auto_ptr< DataBrowserModel > m_apDataBrowserModel; + boost::scoped_ptr< DataBrowserModel > m_apDataBrowserModel; typedef ::std::vector< ::boost::shared_ptr< impl::SeriesHeader > > tSeriesHeaderContainer; tSeriesHeaderContainer m_aSeriesHeaders; diff --git a/chart2/source/controller/dialogs/DataBrowserModel.hxx b/chart2/source/controller/dialogs/DataBrowserModel.hxx index 62e3e2ff1af0..51086e2bc883 100644 --- a/chart2/source/controller/dialogs/DataBrowserModel.hxx +++ b/chart2/source/controller/dialogs/DataBrowserModel.hxx @@ -25,6 +25,8 @@ #include <memory> #include <vector> +#include <boost/scoped_ptr.hpp> + namespace com { namespace sun { namespace star { namespace chart2 { class XDataSeries; class XChartType; @@ -155,7 +157,7 @@ private: ::com::sun::star::chart2::XChartDocument > m_xChartDocument; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; - ::std::auto_ptr< DialogModel > m_apDialogModel; + boost::scoped_ptr< DialogModel > m_apDialogModel; struct tDataColumn; struct implColumnLess; diff --git a/chart2/source/controller/dialogs/TimerTriggeredControllerLock.cxx b/chart2/source/controller/dialogs/TimerTriggeredControllerLock.cxx index a4c4a55ee684..42e2e09c17ab 100644 --- a/chart2/source/controller/dialogs/TimerTriggeredControllerLock.cxx +++ b/chart2/source/controller/dialogs/TimerTriggeredControllerLock.cxx @@ -43,7 +43,7 @@ TimerTriggeredControllerLock::~TimerTriggeredControllerLock() void TimerTriggeredControllerLock::startTimer() { if(!m_apControllerLockGuard.get()) - m_apControllerLockGuard = std::auto_ptr< ControllerLockGuard >( new ControllerLockGuard(m_xModel) ); + m_apControllerLockGuard.reset( new ControllerLockGuard(m_xModel) ); m_aTimer.Start(); } IMPL_LINK_NOARG(TimerTriggeredControllerLock, TimerTimeout) diff --git a/chart2/source/controller/dialogs/TitleDialogData.cxx b/chart2/source/controller/dialogs/TitleDialogData.cxx index f015394cc7bf..1a918b44797c 100644 --- a/chart2/source/controller/dialogs/TitleDialogData.cxx +++ b/chart2/source/controller/dialogs/TitleDialogData.cxx @@ -27,11 +27,11 @@ namespace chart using namespace ::com::sun::star; using namespace ::com::sun::star::chart2; -TitleDialogData::TitleDialogData( ::std::auto_ptr< ReferenceSizeProvider > apRefSizeProvider ) +TitleDialogData::TitleDialogData( ReferenceSizeProvider* pRefSizeProvider ) : aPossibilityList(7) , aExistenceList(7) , aTextList(7) - , apReferenceSizeProvider( apRefSizeProvider ) + , apReferenceSizeProvider( pRefSizeProvider ) { sal_Int32 nN = 0; for(nN=7;nN--;) diff --git a/chart2/source/controller/inc/TimerTriggeredControllerLock.hxx b/chart2/source/controller/inc/TimerTriggeredControllerLock.hxx index d356671964ad..7387bc43a0da 100644 --- a/chart2/source/controller/inc/TimerTriggeredControllerLock.hxx +++ b/chart2/source/controller/inc/TimerTriggeredControllerLock.hxx @@ -24,6 +24,7 @@ #include <com/sun/star/frame/XModel.hpp> #include <memory> +#include <boost/scoped_ptr.hpp> namespace chart { @@ -39,8 +40,8 @@ public: private: ::com::sun::star::uno::Reference< - ::com::sun::star::frame::XModel > m_xModel; - std::auto_ptr< ControllerLockGuard > m_apControllerLockGuard; + ::com::sun::star::frame::XModel > m_xModel; + boost::scoped_ptr< ControllerLockGuard > m_apControllerLockGuard; AutoTimer m_aTimer; DECL_LINK( TimerTimeout, void* ); diff --git a/chart2/source/controller/inc/TitleDialogData.hxx b/chart2/source/controller/inc/TitleDialogData.hxx index ea1e3cb80960..4fb158c63332 100644 --- a/chart2/source/controller/inc/TitleDialogData.hxx +++ b/chart2/source/controller/inc/TitleDialogData.hxx @@ -24,6 +24,7 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <memory> +#include <boost/scoped_ptr.hpp> namespace chart { @@ -36,14 +37,9 @@ struct TitleDialogData ::com::sun::star::uno::Sequence< sal_Bool > aPossibilityList; ::com::sun::star::uno::Sequence< sal_Bool > aExistenceList; ::com::sun::star::uno::Sequence< OUString > aTextList; - SAL_WNODEPRECATED_DECLARATIONS_PUSH - ::std::auto_ptr< ReferenceSizeProvider > apReferenceSizeProvider; - SAL_WNODEPRECATED_DECLARATIONS_PUSH - - SAL_WNODEPRECATED_DECLARATIONS_PUSH - TitleDialogData( ::std::auto_ptr< ReferenceSizeProvider > apRefSizeProvider = - ::std::auto_ptr< ReferenceSizeProvider >( 0 )); - SAL_WNODEPRECATED_DECLARATIONS_POP + boost::scoped_ptr< ReferenceSizeProvider > apReferenceSizeProvider; + + TitleDialogData(ReferenceSizeProvider* pReferenzeSizeProvider = NULL); void readFromModel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel ); /* return true if anything has changed; diff --git a/chart2/source/controller/main/ChartController_Insert.cxx b/chart2/source/controller/main/ChartController_Insert.cxx index ee1498c48114..4313502349c2 100644 --- a/chart2/source/controller/main/ChartController_Insert.cxx +++ b/chart2/source/controller/main/ChartController_Insert.cxx @@ -121,7 +121,7 @@ void ChartController::executeDispatch_InsertAxes() InsertAxisOrGridDialogData aDialogOutput; aDlg.getResult( aDialogOutput ); - ::std::auto_ptr< ReferenceSizeProvider > mpRefSizeProvider( + boost::scoped_ptr< ReferenceSizeProvider > mpRefSizeProvider( impl_createReferenceSizeProvider()); bool bChanged = AxisHelper::changeVisibilityOfAxes( xDiagram , aDialogInput.aExistenceList, aDialogOutput.aExistenceList, m_xCC @@ -188,7 +188,7 @@ void ChartController::executeDispatch_InsertTitles() { // lock controllers till end of block ControllerLockGuard aCLGuard( getModel() ); - TitleDialogData aDialogOutput( impl_createReferenceSizeProvider()); + TitleDialogData aDialogOutput( impl_createReferenceSizeProvider().release()); aDlg.getResult( aDialogOutput ); bool bChanged = aDialogOutput.writeDifferenceToModel( getModel(), m_xCC, &aDialogInput ); if( bChanged ) @@ -730,7 +730,7 @@ void ChartController::executeDispatch_InsertAxisTitle() else eTitleType = TitleHelper::Z_AXIS_TITLE; - ::std::auto_ptr< ReferenceSizeProvider > apRefSizeProvider( impl_createReferenceSizeProvider()); + boost::scoped_ptr< ReferenceSizeProvider > apRefSizeProvider( impl_createReferenceSizeProvider()); xTitle = TitleHelper::createTitle( eTitleType, ObjectNameProvider::getTitleNameByType(eTitleType), getModel(), m_xCC, apRefSizeProvider.get() ); aUndoGuard.commit(); } |