sccomp/source/solver/SwarmSolver.cxx     |   21 +++++---------
 scripting/source/basprov/basmethnode.hxx |    1 
 scripting/source/basprov/basscript.cxx   |   15 ++++------
 scripting/source/basprov/basscript.hxx   |   13 +++------
 scripting/source/inc/bcholder.hxx        |   44 -------------------------------
 solenv/clang-format/excludelist          |    1 
 6 files changed, 19 insertions(+), 76 deletions(-)

New commits:
commit 973d1d888738ca574f2b288f1d5a25814713c760
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Mar 27 11:33:03 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Mar 29 07:42:32 2024 +0100

    convert SwarmSolver to comphelper::WeakImplHelper
    
    Change-Id: I20a97cd2355648d02c1bb9a4d999c5a6ed4470a8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165492
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sccomp/source/solver/SwarmSolver.cxx 
b/sccomp/source/solver/SwarmSolver.cxx
index 01814e6f44ea..6c847d1e561f 100644
--- a/sccomp/source/solver/SwarmSolver.cxx
+++ b/sccomp/source/solver/SwarmSolver.cxx
@@ -25,8 +25,8 @@
 #include <cppuhelper/implbase.hxx>
 #include <cppuhelper/supportsservice.hxx>
 
-#include <comphelper/broadcasthelper.hxx>
-#include <comphelper/propertycontainer.hxx>
+#include <comphelper/compbase.hxx>
+#include <comphelper/propertycontainer2.hxx>
 #include <comphelper/proparrhlp.hxx>
 
 #include <cmath>
@@ -96,13 +96,12 @@ enum
 
 } // end anonymous namespace
 
