comphelper/source/eventattachermgr/eventattachermgr.cxx |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

New commits:
commit 944d855f2fb4eb2a50c0e678c4fe51eb93e4e567
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Feb 15 11:24:49 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Feb 15 12:07:41 2023 +0000

    tdf#153611 Opening dialog via macro no longer works
    
    regression from
        commit ba4191ff0de05334ba32b53a09ad992710f03f9d
        Author: Noel Grandin <noelgran...@gmail.com>
        Date:   Mon Jan 30 21:48:53 2023 +0200
        osl::Mutex->std::mutex in ImplEventAttacherManager
    
    Change-Id: I4022c1e6b9c00d975eaa9e095994d7635aeb64b3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147047
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx 
b/comphelper/source/eventattachermgr/eventattachermgr.cxx
index ffad3bb3d0d6..260121ba1517 100644
--- a/comphelper/source/eventattachermgr/eventattachermgr.cxx
+++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx
@@ -124,7 +124,7 @@ private:
     void insertEntry(std::unique_lock<std::mutex>&, sal_Int32 Index);
 
     /// @throws Exception
-    Reference< XIdlReflection > getReflection();
+    Reference< XIdlReflection > getReflection(std::unique_lock<std::mutex>&);
 
     /** checks if <arg>_nIndex</arg> is a valid index, throws an 
<type>IllegalArgumentException</type> if not
     @param _nIndex
@@ -255,7 +255,7 @@ Any SAL_CALL AttacherAllListener_Impl::approveFiring( const 
AllEventObject& Even
         aRet = aIt.next()->approveFiring( aScriptEvent );
         try
         {
-            Reference< XIdlClass > xListenerType = mxManager->getReflection()->
+            Reference< XIdlClass > xListenerType = 
mxManager->getReflection(l)->
                         forName( Event.ListenerType.getTypeName() );
             Reference< XIdlMethod > xMeth = xListenerType->getMethod( 
Event.MethodName );
             if( xMeth.is() )
@@ -306,7 +306,7 @@ Any SAL_CALL AttacherAllListener_Impl::approveFiring( const 
AllEventObject& Even
         catch (const CannotConvertException&)
         {
             // silent ignore conversions errors from a script call
-            Reference< XIdlClass > xListenerType = mxManager->getReflection()->
+            Reference< XIdlClass > xListenerType = 
mxManager->getReflection(l)->
                         forName( Event.ListenerType.getTypeName() );
             Reference< XIdlMethod > xMeth = xListenerType->getMethod( 
Event.MethodName );
             if( xMeth.is() )
@@ -368,9 +368,8 @@ ImplEventAttacherManager::ImplEventAttacherManager( const 
Reference< XIntrospect
     }
 }
 
-Reference< XIdlReflection > ImplEventAttacherManager::getReflection()
+Reference< XIdlReflection > 
ImplEventAttacherManager::getReflection(std::unique_lock<std::mutex>&)
 {
-    std::unique_lock l(m_aMutex);
     // Do we already have a service? If not, create one.
     if( !mxCoreReflection.is() )
     {

Reply via email to