diff --git a/svx/source/svdraw/svdhdl.cxx b/svx/source/svdraw/svdhdl.cxx index 21475b5e3651..df7f36320863 100644 --- a/svx/source/svdraw/svdhdl.cxx +++ b/svx/source/svdraw/svdhdl.cxx @@ -1172,7 +1172,7 @@ void SdrHdlColor::CreateB2dIAObject() Bitmap SdrHdlColor::CreateColorDropper(Color aCol) { // get the Bitmap - VclPtr pWrite(VclPtr::Create()); + ScopedVclPtrInstance pWrite; pWrite->SetOutputSizePixel(m_aMarkerSize); pWrite->SetBackground(aCol); pWrite->Erase(); diff --git a/test/source/screenshot_test.cxx b/test/source/screenshot_test.cxx index 6acec5c04eb1..cedc7ab1d2e0 100644 --- a/test/source/screenshot_test.cxx +++ b/test/source/screenshot_test.cxx @@ -124,7 +124,7 @@ void ScreenshotTest::saveScreenshot(VclAbstractDialog const & rDialog) void ScreenshotTest::saveScreenshot(weld::Window& rDialog) { - VclPtr xDialogSurface(rDialog.screenshot()); + ScopedVclPtr xDialogSurface(rDialog.screenshot()); const Bitmap aScreenshot(xDialogSurface->GetBitmap(Point(), xDialogSurface->GetOutputSizePixel())); if (!aScreenshot.IsEmpty())