diff options
-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() |