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 @@
#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();
......
......@@ -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()
......
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