sc/source/ui/sidebar/CellLineStyleControl.cxx |    2 +-
 sc/source/ui/sidebar/CellLineStyleControl.hxx |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 0d012478ccfbf4f6ed002830be20180c876ef3e5
Author:     Szymon Kłos <[email protected]>
AuthorDate: Thu Mar 5 04:55:05 2026 +0000
Commit:     Mike Kaganski <[email protected]>
CommitDate: Thu Mar 5 13:14:21 2026 +0100

    fix build: scoped vcl ptr in CellLineStylePopup
    
    - clang plugin error in sc/source/ui/sidebar/CellLineStyleControl.cxx
    
    
/home/collabora/jenkins/workspace/gerrit_linux_co-26.04_clang_dbgutil/sc/source/ui/sidebar/CellLineStyleControl.cxx:80:43:
 error: use ScopedVclPtr<VirtualDevice> as return type instead of 
VclPtr<VirtualDevice> to prevent GDI handle leaks [loplugin:scopedvclptr] 
[loplugin:scopedvclptr]
       80 | VclPtr<VirtualDevice> CellLineStylePopup::CreateImage(int nIndex)
          | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
       81 | {
          | ~
       82 |     VclPtr<VirtualDevice> pDev = 
mxCellLineStyleTreeView->create_virtual_device();
    
    Change-Id: I507a9f674b535b338dc17d1bf8839d843748b469
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200991
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Mike Kaganski <[email protected]>

diff --git a/sc/source/ui/sidebar/CellLineStyleControl.cxx 
b/sc/source/ui/sidebar/CellLineStyleControl.cxx
index 592014b4f392..b8a3ce30db2a 100644
--- a/sc/source/ui/sidebar/CellLineStyleControl.cxx
+++ b/sc/source/ui/sidebar/CellLineStyleControl.cxx
@@ -77,7 +77,7 @@ CellLineStylePopup::~CellLineStylePopup()
 {
 }
 
-VclPtr<VirtualDevice> CellLineStylePopup::CreateImage(int nIndex)
+ScopedVclPtr<VirtualDevice> CellLineStylePopup::CreateImage(int nIndex)
 {
     VclPtr<VirtualDevice> pDev = 
mxCellLineStyleTreeView->create_virtual_device();
     const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
diff --git a/sc/source/ui/sidebar/CellLineStyleControl.hxx 
b/sc/source/ui/sidebar/CellLineStyleControl.hxx
index 87a62b5eca25..d8f9fddb6e00 100644
--- a/sc/source/ui/sidebar/CellLineStyleControl.hxx
+++ b/sc/source/ui/sidebar/CellLineStyleControl.hxx
@@ -38,7 +38,7 @@ private:
     DECL_LINK(StyleSelectHdl, weld::TreeView&, bool);
     DECL_LINK(PBClickHdl, weld::Button&, void);
 
-    VclPtr<VirtualDevice> CreateImage(int nIndex);
+    ScopedVclPtr<VirtualDevice> CreateImage(int nIndex);
 
 public:
     CellLineStylePopup(weld::Toolbar* pParent, const OUString& rId, 
SfxDispatcher* pDispatcher);

Reply via email to