ucbhelper/source/provider/contenthelper.cxx   |   12 ++++++------
 ucbhelper/source/provider/resultset.cxx       |    4 ++--
 ucbhelper/source/provider/resultsethelper.cxx |    2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit d4182557b5cba1d56041792dfddbd89a131f6ada
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Sun Apr 23 20:15:21 2023 +0300
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Sat May 27 20:14:40 2023 +0200

    Use getXWeak in ucbhelper
    
    Change-Id: I6bdc3acf86854fe3f91aa09cb52d67a2b11ca8e7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150879
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/ucbhelper/source/provider/contenthelper.cxx 
b/ucbhelper/source/provider/contenthelper.cxx
index 3a8b8f19a604..1e5147f6fb7b 100644
--- a/ucbhelper/source/provider/contenthelper.cxx
+++ b/ucbhelper/source/provider/contenthelper.cxx
@@ -455,7 +455,7 @@ void SAL_CALL ContentImplHelper::addProperty(
          m_pImpl->m_pPropSetChangeListeners->getLength() )
     {
         beans::PropertySetInfoChangeEvent evt(
-                    static_cast< cppu::OWeakObject * >( this ),
+                    getXWeak(),
                     Name,
                     -1, // No handle available
                     beans::PropertySetInfoChange::PROPERTY_INSERTED );
@@ -551,7 +551,7 @@ void SAL_CALL ContentImplHelper::removeProperty( const 
OUString& Name )
          m_pImpl->m_pPropSetChangeListeners->getLength() )
     {
         beans::PropertySetInfoChangeEvent evt(
-                    static_cast< cppu::OWeakObject * >( this ),
+                    getXWeak(),
                     Name,
                     -1, // No handle available
                     beans::PropertySetInfoChange::PROPERTY_REMOVED );
@@ -752,7 +752,7 @@ void ContentImplHelper::inserted()
     if ( xParent.is() )
     {
         css::ucb::ContentEvent aEvt(
-            static_cast< cppu::OWeakObject * >( xParent.get() ), // Source
+            xParent->getXWeak(), // Source
             css::ucb::ContentAction::INSERTED,        // Action
             this,                                                // Content
             xParent->getIdentifier() );                          // Id
@@ -771,7 +771,7 @@ void ContentImplHelper::deleted()
     {
         // Let parent notify "REMOVED" event.
         css::ucb::ContentEvent aEvt(
-            static_cast< cppu::OWeakObject * >( xParent.get() ),
+            xParent->getXWeak(),
             css::ucb::ContentAction::REMOVED,
             this,
             xParent->getIdentifier()    );
@@ -780,7 +780,7 @@ void ContentImplHelper::deleted()
 
     // Notify "DELETED" event.
     css::ucb::ContentEvent aEvt1(
-        static_cast< cppu::OWeakObject * >( this ),
+        getXWeak(),
         css::ucb::ContentAction::DELETED,
         this,
         getIdentifier() );
@@ -818,7 +818,7 @@ bool ContentImplHelper::exchange(
 
     // Notify "EXCHANGED" event.
     css::ucb::ContentEvent aEvt(
-        static_cast< cppu::OWeakObject * >( this ),
+        getXWeak(),
         css::ucb::ContentAction::EXCHANGED,
         this,
         xOldId );
diff --git a/ucbhelper/source/provider/resultset.cxx 
b/ucbhelper/source/provider/resultset.cxx
index b443a32e1b39..61682f4fd539 100644
--- a/ucbhelper/source/provider/resultset.cxx
+++ b/ucbhelper/source/provider/resultset.cxx
@@ -1329,7 +1329,7 @@ void ResultSet::rowCountChanged( sal_uInt32 nOld, 
sal_uInt32 nNew )
 
     propertyChanged(
         beans::PropertyChangeEvent(
-            static_cast< cppu::OWeakObject * >( this ),
+            getXWeak(),
             "RowCount",
             false,
             1001,
@@ -1345,7 +1345,7 @@ void ResultSet::rowCountFinal()
 
     propertyChanged(
         beans::PropertyChangeEvent(
-            static_cast< cppu::OWeakObject * >( this ),
+            getXWeak(),
             "IsRowCountFinal",
             false,
             1000,
diff --git a/ucbhelper/source/provider/resultsethelper.cxx 
b/ucbhelper/source/provider/resultsethelper.cxx
index 3d45f8a5a8a3..788e6811a100 100644
--- a/ucbhelper/source/provider/resultsethelper.cxx
+++ b/ucbhelper/source/provider/resultsethelper.cxx
@@ -169,7 +169,7 @@ void SAL_CALL ResultSetImplHelper::setListener(
 
     Listener->notify(
         css::ucb::ListEvent(
-            static_cast< cppu::OWeakObject * >( this ), aActions ) );
+            getXWeak(), aActions ) );
 }
 
 

Reply via email to