framework/source/services/frame.cxx         |    7 +++---
 ucbhelper/source/provider/contenthelper.cxx |   32 +++++++++-------------------
 2 files changed, 15 insertions(+), 24 deletions(-)

New commits:
commit 16289b6de6ba37c7008fb198260517f3bc505bf4
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sun Nov 21 18:12:08 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Nov 22 07:55:31 2021 +0100

    osl::Mutex->std::mutex in XFrameImpl::windowShown
    
    Change-Id: I1e56d0931a6e814cb9a4faa6a06e70b3740cb728
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125628
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/framework/source/services/frame.cxx 
b/framework/source/services/frame.cxx
index d27cea6942d5..991a7b58131b 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -81,6 +81,7 @@
 #include <tools/diagnose_ex.h>
 #include <unotools/cmdoptions.hxx>
 #include <vcl/threadex.hxx>
+#include <mutex>
 
 using namespace framework;
 
@@ -2580,7 +2581,7 @@ void SAL_CALL XFrameImpl::windowClosing( const 
css::lang::EventObject& )
 
*//*-*****************************************************************************************************/
 void SAL_CALL XFrameImpl::windowShown( const css::lang::EventObject& )
 {
-    static osl::Mutex aFirstVisibleLock;
+    static std::mutex aFirstVisibleLock;
 
     /* SAFE { */
     SolarMutexClearableGuard aReadLock;
@@ -2595,10 +2596,10 @@ void SAL_CALL XFrameImpl::windowShown( const 
css::lang::EventObject& )
         return;
 
     static bool bFirstVisibleTask = true;
-    osl::ClearableMutexGuard aGuard(aFirstVisibleLock);
+    std::unique_lock aGuard(aFirstVisibleLock);
     bool bMustBeTriggered = bFirstVisibleTask;
     bFirstVisibleTask = false;
-    aGuard.clear();
+    aGuard.unlock();
 
     if (bMustBeTriggered)
     {
commit 9b0ea78959f6bcbc1a776c505352ab37e91381ad
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sun Nov 21 20:32:47 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Mon Nov 22 07:55:24 2021 +0100

    use more OInterfaceContainerHelper3 in ContentImplHelper_Impl
    
    Change-Id: Id4e4fca8a5a4e2d050752e666a843e7d8661ec0f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125635
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/ucbhelper/source/provider/contenthelper.cxx 
b/ucbhelper/source/provider/contenthelper.cxx
index 2c64dc1968a6..4cf93d1207b9 100644
--- a/ucbhelper/source/provider/contenthelper.cxx
+++ b/ucbhelper/source/provider/contenthelper.cxx
@@ -28,6 +28,7 @@
 #include <com/sun/star/beans/PropertyAttribute.hpp>
 #include <com/sun/star/beans/PropertyExistException.hpp>
 #include <com/sun/star/beans/PropertySetInfoChange.hpp>
+#include <comphelper/interfacecontainer3.hxx>
 #include <cppuhelper/interfacecontainer.hxx>
 #include <cppuhelper/supportsservice.hxx>
 #include <cppuhelper/queryinterface.hxx>
@@ -108,8 +109,10 @@ struct ContentImplHelper_Impl
     rtl::Reference< ::ucbhelper::PropertySetInfo >      m_xPropSetInfo;
     rtl::Reference< ::ucbhelper::CommandProcessorInfo > m_xCommandsInfo;
     std::unique_ptr<cppu::OInterfaceContainerHelper>    
m_pDisposeEventListeners;
-    std::unique_ptr<cppu::OInterfaceContainerHelper>    
m_pContentEventListeners;
-    std::unique_ptr<cppu::OInterfaceContainerHelper>    
m_pPropSetChangeListeners;
+    
std::unique_ptr<comphelper::OInterfaceContainerHelper3<css::ucb::XContentEventListener>>
+                                                        
m_pContentEventListeners;
+    
std::unique_ptr<comphelper::OInterfaceContainerHelper3<beans::XPropertySetInfoChangeListener>>
+                                                        
m_pPropSetChangeListeners;
     std::unique_ptr<cppu::OInterfaceContainerHelper>    
m_pCommandChangeListeners;
     std::unique_ptr<PropertyChangeListeners>            
m_pPropertyChangeListeners;
 };
@@ -270,7 +273,7 @@ void SAL_CALL ContentImplHelper::addContentEventListener(
 
     if ( !m_pImpl->m_pContentEventListeners )
         m_pImpl->m_pContentEventListeners.reset(
-            new cppu::OInterfaceContainerHelper( m_aMutex ));
+            new 
comphelper::OInterfaceContainerHelper3<css::ucb::XContentEventListener>( 
m_aMutex ));
 
     m_pImpl->m_pContentEventListeners->addInterface( Listener );
 }
@@ -563,7 +566,7 @@ void SAL_CALL 
ContentImplHelper::addPropertySetInfoChangeListener(
 
     if ( !m_pImpl->m_pPropSetChangeListeners )
         m_pImpl->m_pPropSetChangeListeners.reset(
-            new cppu::OInterfaceContainerHelper( m_aMutex ));
+            new 
comphelper::OInterfaceContainerHelper3<beans::XPropertySetInfoChangeListener>( 
m_aMutex ));
 
     m_pImpl->m_pPropSetChangeListeners->addInterface( Listener );
 }
@@ -721,15 +724,9 @@ void ContentImplHelper::notifyPropertySetInfoChange(
         return;
 
     // Notify event listeners.
-    cppu::OInterfaceIteratorHelper aIter( *m_pImpl->m_pPropSetChangeListeners 
);
+    comphelper::OInterfaceIteratorHelper3 aIter( 
*m_pImpl->m_pPropSetChangeListeners );
     while ( aIter.hasMoreElements() )
-    {
-        // Propagate event.
-        uno::Reference< beans::XPropertySetInfoChangeListener >
-            xListener( aIter.next(), uno::UNO_QUERY );
-        if ( xListener.is() )
-            xListener->propertySetInfoChange( evt );
-    }
+        aIter.next()->propertySetInfoChange( evt );
 }
 
 void ContentImplHelper::notifyContentEvent(
@@ -739,16 +736,9 @@ void ContentImplHelper::notifyContentEvent(
         return;
 
     // Notify event listeners.
-    cppu::OInterfaceIteratorHelper aIter( *m_pImpl->m_pContentEventListeners );
+    comphelper::OInterfaceIteratorHelper3 aIter( 
*m_pImpl->m_pContentEventListeners );
     while ( aIter.hasMoreElements() )
-    {
-        // Propagate event.
-        uno::Reference<
-            css::ucb::XContentEventListener > xListener(
-                aIter.next(), uno::UNO_QUERY );
-        if ( xListener.is() )
-            xListener->contentEvent( evt );
-    }
+        aIter.next()->contentEvent( evt );
 }
 
 void ContentImplHelper::inserted()

Reply via email to