fix assorted VirtualDevice GDI handle leaks
Similar to commit e9392c0c86fcf373e00ede92f8ceeee2c7efd233 (fix VirtualDevice GDI handle leaks across IconView callers, 2026-02-21). Change-Id: I5d0566a2d6c7285c6efde5560f13c1efd22cdc55 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199942 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199950 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
This commit is contained in:
@@ -1172,7 +1172,7 @@ void SdrHdlColor::CreateB2dIAObject()
|
||||
Bitmap SdrHdlColor::CreateColorDropper(Color aCol)
|
||||
{
|
||||
// get the Bitmap
|
||||
VclPtr<VirtualDevice> pWrite(VclPtr<VirtualDevice>::Create());
|
||||
ScopedVclPtrInstance<VirtualDevice> pWrite;
|
||||
pWrite->SetOutputSizePixel(m_aMarkerSize);
|
||||
pWrite->SetBackground(aCol);
|
||||
pWrite->Erase();
|
||||
|
||||
@@ -124,7 +124,7 @@ void ScreenshotTest::saveScreenshot(VclAbstractDialog const & rDialog)
|
||||
|
||||
void ScreenshotTest::saveScreenshot(weld::Window& rDialog)
|
||||
{
|
||||
VclPtr<VirtualDevice> xDialogSurface(rDialog.screenshot());
|
||||
ScopedVclPtr<VirtualDevice> xDialogSurface(rDialog.screenshot());
|
||||
const Bitmap aScreenshot(xDialogSurface->GetBitmap(Point(), xDialogSurface->GetOutputSizePixel()));
|
||||
|
||||
if (!aScreenshot.IsEmpty())
|
||||
|
||||
Reference in New Issue
Block a user