svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 86fb1a2f42cec0d82f192fdd33331f56f6e180f5
Author:     Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk>
AuthorDate: Mon Aug 18 16:11:51 2025 +0200
Commit:     Tomaž Vajngerl <qui...@gmail.com>
CommitDate: Mon Aug 18 23:16:42 2025 +0200

    Further simplify [1] by using FlagRestorationGuard
    
    [1] f646107a55a3b6d3204b4456200d555848de51a2
    
    Change-Id: I6f18397b32208d9062978e61340d0a7a5339aa91
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189877
    Reviewed-by: Tomaž Vajngerl <qui...@gmail.com>
    Tested-by: Jenkins

diff --git a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx 
b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
index d7de86b3c72e..bf169229496a 100644
--- a/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
+++ b/svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx
@@ -49,7 +49,7 @@
 #include <vcl/window.hxx>
 #include <comphelper/lok.hxx>
 #include <comphelper/processfactory.hxx>
-#include <comphelper/scopeguard.hxx>
+#include <comphelper/flagguard.hxx>
 #include <cppuhelper/implbase.hxx>
 #include <toolkit/helper/vclunohelper.hxx>
 #include <comphelper/diagnose_ex.hxx>
@@ -1009,8 +1009,8 @@ namespace sdr::contact {
             return false;
         }
 
-        m_bCreatingControl = true;
-        ::comphelper::ScopeGuard aGuard([&] () { m_bCreatingControl = false; 
});
+        // We are creating the control from this point on.
+        comphelper::FlagRestorationGuard aControlGuard(m_bCreatingControl, 
true);
 
         if ( m_aControl.is() )
         {

Reply via email to