-typedef cppu::WeakImplHelper<sheet::XSolver, sheet::XSolverDescription, 
lang::XServiceInfo>
+typedef comphelper::WeakImplHelper<sheet::XSolver, sheet::XSolverDescription, 
lang::XServiceInfo>
     SwarmSolver_Base;
 
 namespace
 {
-class SwarmSolver : public comphelper::OMutexAndBroadcastHelper,
-                    public comphelper::OPropertyContainer,
+class SwarmSolver : public comphelper::OPropertyContainer2,
                     public comphelper::OPropertyArrayUsageHelper<SwarmSolver>,
                     public SwarmSolver_Base
 {
@@ -138,8 +137,7 @@ private:
 
 public:
     SwarmSolver()
-        : OPropertyContainer(GetBroadcastHelper())
-        , mbMaximize(true)
+        : mbMaximize(true)
         , mbNonNegative(false)
         , mbInteger(false)
         , mnTimeout(60000)
@@ -165,10 +163,7 @@ public:
         return createPropertySetInfo(getInfoHelper());
     }
     // OPropertySetHelper
-    virtual cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override
-    {
-        return *getArrayHelper();
-    }
+    virtual cppu::IPropertyArrayHelper& getInfoHelper() override { return 
*getArrayHelper(); }
     // OPropertyArrayUsageHelper
     virtual cppu::IPropertyArrayHelper* createArrayHelper() const override
     {
@@ -309,8 +304,8 @@ double SwarmSolver::getValue(const table::CellAddress& 
rPosition)
     return getCell(rPosition)->getValue();
 }
 
-IMPLEMENT_FORWARD_XINTERFACE2(SwarmSolver, SwarmSolver_Base, 
OPropertyContainer)
-IMPLEMENT_FORWARD_XTYPEPROVIDER2(SwarmSolver, SwarmSolver_Base, 
OPropertyContainer)
+IMPLEMENT_FORWARD_XINTERFACE2(SwarmSolver, SwarmSolver_Base, 
comphelper::OPropertyContainer2)
+IMPLEMENT_FORWARD_XTYPEPROVIDER2(SwarmSolver, SwarmSolver_Base, 
comphelper::OPropertyContainer2)
 
 void SwarmSolver::applyVariables(std::vector<double> const& rVariables)
 {
commit 8e048c3c572dc02f1161744278d875c9f842574e
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Mar 27 11:19:16 2024 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Fri Mar 29 07:42:23 2024 +0100

    convert BasicScriptImplodNodeImpl to comphelper::WeakImplHelper
    
    and remove OBroadcastHelperHolder, since nothing uses it anymore
    
    Change-Id: Id07b4589e0893950974c6bf41e0d4f2d8dc7ee81
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165491
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/scripting/source/basprov/basmethnode.hxx 
b/scripting/source/basprov/basmethnode.hxx
index 169d06988f62..d50bb663cefa 100644
--- a/scripting/source/basprov/basmethnode.hxx
+++ b/scripting/source/basprov/basmethnode.hxx
@@ -19,7 +19,6 @@
 
 #pragma once
 
-#include <bcholder.hxx>
 #include <com/sun/star/beans/XPropertySetInfo.hpp>
 #include <com/sun/star/script/XInvocation.hpp>
 #include <com/sun/star/script/browse/XBrowseNode.hpp>
diff --git a/scripting/source/basprov/basscript.cxx 
b/scripting/source/basprov/basscript.cxx
index 148d1877d875..fdb6c5d02d44 100644
--- a/scripting/source/basprov/basscript.cxx
+++ b/scripting/source/basprov/basscript.cxx
@@ -27,7 +27,6 @@
 #include <basic/basmgr.hxx>
 #include <com/sun/star/script/provider/ScriptFrameworkErrorException.hpp>
 #include <com/sun/star/script/provider/ScriptFrameworkErrorType.hpp>
-#include <bcholder.hxx>
 #include <comphelper/propertycontainer.hxx>
 #include <com/sun/star/beans/PropertyAttribute.hpp>
 #include <map>
@@ -67,9 +66,8 @@ constexpr OUString BASSCRIPT_PROPERTY_CALLER = u"Caller"_ustr;
 
 
     BasicScriptImpl::BasicScriptImpl( OUString funcName, SbMethodRef xMethod )
-        : ::scripting_helper::OBroadcastHelperHolder( m_aMutex )
-        ,OPropertyContainer( GetBroadcastHelper() )
-        ,m_xMethod(std::move( xMethod ))
+        :
+        m_xMethod(std::move( xMethod ))
         ,m_funcName(std::move( funcName ))
         ,m_documentBasicManager( nullptr )
         ,m_xDocumentScriptContext()
@@ -79,9 +77,8 @@ constexpr OUString BASSCRIPT_PROPERTY_CALLER = u"Caller"_ustr;
 
 
     BasicScriptImpl::BasicScriptImpl( OUString funcName, SbMethodRef xMethod,
-        BasicManager& documentBasicManager, const Reference< 
XScriptInvocationContext >& documentScriptContext ) : 
::scripting_helper::OBroadcastHelperHolder( m_aMutex )
-        ,OPropertyContainer( GetBroadcastHelper() )
-        ,m_xMethod(std::move( xMethod ))
+        BasicManager& documentBasicManager, const Reference< 
XScriptInvocationContext >& documentScriptContext ) :
+        m_xMethod(std::move( xMethod ))
         ,m_funcName(std::move( funcName ))
         ,m_documentBasicManager( &documentBasicManager )
         ,m_xDocumentScriptContext( documentScriptContext )
@@ -121,13 +118,13 @@ constexpr OUString BASSCRIPT_PROPERTY_CALLER = 
u"Caller"_ustr;
     // XInterface
 
 
-    IMPLEMENT_FORWARD_XINTERFACE2( BasicScriptImpl, BasicScriptImpl_BASE, 
OPropertyContainer )
+    IMPLEMENT_FORWARD_XINTERFACE2( BasicScriptImpl, BasicScriptImpl_BASE, 
comphelper::OPropertyContainer2 )
 
 
     // XTypeProvider
 
 
-    IMPLEMENT_FORWARD_XTYPEPROVIDER2( BasicScriptImpl, BasicScriptImpl_BASE, 
OPropertyContainer )
+    IMPLEMENT_FORWARD_XTYPEPROVIDER2( BasicScriptImpl, BasicScriptImpl_BASE, 
comphelper::OPropertyContainer2 )
 
 
     // OPropertySetHelper
diff --git a/scripting/source/basprov/basscript.hxx 
b/scripting/source/basprov/basscript.hxx
index e7a94d706ee7..2adcd9c8b311 100644
--- a/scripting/source/basprov/basscript.hxx
+++ b/scripting/source/basprov/basscript.hxx
@@ -19,13 +19,12 @@
 
 #pragma once
 
-#include <bcholder.hxx>
 #include <com/sun/star/script/provider/XScript.hpp>
 #include <com/sun/star/document/XScriptInvocationContext.hpp>
-#include <cppuhelper/basemutex.hxx>
 #include <cppuhelper/implbase.hxx>
+#include <comphelper/compbase.hxx>
 #include <comphelper/proparrhlp.hxx>
-#include <comphelper/propertycontainer.hxx>
+#include <comphelper/propertycontainer2.hxx>
 #include <basic/sbmeth.hxx>
 #include <svl/lstner.hxx>
 
@@ -38,14 +37,12 @@ namespace basprov
 
 
 
-    typedef ::cppu::WeakImplHelper<
+    typedef ::comphelper::WeakImplHelper<
         css::script::provider::XScript > BasicScriptImpl_BASE;
 
 
     class BasicScriptImpl : public BasicScriptImpl_BASE, public SfxListener,
-                                public cppu::BaseMutex,
-                                public 
::scripting_helper::OBroadcastHelperHolder,
-                                public ::comphelper::OPropertyContainer,
+                                public ::comphelper::OPropertyContainer2,
                                 public 
::comphelper::OPropertyArrayUsageHelper< BasicScriptImpl >
     {
     private:
@@ -60,7 +57,7 @@ namespace basprov
         css::uno::Sequence< css::uno::Any > m_caller;
     protected:
         // OPropertySetHelper
-        virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(  ) 
override;
+        virtual ::cppu::IPropertyArrayHelper& getInfoHelper(  ) override;
 
         // OPropertyArrayUsageHelper
         virtual ::cppu::IPropertyArrayHelper* createArrayHelper(  ) const 
override;
diff --git a/scripting/source/inc/bcholder.hxx 
b/scripting/source/inc/bcholder.hxx
deleted file mode 100644
index 9f8add31bb3e..000000000000
--- a/scripting/source/inc/bcholder.hxx
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#pragma once
-
-#include <osl/mutex.hxx>
-#include <cppuhelper/interfacecontainer.h>
-
-
-namespace scripting_helper
-{
-
-    class OBroadcastHelperHolder
-    {
-        ::cppu::OBroadcastHelper    m_aBHelper;
-
-    public:
-        OBroadcastHelperHolder( ::osl::Mutex& rMutex ) : m_aBHelper( rMutex ) 
{ }
-
-        ::cppu::OBroadcastHelper&       GetBroadcastHelper()        { return 
m_aBHelper; }
-        const ::cppu::OBroadcastHelper& GetBroadcastHelper() const  { return 
m_aBHelper; }
-    };
-
-
-}   // namespace scripting_helper
-
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index 53e7e4252996..c62b86163c03 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -9311,7 +9311,6 @@ scripting/source/dlgprov/dlgevtatt.cxx
 scripting/source/dlgprov/dlgevtatt.hxx
 scripting/source/dlgprov/dlgprov.cxx
 scripting/source/dlgprov/dlgprov.hxx
-scripting/source/inc/bcholder.hxx
 scripting/source/inc/util/MiscUtils.hxx
 scripting/source/protocolhandler/scripthandler.cxx
 scripting/source/protocolhandler/scripthandler.hxx

Reply via email to