diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-09-03 22:21:02 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-09-03 23:21:35 -0400 |
commit | 4a44d51c999769bd548cf2d9b7d8f844e1ae1ae9 (patch) | |
tree | 95f7695fcf5d558e19fd2f5a6c67ba9afe66ef3e /chart2 | |
parent | 44cfb3c3bcb5a84191d3935b1def9e09d7ba3ab3 (diff) |
std::auto_ptr is deprecated.
Change-Id: I99f619393abc9e2fa7a38a8176084989d063a9ae
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/inc/chartview/DrawModelWrapper.hxx | 4 | ||||
-rw-r--r-- | chart2/source/view/main/DrawModelWrapper.cxx | 11 |
2 files changed, 8 insertions, 7 deletions
diff --git a/chart2/source/inc/chartview/DrawModelWrapper.hxx b/chart2/source/inc/chartview/DrawModelWrapper.hxx index dc612dc08884..d58714c31adc 100644 --- a/chart2/source/inc/chartview/DrawModelWrapper.hxx +++ b/chart2/source/inc/chartview/DrawModelWrapper.hxx @@ -31,6 +31,8 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include "chartviewdllapi.hxx" +#include <boost/scoped_ptr.hpp> + namespace chart { @@ -42,7 +44,7 @@ private: ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > m_xMainDrawPage; ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > m_xHiddenDrawPage; - std::auto_ptr< OutputDevice > m_apRefDevice; + boost::scoped_ptr<OutputDevice> m_pRefDevice; //no default constructor DrawModelWrapper(); diff --git a/chart2/source/view/main/DrawModelWrapper.cxx b/chart2/source/view/main/DrawModelWrapper.cxx index 2f6606acf8cc..c5ad39d15bf6 100644 --- a/chart2/source/view/main/DrawModelWrapper.cxx +++ b/chart2/source/view/main/DrawModelWrapper.cxx @@ -107,7 +107,6 @@ DrawModelWrapper::DrawModelWrapper( const uno::Reference<uno::XComponentContext> , m_pChartItemPool(0) , m_xMainDrawPage(0) , m_xHiddenDrawPage(0) - , m_apRefDevice(0) { m_pChartItemPool = ChartItemPool::CreateChartItemPool(); @@ -163,12 +162,12 @@ DrawModelWrapper::DrawModelWrapper( const uno::Reference<uno::XComponentContext> OutputDevice* pDefaultDevice = rOutliner.GetRefDevice(); if( !pDefaultDevice ) pDefaultDevice = Application::GetDefaultDevice(); - m_apRefDevice = std::auto_ptr< OutputDevice >( new VirtualDevice( *pDefaultDevice ) ); - MapMode aMapMode = m_apRefDevice->GetMapMode(); + m_pRefDevice.reset(new VirtualDevice(*pDefaultDevice)); + MapMode aMapMode = m_pRefDevice->GetMapMode(); aMapMode.SetMapUnit(MAP_100TH_MM); - m_apRefDevice->SetMapMode(aMapMode); - SetRefDevice(m_apRefDevice.get()); - rOutliner.SetRefDevice(m_apRefDevice.get()); + m_pRefDevice->SetMapMode(aMapMode); + SetRefDevice(m_pRefDevice.get()); + rOutliner.SetRefDevice(m_pRefDevice.get()); } DrawModelWrapper::~DrawModelWrapper() |