include/svtools/ctrlbox.hxx        |    2 +-
 starmath/inc/dialog.hxx            |    2 +-
 svtools/source/control/ctrlbox.cxx |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 71fc8ebcaa88b2720a520a3fbe2c12debacbce39
Author:     Mike Kaganski <[email protected]>
AuthorDate: Sat Feb 21 18:41:05 2026 +0500
Commit:     Caolán McNamara <[email protected]>
CommitDate: Fri Feb 27 13:14:17 2026 +0100

    fix VirtualDevice GDI handle leaks in SvtLineListBox
    
    Similar to commit e9392c0c86fcf373e00ede92f8ceeee2c7efd233 (fix
    VirtualDevice GDI handle leaks across IconView callers, 2026-02-21).
    
    Change-Id: I589a964251bef801964c98c0202483cd237540b8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199938
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Andras Timar <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200600
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx
index 01371ab570a9..b5b2d31d700b 100644
--- a/include/svtools/ctrlbox.hxx
+++ b/include/svtools/ctrlbox.hxx
@@ -257,7 +257,7 @@ private:
     void            UpdateEntries();
 
     void UpdatePreview();
-    static VclPtr<VirtualDevice> GetVirtualDevice(const Bitmap& rBmp);
+    static ScopedVclPtr<VirtualDevice> GetVirtualDevice(const Bitmap& rBmp);
     ImpLineListData* getBorderLineData(sal_Int32 nId);
 
                     SvtLineListBox( const SvtLineListBox& ) = delete;
diff --git a/svtools/source/control/ctrlbox.cxx 
b/svtools/source/control/ctrlbox.cxx
index 34f8f79b8498..0dda0202b6c7 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -1637,7 +1637,7 @@ void SvtLineListBox::UpdateEntries()
                 pData->GetColorDist(aColor, aFieldColor),
                 pData->GetStyle(), aBmp );
         sal_Int16 nPos = static_cast<sal_Int16>(pData->GetStyle());
-        VclPtr<VirtualDevice> pVDev = GetVirtualDevice(aBmp);
+        auto pVDev = GetVirtualDevice(aBmp);
         Bitmap aPreview = pVDev->GetBitmap(Point(0,0), 
pVDev->GetOutputSizePixel());
 
         OUString sId = OUString::number(nPos + 1);
@@ -1648,7 +1648,7 @@ void SvtLineListBox::UpdateEntries()
     }
 }
 
-VclPtr<VirtualDevice> SvtLineListBox::GetVirtualDevice(const Bitmap& rBmp)
+ScopedVclPtr<VirtualDevice> SvtLineListBox::GetVirtualDevice(const Bitmap& 
rBmp)
 {
     constexpr tools::Long nMarginTopBottom = 5;
     constexpr tools::Long nMarginLeftRight = 2;
commit 2e4bfdaf93697dd79197a2efb8ec31801449f006
Author:     Mike Kaganski <[email protected]>
AuthorDate: Sat Feb 21 18:37:35 2026 +0500
Commit:     Caolán McNamara <[email protected]>
CommitDate: Fri Feb 27 13:14:07 2026 +0100

    fix VirtualDevice GDI handle leaks in SmSymDefineDialog
    
    Similar to commit e9392c0c86fcf373e00ede92f8ceeee2c7efd233 (fix
    VirtualDevice GDI handle leaks across IconView callers, 2026-02-21).
    
    Change-Id: Ie4f2ea0ca58a435300c2611f14474f9670945489
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199937
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Andras Timar <[email protected]>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200599
    Tested-by: Caolán McNamara <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx
index 521b6fe93dfd..b681b1943138 100644
--- a/starmath/inc/dialog.hxx
+++ b/starmath/inc/dialog.hxx
@@ -403,7 +403,7 @@ public:
 
 class SmSymDefineDialog final : public weld::GenericDialogController
 {
-    VclPtr<VirtualDevice> m_xVirDev;
+    ScopedVclPtr<VirtualDevice> m_xVirDev;
     SmSymbolManager m_aSymbolMgrCopy;
     SmSymbolManager& m_rSymbolMgr;
     SmShowChar m_aOldSymbolDisplay;

Reply via email to