summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/inc/chartview/DrawModelWrapper.hxx2
-rw-r--r--chart2/source/view/main/DrawModelWrapper.cxx4
2 files changed, 4 insertions, 2 deletions
diff --git a/chart2/source/inc/chartview/DrawModelWrapper.hxx b/chart2/source/inc/chartview/DrawModelWrapper.hxx
index 986a6b993eb8..0e590a67891e 100644
--- a/chart2/source/inc/chartview/DrawModelWrapper.hxx
+++ b/chart2/source/inc/chartview/DrawModelWrapper.hxx
@@ -41,7 +41,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;
- boost::scoped_ptr<OutputDevice> m_pRefDevice;
+ VclPtr<OutputDevice> m_pRefDevice;
//no default constructor
DrawModelWrapper();
diff --git a/chart2/source/view/main/DrawModelWrapper.cxx b/chart2/source/view/main/DrawModelWrapper.cxx
index d917ee16aadd..c65af686aba3 100644
--- a/chart2/source/view/main/DrawModelWrapper.cxx
+++ b/chart2/source/view/main/DrawModelWrapper.cxx
@@ -150,7 +150,8 @@ DrawModelWrapper::DrawModelWrapper( const uno::Reference<uno::XComponentContext>
OutputDevice* pDefaultDevice = rOutliner.GetRefDevice();
if( !pDefaultDevice )
pDefaultDevice = Application::GetDefaultDevice();
- m_pRefDevice.reset(new VirtualDevice(*pDefaultDevice));
+ m_pRefDevice.disposeAndClear();
+ m_pRefDevice = new VirtualDevice(*pDefaultDevice);
MapMode aMapMode = m_pRefDevice->GetMapMode();
aMapMode.SetMapUnit(MAP_100TH_MM);
m_pRefDevice->SetMapMode(aMapMode);
@@ -176,6 +177,7 @@ DrawModelWrapper::~DrawModelWrapper()
}
SfxItemPool::Free(m_pChartItemPool);
}
+ m_pRefDevice.disposeAndClear();
}
uno::Reference< uno::XInterface > DrawModelWrapper