diff options
Diffstat (limited to 'chart2/source/view/main/DrawModelWrapper.cxx')
-rw-r--r-- | chart2/source/view/main/DrawModelWrapper.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chart2/source/view/main/DrawModelWrapper.cxx b/chart2/source/view/main/DrawModelWrapper.cxx index d917ee16aadd..c9c1ba2930da 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 = VclPtr<VirtualDevice>::Create(*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 |