Kaydet (Commit) 4a44d51c authored tarafından Kohei Yoshida's avatar Kohei Yoshida

std::auto_ptr is deprecated.

Change-Id: I99f619393abc9e2fa7a38a8176084989d063a9ae
üst 44cfb3c3
...@@ -31,6 +31,8 @@ ...@@ -31,6 +31,8 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include "chartviewdllapi.hxx" #include "chartviewdllapi.hxx"
#include <boost/scoped_ptr.hpp>
namespace chart namespace chart
{ {
...@@ -42,7 +44,7 @@ private: ...@@ -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_xMainDrawPage;
::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > m_xHiddenDrawPage; ::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 //no default constructor
DrawModelWrapper(); DrawModelWrapper();
......
...@@ -107,7 +107,6 @@ DrawModelWrapper::DrawModelWrapper( const uno::Reference<uno::XComponentContext> ...@@ -107,7 +107,6 @@ DrawModelWrapper::DrawModelWrapper( const uno::Reference<uno::XComponentContext>
, m_pChartItemPool(0) , m_pChartItemPool(0)
, m_xMainDrawPage(0) , m_xMainDrawPage(0)
, m_xHiddenDrawPage(0) , m_xHiddenDrawPage(0)
, m_apRefDevice(0)
{ {
m_pChartItemPool = ChartItemPool::CreateChartItemPool(); m_pChartItemPool = ChartItemPool::CreateChartItemPool();
...@@ -163,12 +162,12 @@ DrawModelWrapper::DrawModelWrapper( const uno::Reference<uno::XComponentContext> ...@@ -163,12 +162,12 @@ DrawModelWrapper::DrawModelWrapper( const uno::Reference<uno::XComponentContext>
OutputDevice* pDefaultDevice = rOutliner.GetRefDevice(); OutputDevice* pDefaultDevice = rOutliner.GetRefDevice();
if( !pDefaultDevice ) if( !pDefaultDevice )
pDefaultDevice = Application::GetDefaultDevice(); pDefaultDevice = Application::GetDefaultDevice();
m_apRefDevice = std::auto_ptr< OutputDevice >( new VirtualDevice( *pDefaultDevice ) ); m_pRefDevice.reset(new VirtualDevice(*pDefaultDevice));
MapMode aMapMode = m_apRefDevice->GetMapMode(); MapMode aMapMode = m_pRefDevice->GetMapMode();
aMapMode.SetMapUnit(MAP_100TH_MM); aMapMode.SetMapUnit(MAP_100TH_MM);
m_apRefDevice->SetMapMode(aMapMode); m_pRefDevice->SetMapMode(aMapMode);
SetRefDevice(m_apRefDevice.get()); SetRefDevice(m_pRefDevice.get());
rOutliner.SetRefDevice(m_apRefDevice.get()); rOutliner.SetRefDevice(m_pRefDevice.get());
} }
DrawModelWrapper::~DrawModelWrapper() DrawModelWrapper::~DrawModelWrapper()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment