sw/source/uibase/dochdl/swdtflvr.cxx             |    4 +
 ucb/source/cacher/contentresultsetwrapper.cxx    |    2 
 ucb/source/cacher/contentresultsetwrapper.hxx    |    4 -
 ucb/source/cacher/dynamicresultsetwrapper.cxx    |    2 
 ucb/source/cacher/dynamicresultsetwrapper.hxx    |    4 -
 ucb/source/core/ucb.cxx                          |    2 
 ucb/source/core/ucb.hxx                          |    5 --
 ucb/source/core/ucbstore.cxx                     |   11 +---
 ucb/source/core/ucbstore.hxx                     |    6 +-
 ucb/source/sorter/sortdynres.cxx                 |    2 
 ucb/source/sorter/sortdynres.hxx                 |    7 --
 ucb/source/sorter/sortresult.cxx                 |    2 
 ucb/source/sorter/sortresult.hxx                 |    7 --
 ucb/source/ucp/file/bc.cxx                       |   12 ++---
 ucb/source/ucp/file/bc.hxx                       |    8 +--
 ucb/source/ucp/file/filnot.cxx                   |   55 ++++++-----------------
 ucb/source/ucp/file/filnot.hxx                   |   11 ++--
 ucb/source/ucp/file/filrset.cxx                  |   28 +++--------
 ucb/source/ucp/file/filrset.hxx                  |    8 +--
 ucb/source/ucp/ftp/ftpresultsetbase.cxx          |    6 +-
 ucb/source/ucp/ftp/ftpresultsetbase.hxx          |    8 +--
 ucb/source/ucp/hierarchy/hierarchydatasource.cxx |    2 
 ucb/source/ucp/hierarchy/hierarchydatasource.hxx |    4 -
 23 files changed, 79 insertions(+), 121 deletions(-)

New commits:
commit b6f35f5db701fbd31852fad937a38f81c5c817f0
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Sun Nov 28 20:49:02 2021 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Nov 30 09:51:25 2021 +0100

    use more OInterfaceContainerHelper2 in ucb
    
    Change-Id: I81300a707c81a011f29bd6b63794e1abd472a015
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126062
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/ucb/source/cacher/contentresultsetwrapper.cxx 
b/ucb/source/cacher/contentresultsetwrapper.cxx
index 0b1175e324f0..f9e504e2d933 100644
--- a/ucb/source/cacher/contentresultsetwrapper.cxx
+++ b/ucb/source/cacher/contentresultsetwrapper.cxx
@@ -408,7 +408,7 @@ void SAL_CALL ContentResultSetWrapper::addEventListener( 
const Reference< XEvent
 
     if ( !m_pDisposeEventListeners )
         m_pDisposeEventListeners.reset(
-                    new OInterfaceContainerHelper2( m_aContainerMutex ) );
+                    new OInterfaceContainerHelper3<XEventListener>( 
m_aContainerMutex ) );
 
     m_pDisposeEventListeners->addInterface( Listener );
 }
diff --git a/ucb/source/cacher/contentresultsetwrapper.hxx 
b/ucb/source/cacher/contentresultsetwrapper.hxx
index 254ab530606d..eda5b5e83e9d 100644
--- a/ucb/source/cacher/contentresultsetwrapper.hxx
+++ b/ucb/source/cacher/contentresultsetwrapper.hxx
@@ -31,7 +31,7 @@
 #include <com/sun/star/ucb/XContentAccess.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <cppuhelper/interfacecontainer.h>
-#include <comphelper/interfacecontainer2.hxx>
+#include <comphelper/interfacecontainer3.hxx>
 #include <comphelper/multiinterfacecontainer2.hxx>
 #include <memory>
 
@@ -86,7 +86,7 @@ private:
     bool                m_bDisposed; ///Dispose call ready.
     bool                m_bInDispose;///In dispose call
     osl::Mutex              m_aContainerMutex;
-    std::unique_ptr<comphelper::OInterfaceContainerHelper2>
+    
std::unique_ptr<comphelper::OInterfaceContainerHelper3<css::lang::XEventListener>>
                             m_pDisposeEventListeners;
     std::unique_ptr<PropertyChangeListenerContainer_Impl>
                             m_pPropertyChangeListeners;
diff --git a/ucb/source/cacher/dynamicresultsetwrapper.cxx 
b/ucb/source/cacher/dynamicresultsetwrapper.cxx
index e465bbe6da0c..fb37a5fa6864 100644
--- a/ucb/source/cacher/dynamicresultsetwrapper.cxx
+++ b/ucb/source/cacher/dynamicresultsetwrapper.cxx
@@ -163,7 +163,7 @@ void SAL_CALL DynamicResultSetWrapper::addEventListener( 
const Reference< XEvent
 
     if ( !m_pDisposeEventListeners )
         m_pDisposeEventListeners.reset(
-                    new OInterfaceContainerHelper2( m_aContainerMutex ) );
+                    new OInterfaceContainerHelper3<XEventListener>( 
m_aContainerMutex ) );
 
     m_pDisposeEventListeners->addInterface( Listener );
 }
diff --git a/ucb/source/cacher/dynamicresultsetwrapper.hxx 
b/ucb/source/cacher/dynamicresultsetwrapper.hxx
index 3d0cb9e737b6..8f9c0473f072 100644
--- a/ucb/source/cacher/dynamicresultsetwrapper.hxx
+++ b/ucb/source/cacher/dynamicresultsetwrapper.hxx
@@ -22,7 +22,7 @@
 #include <osl/mutex.hxx>
 #include <osl/conditn.hxx>
 #include <cppuhelper/weak.hxx>
-#include <comphelper/interfacecontainer2.hxx>
+#include <comphelper/interfacecontainer3.hxx>
 #include <com/sun/star/ucb/XDynamicResultSet.hpp>
 #include <com/sun/star/ucb/XSourceInitialization.hpp>
 #include <com/sun/star/ucb/XDynamicResultSetListener.hpp>
@@ -42,7 +42,7 @@ private:
     bool                    m_bDisposed; ///Dispose call ready.
     bool                    m_bInDispose;///In dispose call
     osl::Mutex              m_aContainerMutex;
-    std::unique_ptr<comphelper::OInterfaceContainerHelper2>
+    
std::unique_ptr<comphelper::OInterfaceContainerHelper3<css::lang::XEventListener>>
                             m_pDisposeEventListeners;
 protected:
     rtl::Reference<DynamicResultSetWrapperListener>
diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx
index 450fa670e1ac..ed8ddce76525 100644
--- a/ucb/source/core/ucb.cxx
+++ b/ucb/source/core/ucb.cxx
@@ -265,7 +265,7 @@ void SAL_CALL UniversalContentBroker::addEventListener(
                             const Reference< XEventListener >& Listener )
 {
     if ( !m_pDisposeEventListeners )
-        m_pDisposeEventListeners.reset( new OInterfaceContainerHelper2( 
m_aMutex ) );
+        m_pDisposeEventListeners.reset( new 
OInterfaceContainerHelper3<css::lang::XEventListener>( m_aMutex ) );
 
     m_pDisposeEventListeners->addInterface( Listener );
 }
diff --git a/ucb/source/core/ucb.hxx b/ucb/source/core/ucb.hxx
index dfc40fbe9d45..ea6d3800033d 100644
--- a/ucb/source/core/ucb.hxx
+++ b/ucb/source/core/ucb.hxx
@@ -29,6 +29,7 @@
 #include <com/sun/star/util/XChangesListener.hpp>
 #include <com/sun/star/util/XChangesNotifier.hpp>
 
+#include <comphelper/interfacecontainer3.hxx>
 #include <cppuhelper/implbase.hxx>
 #include <osl/mutex.hxx>
 #include "providermap.hxx"
@@ -37,8 +38,6 @@
 #include <memory>
 
 
-namespace comphelper { class OInterfaceContainerHelper2; }
-
 namespace com::sun::star::ucb {
     class XCommandInfo;
     struct GlobalTransferCommandArgument2;
@@ -154,7 +153,7 @@ private:
     css::uno::Sequence< css::uno::Any > m_aArguments;
     ProviderMap_Impl m_aProviders;
     osl::Mutex m_aMutex;
-    std::unique_ptr<comphelper::OInterfaceContainerHelper2> 
m_pDisposeEventListeners;
+    
std::unique_ptr<comphelper::OInterfaceContainerHelper3<css::lang::XEventListener>>
 m_pDisposeEventListeners;
     sal_Int32 m_nCommandId;
 };
 
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index 4126d7988c4e..db1cfea7ceab 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -1086,7 +1086,7 @@ void SAL_CALL PersistentPropertySet::addEventListener(
 {
     if ( !m_pDisposeEventListeners )
         m_pDisposeEventListeners.reset(
-                    new OInterfaceContainerHelper2( m_aMutex ) );
+                    new OInterfaceContainerHelper3<css::lang::XEventListener>( 
m_aMutex ) );
 
     m_pDisposeEventListeners->addInterface( Listener );
 }
@@ -1636,7 +1636,7 @@ void SAL_CALL 
PersistentPropertySet::addPropertySetInfoChangeListener(
 {
     if ( !m_pPropSetChangeListeners )
         m_pPropSetChangeListeners.reset(
-                    new OInterfaceContainerHelper2( m_aMutex ) );
+                    new 
OInterfaceContainerHelper3<XPropertySetInfoChangeListener>( m_aMutex ) );
 
     m_pPropSetChangeListeners->addInterface( Listener );
 }
@@ -1937,14 +1937,11 @@ void PersistentPropertySet::notifyPropertySetInfoChange(
         return;
 
     // Notify event listeners.
-    OInterfaceIteratorHelper2 aIter( *m_pPropSetChangeListeners );
+    OInterfaceIteratorHelper3 aIter( *m_pPropSetChangeListeners );
     while ( aIter.hasMoreElements() )
     {
         // Propagate event.
-        Reference< XPropertySetInfoChangeListener >
-                            xListener( aIter.next(), UNO_QUERY );
-        if ( xListener.is() )
-            xListener->propertySetInfoChange( evt );
+        aIter.next()->propertySetInfoChange( evt );
     }
 }
 
diff --git a/ucb/source/core/ucbstore.hxx b/ucb/source/core/ucbstore.hxx
index a7642b9a6a1b..d3c5eb36c0cf 100644
--- a/ucb/source/core/ucbstore.hxx
+++ b/ucb/source/core/ucbstore.hxx
@@ -33,7 +33,7 @@
 #include <com/sun/star/beans/XPropertyAccess.hpp>
 #include <com/sun/star/lang/XComponent.hpp>
 #include <com/sun/star/lang/XInitialization.hpp>
-#include <comphelper/interfacecontainer2.hxx>
+#include <comphelper/interfacecontainer3.hxx>
 #include <comphelper/multiinterfacecontainer2.hxx>
 #include <cppuhelper/compbase.hxx>
 #include <cppuhelper/basemutex.hxx>
@@ -159,8 +159,8 @@ class PersistentPropertySet : public cppu::WeakImplHelper <
     OUString                    m_aKey;
     OUString                    m_aFullKey;
     osl::Mutex                  m_aMutex;
-    std::unique_ptr<comphelper::OInterfaceContainerHelper2>  
m_pDisposeEventListeners;
-    std::unique_ptr<comphelper::OInterfaceContainerHelper2>  
m_pPropSetChangeListeners;
+    
std::unique_ptr<comphelper::OInterfaceContainerHelper3<css::lang::XEventListener>>
  m_pDisposeEventListeners;
+    
std::unique_ptr<comphelper::OInterfaceContainerHelper3<css::beans::XPropertySetInfoChangeListener>>
  m_pPropSetChangeListeners;
     std::unique_ptr<PropertyListeners_Impl>      m_pPropertyChangeListeners;
 
 private:
diff --git a/ucb/source/sorter/sortdynres.cxx b/ucb/source/sorter/sortdynres.cxx
index 100dfa73ccbd..2625fd781a24 100644
--- a/ucb/source/sorter/sortdynres.cxx
+++ b/ucb/source/sorter/sortdynres.cxx
@@ -124,7 +124,7 @@ void SAL_CALL SortedDynamicResultSet::addEventListener(
 
     if ( !mpDisposeEventListeners )
         mpDisposeEventListeners.reset(
-                    new OInterfaceContainerHelper2( getContainerMutex() ) );
+                    new OInterfaceContainerHelper3<XEventListener>( 
getContainerMutex() ) );
 
     mpDisposeEventListeners->addInterface( Listener );
 }
diff --git a/ucb/source/sorter/sortdynres.hxx b/ucb/source/sorter/sortdynres.hxx
index 72a18077ff0a..1098f223a6c1 100644
--- a/ucb/source/sorter/sortdynres.hxx
+++ b/ucb/source/sorter/sortdynres.hxx
@@ -24,16 +24,13 @@
 #include <com/sun/star/ucb/XDynamicResultSet.hpp>
 #include <com/sun/star/ucb/XDynamicResultSetListener.hpp>
 #include <com/sun/star/ucb/XSortedDynamicResultSetFactory.hpp>
+#include <comphelper/interfacecontainer3.hxx>
 #include <cppuhelper/factory.hxx>
 #include <cppuhelper/implbase.hxx>
 #include <memory>
 #include "sortresult.hxx"
 
 
-namespace comphelper {
-    class OInterfaceContainerHelper2;
-}
-
 
 class SortedDynamicResultSetListener;
 
@@ -41,7 +38,7 @@ class SortedDynamicResultSet: public cppu::WeakImplHelper <
     css::lang::XServiceInfo,
     css::ucb::XDynamicResultSet >
 {
-    std::unique_ptr<comphelper::OInterfaceContainerHelper2>  
mpDisposeEventListeners;
+    
std::unique_ptr<comphelper::OInterfaceContainerHelper3<css::lang::XEventListener>>
  mpDisposeEventListeners;
 
     css::uno::Reference < css::ucb::XDynamicResultSetListener > mxListener;
 
diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx
index 606ecf7264b8..af13ca097047 100644
--- a/ucb/source/sorter/sortresult.cxx
+++ b/ucb/source/sorter/sortresult.cxx
@@ -199,7 +199,7 @@ void SAL_CALL SortedResultSet::addEventListener(
 
     if ( !mpDisposeEventListeners )
         mpDisposeEventListeners =
-                    new OInterfaceContainerHelper2( getContainerMutex() );
+                    new OInterfaceContainerHelper3<XEventListener>( 
getContainerMutex() );
 
     mpDisposeEventListeners->addInterface( Listener );
 }
diff --git a/ucb/source/sorter/sortresult.hxx b/ucb/source/sorter/sortresult.hxx
index 7db1c97fb61a..bcba14b6d63b 100644
--- a/ucb/source/sorter/sortresult.hxx
+++ b/ucb/source/sorter/sortresult.hxx
@@ -31,15 +31,12 @@
 #include <com/sun/star/ucb/NumberedSortingInfo.hpp>
 #include <com/sun/star/ucb/XAnyCompareFactory.hpp>
 #include <com/sun/star/ucb/ListAction.hpp>
+#include <comphelper/interfacecontainer3.hxx>
 #include <cppuhelper/implbase.hxx>
 #include <rtl/ref.hxx>
 #include <deque>
 #include <memory>
 
-namespace comphelper {
-    class OInterfaceContainerHelper2;
-}
-
 
 struct  SortInfo;
 struct  SortListData;
@@ -96,7 +93,7 @@ class SortedResultSet: public cppu::WeakImplHelper <
     css::sdbc::XResultSetMetaDataSupplier,
     css::beans::XPropertySet >
 {
-    comphelper::OInterfaceContainerHelper2 *mpDisposeEventListeners;
+    comphelper::OInterfaceContainerHelper3<css::lang::XEventListener> 
*mpDisposeEventListeners;
     std::unique_ptr<PropertyChangeListeners_Impl>    mpPropChangeListeners;
     std::unique_ptr<PropertyChangeListeners_Impl>    mpVetoChangeListeners;
 
diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx
index b453ab6b882a..acf68ce65c61 100644
--- a/ucb/source/ucp/file/bc.cxx
+++ b/ucb/source/ucp/file/bc.cxx
@@ -127,7 +127,7 @@ BaseContent::addEventListener( const Reference< 
lang::XEventListener >& Listener
 
     if ( ! m_pDisposeEventListeners )
         m_pDisposeEventListeners.reset(
-            new comphelper::OInterfaceContainerHelper2( m_aEventListenerMutex 
) );
+            new comphelper::OInterfaceContainerHelper3<lang::XEventListener>( 
m_aEventListenerMutex ) );
 
     m_pDisposeEventListeners->addInterface( Listener );
 }
@@ -147,9 +147,9 @@ void SAL_CALL
 BaseContent::dispose()
 {
     lang::EventObject aEvt;
-    std::unique_ptr<comphelper::OInterfaceContainerHelper2> 
pDisposeEventListeners;
-    std::unique_ptr<comphelper::OInterfaceContainerHelper2> 
pContentEventListeners;
-    std::unique_ptr<comphelper::OInterfaceContainerHelper2> 
pPropertySetInfoChangeListeners;
+    
std::unique_ptr<comphelper::OInterfaceContainerHelper3<lang::XEventListener>> 
pDisposeEventListeners;
+    
std::unique_ptr<comphelper::OInterfaceContainerHelper3<XContentEventListener>> 
pContentEventListeners;
+    
std::unique_ptr<comphelper::OInterfaceContainerHelper3<beans::XPropertySetInfoChangeListener>>
 pPropertySetInfoChangeListeners;
     std::unique_ptr<PropertyListeners> pPropertyListener;
 
     {
@@ -427,7 +427,7 @@ BaseContent::addContentEventListener(
 
     if ( ! m_pContentEventListeners )
         m_pContentEventListeners.reset(
-            new comphelper::OInterfaceContainerHelper2( m_aEventListenerMutex 
) );
+            new comphelper::OInterfaceContainerHelper3<XContentEventListener>( 
m_aEventListenerMutex ) );
 
 
     m_pContentEventListeners->addInterface( Listener );
@@ -545,7 +545,7 @@ BaseContent::addPropertySetInfoChangeListener(
 {
     osl::MutexGuard aGuard( m_aMutex );
     if( ! m_pPropertySetInfoChangeListeners )
-        m_pPropertySetInfoChangeListeners.reset( new 
comphelper::OInterfaceContainerHelper2( m_aEventListenerMutex ) );
+        m_pPropertySetInfoChangeListeners.reset( new 
comphelper::OInterfaceContainerHelper3<beans::XPropertySetInfoChangeListener>( 
m_aEventListenerMutex ) );
 
     m_pPropertySetInfoChangeListeners->addInterface( Listener );
 }
diff --git a/ucb/source/ucp/file/bc.hxx b/ucb/source/ucp/file/bc.hxx
index 4b28b343652a..fff14a09ecbe 100644
--- a/ucb/source/ucp/file/bc.hxx
+++ b/ucb/source/ucp/file/bc.hxx
@@ -22,7 +22,7 @@
 #include <osl/mutex.hxx>
 #include <rtl/ustring.hxx>
 #include <cppuhelper/implbase.hxx>
-#include <comphelper/interfacecontainer2.hxx>
+#include <comphelper/interfacecontainer3.hxx>
 #include <com/sun/star/uno/XInterface.hpp>
 #include <com/sun/star/lang/XComponent.hpp>
 #include <com/sun/star/ucb/XCommandProcessor.hpp>
@@ -206,9 +206,9 @@ namespace fileaccess {
         osl::Mutex                         m_aMutex;
 
         osl::Mutex                          m_aEventListenerMutex;
-        std::unique_ptr<comphelper::OInterfaceContainerHelper2>   
m_pDisposeEventListeners;
-        std::unique_ptr<comphelper::OInterfaceContainerHelper2>   
m_pContentEventListeners;
-        std::unique_ptr<comphelper::OInterfaceContainerHelper2>   
m_pPropertySetInfoChangeListeners;
+        
std::unique_ptr<comphelper::OInterfaceContainerHelper3<css::lang::XEventListener>>
   m_pDisposeEventListeners;
+        
std::unique_ptr<comphelper::OInterfaceContainerHelper3<css::ucb::XContentEventListener>>
 m_pContentEventListeners;
+        
std::unique_ptr<comphelper::OInterfaceContainerHelper3<css::beans::XPropertySetInfoChangeListener>>
 m_pPropertySetInfoChangeListeners;
         std::unique_ptr<PropertyListeners>                  
m_pPropertyListener;
 
 
diff --git a/ucb/source/ucp/file/filnot.cxx b/ucb/source/ucp/file/filnot.cxx
index 48ac14b2fa64..6dce30f03cd8 100644
--- a/ucb/source/ucp/file/filnot.cxx
+++ b/ucb/source/ucp/file/filnot.cxx
@@ -34,7 +34,7 @@ using namespace com::sun::star::ucb;
 ContentEventNotifier::ContentEventNotifier( TaskManager* pMyShell,
                                             const uno::Reference< XContent >& 
xCreatorContent,
                                             const uno::Reference< 
XContentIdentifier >& xCreatorId,
-                                            std::vector< uno::Reference< 
uno::XInterface > >&& sListeners )
+                                            std::vector< uno::Reference< 
ucb::XContentEventListener > >&& sListeners )
     : m_pMyShell( pMyShell ),
       m_xCreatorContent( xCreatorContent ),
       m_xCreatorId( xCreatorId ),
@@ -47,7 +47,7 @@ ContentEventNotifier::ContentEventNotifier( TaskManager* 
pMyShell,
                                             const uno::Reference< XContent >& 
xCreatorContent,
                                             const uno::Reference< 
XContentIdentifier >& xCreatorId,
                                             const uno::Reference< 
XContentIdentifier >& xOldId,
-                                            std::vector< uno::Reference< 
uno::XInterface > >&& sListeners )
+                                            std::vector< uno::Reference< 
ucb::XContentEventListener > >&& sListeners )
     : m_pMyShell( pMyShell ),
       m_xCreatorContent( xCreatorContent ),
       m_xCreatorId( xCreatorId ),
@@ -68,29 +68,20 @@ void ContentEventNotifier::notifyChildInserted( const 
OUString& aChildName ) con
                        xChildContent,
                        m_xCreatorId );
 
-    for( const auto& r : m_sListeners )
-    {
-        uno::Reference< XContentEventListener > ref( r, uno::UNO_QUERY );
-        if( ref.is() )
-            ref->contentEvent( aEvt );
-    }
+    for( const auto& ref : m_sListeners )
+        ref->contentEvent( aEvt );
 }
 
 void ContentEventNotifier::notifyDeleted() const
 {
-
     ContentEvent aEvt( m_xCreatorContent,
                        ContentAction::DELETED,
                        m_xCreatorContent,
                        m_xCreatorId );
 
 
-    for( const auto& r : m_sListeners )
-    {
-        uno::Reference< XContentEventListener > ref( r, uno::UNO_QUERY );
-        if( ref.is() )
-            ref->contentEvent( aEvt );
-    }
+    for( const auto& ref : m_sListeners )
+        ref->contentEvent( aEvt );
 }
 
 
@@ -109,12 +100,8 @@ void ContentEventNotifier::notifyRemoved( const OUString& 
aChildName ) const
                        pp,
                        m_xCreatorId );
 
-    for( const auto& r : m_sListeners )
-    {
-        uno::Reference< XContentEventListener > ref( r, uno::UNO_QUERY );
-        if( ref.is() )
-            ref->contentEvent( aEvt );
-    }
+    for( const auto& ref : m_sListeners )
+        ref->contentEvent( aEvt );
 }
 
 void ContentEventNotifier::notifyExchanged() const
@@ -124,12 +111,8 @@ void ContentEventNotifier::notifyExchanged() const
                        m_xCreatorContent,
                        m_xOldId );
 
-    for( const auto& r : m_sListeners )
-    {
-        uno::Reference< XContentEventListener > ref( r, uno::UNO_QUERY );
-        if( ref.is() )
-            ref->contentEvent( aEvt );
-    }
+    for( const auto& ref : m_sListeners )
+        ref->contentEvent( aEvt );
 }
 
 
/*********************************************************************************/
@@ -141,7 +124,7 @@ void ContentEventNotifier::notifyExchanged() const
 
 PropertySetInfoChangeNotifier::PropertySetInfoChangeNotifier(
     const uno::Reference< XContent >& xCreatorContent,
-    std::vector< uno::Reference< uno::XInterface > >&& sListeners )
+    std::vector< uno::Reference< beans::XPropertySetInfoChangeListener > >&& 
sListeners )
     : m_xCreatorContent( xCreatorContent ),
       m_sListeners( std::move(sListeners) )
 {
@@ -157,12 +140,8 @@ PropertySetInfoChangeNotifier::notifyPropertyAdded( const 
OUString & aPropertyNa
                                             -1,
                                             
beans::PropertySetInfoChange::PROPERTY_INSERTED );
 
-    for( const auto& r : m_sListeners )
-    {
-        uno::Reference< beans::XPropertySetInfoChangeListener > ref( r, 
uno::UNO_QUERY );
-        if( ref.is() )
-            ref->propertySetInfoChange( aEvt );
-    }
+    for( const auto& ref : m_sListeners )
+        ref->propertySetInfoChange( aEvt );
 }
 
 
@@ -174,12 +153,8 @@ PropertySetInfoChangeNotifier::notifyPropertyRemoved( 
const OUString & aProperty
                                             -1,
                                             
beans::PropertySetInfoChange::PROPERTY_REMOVED );
 
-    for( const auto& r : m_sListeners )
-    {
-        uno::Reference< beans::XPropertySetInfoChangeListener > ref( r, 
uno::UNO_QUERY );
-        if( ref.is() )
-            ref->propertySetInfoChange( aEvt );
-    }
+    for( const auto& ref : m_sListeners )
+        ref->propertySetInfoChange( aEvt );
 }
 
 
diff --git a/ucb/source/ucp/file/filnot.hxx b/ucb/source/ucp/file/filnot.hxx
index a34d1bc07462..0d336ad0697b 100644
--- a/ucb/source/ucp/file/filnot.hxx
+++ b/ucb/source/ucp/file/filnot.hxx
@@ -21,6 +21,7 @@
 #include <com/sun/star/uno/Sequence.hxx>
 #include <com/sun/star/uno/XInterface.hpp>
 #include <com/sun/star/beans/PropertyChangeEvent.hpp>
+#include <com/sun/star/beans/XPropertySetInfoChangeListener.hpp>
 #include <com/sun/star/ucb/XContentIdentifier.hpp>
 #include <com/sun/star/ucb/XContent.hpp>
 #include <memory>
@@ -39,21 +40,21 @@ namespace fileaccess {
         css::uno::Reference< css::ucb::XContent > m_xCreatorContent;
         css::uno::Reference< css::ucb::XContentIdentifier > m_xCreatorId;
         css::uno::Reference< css::ucb::XContentIdentifier > m_xOldId;
-        std::vector< css::uno::Reference< css::uno::XInterface > > 
m_sListeners;
+        std::vector< css::uno::Reference< css::ucb::XContentEventListener > > 
m_sListeners;
     public:
 
         ContentEventNotifier(
             TaskManager* pMyShell,
             const css::uno::Reference< css::ucb::XContent >& xCreatorContent,
             const css::uno::Reference< css::ucb::XContentIdentifier >& 
xCreatorId,
-            std::vector< css::uno::Reference< css::uno::XInterface > >&& 
sListeners );
+            std::vector< css::uno::Reference< css::ucb::XContentEventListener 
> >&& sListeners );
 
         ContentEventNotifier(
             TaskManager* pMyShell,
             const css::uno::Reference< css::ucb::XContent >& xCreatorContent,
             const css::uno::Reference< css::ucb::XContentIdentifier >& 
xCreatorId,
             const css::uno::Reference< css::ucb::XContentIdentifier >& xOldId,
-            std::vector< css::uno::Reference< css::uno::XInterface > >&& 
sListeners );
+            std::vector< css::uno::Reference< css::ucb::XContentEventListener 
> >&& sListeners );
 
         void notifyChildInserted( const OUString& aChildName ) const;
         void notifyDeleted() const;
@@ -66,11 +67,11 @@ namespace fileaccess {
     {
     private:
         css::uno::Reference< css::ucb::XContent > m_xCreatorContent;
-        std::vector< css::uno::Reference< css::uno::XInterface > > 
m_sListeners;
+        std::vector< css::uno::Reference< 
css::beans::XPropertySetInfoChangeListener > > m_sListeners;
     public:
         PropertySetInfoChangeNotifier(
             const css::uno::Reference< css::ucb::XContent >& xCreatorContent,
-            std::vector< css::uno::Reference< css::uno::XInterface > >&& 
sListeners );
+            std::vector< css::uno::Reference< 
css::beans::XPropertySetInfoChangeListener > >&& sListeners );
 
         void notifyPropertyAdded( const OUString & aPropertyName ) const;
         void notifyPropertyRemoved( const OUString & aPropertyName ) const;
diff --git a/ucb/source/ucp/file/filrset.cxx b/ucb/source/ucp/file/filrset.cxx
index 2d954a8c6d7f..5d880cc4a819 100644
--- a/ucb/source/ucp/file/filrset.cxx
+++ b/ucb/source/ucp/file/filrset.cxx
@@ -100,7 +100,7 @@ XResultSet_impl::addEventListener(
 
     if ( ! m_pDisposeEventListeners )
         m_pDisposeEventListeners.reset(
-            new comphelper::OInterfaceContainerHelper2( m_aEventListenerMutex 
) );
+            new comphelper::OInterfaceContainerHelper3<lang::XEventListener>( 
m_aEventListenerMutex ) );
 
     m_pDisposeEventListeners->addInterface( Listener );
 }
@@ -143,7 +143,7 @@ XResultSet_impl::dispose()
 void XResultSet_impl::rowCountChanged()
 {
     sal_Int32 aOldValue,aNewValue;
-    std::vector< uno::Reference< uno::XInterface > > seq;
+    std::vector< uno::Reference< beans::XPropertyChangeListener > > seq;
     {
         osl::MutexGuard aGuard( m_aMutex );
         if( m_pRowCountListeners )
@@ -157,19 +157,14 @@ void XResultSet_impl::rowCountChanged()
     aEv.PropertyHandle = -1;
     aEv.OldValue <<= aOldValue;
     aEv.NewValue <<= aNewValue;
-    for( const auto& r : seq )
-    {
-        uno::Reference< beans::XPropertyChangeListener > listener(
-            r, uno::UNO_QUERY );
-        if( listener.is() )
-            listener->propertyChange( aEv );
-    }
+    for( const auto& listener : seq )
+        listener->propertyChange( aEv );
 }
 
 
 void XResultSet_impl::isFinalChanged()
 {
-    std::vector< uno::Reference< XInterface > > seq;
+    std::vector< uno::Reference< beans::XPropertyChangeListener > > seq;
     {
         osl::MutexGuard aGuard( m_aMutex );
         if( m_pIsFinalListeners )
@@ -182,13 +177,8 @@ void XResultSet_impl::isFinalChanged()
     aEv.PropertyHandle = -1;
     aEv.OldValue <<= false;
     aEv.NewValue <<= true;
-    for( const auto& r : seq )
-    {
-        uno::Reference< beans::XPropertyChangeListener > listener(
-            r, uno::UNO_QUERY );
-        if( listener.is() )
-            listener->propertyChange( aEv );
-    }
+    for( const auto& listener : seq )
+        listener->propertyChange( aEv );
 }
 
 
@@ -661,7 +651,7 @@ void SAL_CALL XResultSet_impl::addPropertyChangeListener(
         osl::MutexGuard aGuard( m_aMutex );
         if ( ! m_pIsFinalListeners )
             m_pIsFinalListeners.reset(
-                new comphelper::OInterfaceContainerHelper2( 
m_aEventListenerMutex ) );
+                new 
comphelper::OInterfaceContainerHelper3<beans::XPropertyChangeListener>( 
m_aEventListenerMutex ) );
 
         m_pIsFinalListeners->addInterface( xListener );
     }
@@ -670,7 +660,7 @@ void SAL_CALL XResultSet_impl::addPropertyChangeListener(
         osl::MutexGuard aGuard( m_aMutex );
         if ( ! m_pRowCountListeners )
             m_pRowCountListeners.reset(
-                new comphelper::OInterfaceContainerHelper2( 
m_aEventListenerMutex ) );
+                new 
comphelper::OInterfaceContainerHelper3<beans::XPropertyChangeListener>( 
m_aEventListenerMutex ) );
         m_pRowCountListeners->addInterface( xListener );
     }
     else
diff --git a/ucb/source/ucp/file/filrset.hxx b/ucb/source/ucp/file/filrset.hxx
index 07fa1343faf7..a1457e76ea79 100644
--- a/ucb/source/ucp/file/filrset.hxx
+++ b/ucb/source/ucp/file/filrset.hxx
@@ -21,7 +21,7 @@
 #include <vector>
 #include <osl/file.hxx>
 
-#include <comphelper/interfacecontainer2.hxx>
+#include <comphelper/interfacecontainer3.hxx>
 #include <com/sun/star/ucb/XContentAccess.hpp>
 #include <com/sun/star/sdbc/XCloseable.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
@@ -409,9 +409,9 @@ class XResultSet_impl :
 
         osl::Mutex                          m_aMutex;
         osl::Mutex                          m_aEventListenerMutex;
-        std::unique_ptr<comphelper::OInterfaceContainerHelper2>   
m_pDisposeEventListeners;
-        std::unique_ptr<comphelper::OInterfaceContainerHelper2>   
m_pRowCountListeners;
-        std::unique_ptr<comphelper::OInterfaceContainerHelper2>   
m_pIsFinalListeners;
+        
std::unique_ptr<comphelper::OInterfaceContainerHelper3<css::lang::XEventListener>>
 m_pDisposeEventListeners;
+        
std::unique_ptr<comphelper::OInterfaceContainerHelper3<css::beans::XPropertyChangeListener>>
 m_pRowCountListeners;
+        
std::unique_ptr<comphelper::OInterfaceContainerHelper3<css::beans::XPropertyChangeListener>>
 m_pIsFinalListeners;
 
         css::uno::Reference< css::ucb::XDynamicResultSetListener >       
m_xListener;
 
diff --git a/ucb/source/ucp/ftp/ftpresultsetbase.cxx 
b/ucb/source/ucp/ftp/ftpresultsetbase.cxx
index 5a9a3326062d..815145918853 100644
--- a/ucb/source/ucp/ftp/ftpresultsetbase.cxx
+++ b/ucb/source/ucp/ftp/ftpresultsetbase.cxx
@@ -89,7 +89,7 @@ ResultSetBase::addEventListener(
 
     if ( ! m_pDisposeEventListeners )
         m_pDisposeEventListeners.reset(
-            new comphelper::OInterfaceContainerHelper2( m_aMutex ) );
+            new comphelper::OInterfaceContainerHelper3<lang::XEventListener>( 
m_aMutex ) );
 
     m_pDisposeEventListeners->addInterface( Listener );
 }
@@ -446,7 +446,7 @@ void SAL_CALL ResultSetBase::addPropertyChangeListener(
         osl::MutexGuard aGuard( m_aMutex );
         if ( ! m_pIsFinalListeners )
             m_pIsFinalListeners.reset(
-                new comphelper::OInterfaceContainerHelper2( m_aMutex ) );
+                new 
comphelper::OInterfaceContainerHelper3<beans::XPropertyChangeListener>( 
m_aMutex ) );
 
         m_pIsFinalListeners->addInterface( xListener );
     }
@@ -455,7 +455,7 @@ void SAL_CALL ResultSetBase::addPropertyChangeListener(
         osl::MutexGuard aGuard( m_aMutex );
         if ( ! m_pRowCountListeners )
             m_pRowCountListeners.reset(
-                new comphelper::OInterfaceContainerHelper2( m_aMutex ) );
+                new 
comphelper::OInterfaceContainerHelper3<beans::XPropertyChangeListener>( 
m_aMutex ) );
         m_pRowCountListeners->addInterface( xListener );
     }
     else
diff --git a/ucb/source/ucp/ftp/ftpresultsetbase.hxx 
b/ucb/source/ucp/ftp/ftpresultsetbase.hxx
index f20a4eb4219c..cfb447f6ef04 100644
--- a/ucb/source/ucp/ftp/ftpresultsetbase.hxx
+++ b/ucb/source/ucp/ftp/ftpresultsetbase.hxx
@@ -20,7 +20,7 @@
 
 #include <vector>
 #include <cppuhelper/weak.hxx>
-#include <comphelper/interfacecontainer2.hxx>
+#include <comphelper/interfacecontainer3.hxx>
 #include <com/sun/star/lang/XComponent.hpp>
 #include <com/sun/star/ucb/XContentAccess.hpp>
 #include <com/sun/star/sdbc/XCloseable.hpp>
@@ -398,9 +398,9 @@ namespace ftp {
                                             m_sProperty;
 
         osl::Mutex                          m_aMutex;
-        std::unique_ptr<comphelper::OInterfaceContainerHelper2>   
m_pDisposeEventListeners;
-        std::unique_ptr<comphelper::OInterfaceContainerHelper2>   
m_pRowCountListeners;
-        std::unique_ptr<comphelper::OInterfaceContainerHelper2>   
m_pIsFinalListeners;
+        
std::unique_ptr<comphelper::OInterfaceContainerHelper3<css::lang::XEventListener>>
 m_pDisposeEventListeners;
+        
std::unique_ptr<comphelper::OInterfaceContainerHelper3<css::beans::XPropertyChangeListener>>
 m_pRowCountListeners;
+        
std::unique_ptr<comphelper::OInterfaceContainerHelper3<css::beans::XPropertyChangeListener>>
 m_pIsFinalListeners;
     };
 
 
diff --git a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx 
b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
index 3345df6fe76c..afd9f350ca42 100644
--- a/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchydatasource.cxx
@@ -243,7 +243,7 @@ void SAL_CALL HierarchyDataSource::addEventListener(
 
     if ( !m_pDisposeEventListeners )
         m_pDisposeEventListeners.reset(
-            new comphelper::OInterfaceContainerHelper2( m_aMutex ) );
+            new comphelper::OInterfaceContainerHelper3<lang::XEventListener>( 
m_aMutex ) );
 
     m_pDisposeEventListeners->addInterface( Listener );
 }
diff --git a/ucb/source/ucp/hierarchy/hierarchydatasource.hxx 
b/ucb/source/ucp/hierarchy/hierarchydatasource.hxx
index 24b3a18491d6..54ff6c309057 100644
--- a/ucb/source/ucp/hierarchy/hierarchydatasource.hxx
+++ b/ucb/source/ucp/hierarchy/hierarchydatasource.hxx
@@ -25,11 +25,11 @@
 #include <com/sun/star/lang/XServiceInfo.hpp>
 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
+#include <comphelper/interfacecontainer3.hxx>
 #include <cppuhelper/implbase.hxx>
 #include <memory>
 #include <string_view>
 
-namespace comphelper { class OInterfaceContainerHelper2; }
 
 namespace hierarchy_ucp {
 
@@ -42,7 +42,7 @@ class HierarchyDataSource : public cppu::WeakImplHelper<
     osl::Mutex m_aMutex;
     css::uno::Reference< css::uno::XComponentContext >     m_xContext;
     css::uno::Reference< css::lang::XMultiServiceFactory >  m_xConfigProvider;
-    std::unique_ptr<comphelper::OInterfaceContainerHelper2> 
m_pDisposeEventListeners;
+    
std::unique_ptr<comphelper::OInterfaceContainerHelper3<css::lang::XEventListener>>
 m_pDisposeEventListeners;
 
 public:
     explicit HierarchyDataSource( const css::uno::Reference< 
css::uno::XComponentContext > & rxContext );
commit cda9a5af36977420bae34737cd7b52cddb3226ef
Author:     Gabor Kelemen <kelem...@ubuntu.com>
AuthorDate: Mon Nov 29 21:26:03 2021 +0100
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue Nov 30 09:51:14 2021 +0100

    tdf#145819 Revert logic of the image-with-rotation dialog
    
    Change-Id: Ibca1092699e3a7edd37161f421f3d369a4eb49a6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126070
    Tested-by: Jenkins
    Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org>

diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx 
b/sw/source/uibase/dochdl/swdtflvr.cxx
index 45e13b3272fd..7c9917a83825 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -426,7 +426,9 @@ namespace
         {
             std::unique_ptr<weld::Builder> 
xBuilder(Application::CreateBuilder(nullptr, 
"modules/swriter/ui/queryrotateintostandarddialog.ui"));
             std::unique_ptr<weld::MessageDialog> 
xQueryBox(xBuilder->weld_message_dialog("QueryRotateIntoStandardOrientationDialog"));
-            if (xQueryBox->run() == RET_YES)
+            // tdf#145819 Apply the rotation information if the user does NOT 
want to unrotate the image
+            // If they chose Yes we ignore the rotation
+            if (xQueryBox->run() == RET_NO)
             {
                 GraphicNativeTransform aTransform( aGraphic );
                 aTransform.rotate( aRotation );

Reply via email to