UnoControls/source/base/basecontainercontrol.cxx |    2 +-
 UnoControls/source/controls/framecontrol.cxx     |    2 +-
 UnoControls/source/controls/statusindicator.cxx  |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 5c1c768e128d9356cbe17adb96ef6290ec3bb1ad
Author:     Mike Kaganski <[email protected]>
AuthorDate: Sun Apr 23 20:15:24 2023 +0300
Commit:     Mike Kaganski <[email protected]>
CommitDate: Sat May 27 15:20:51 2023 +0200

    Use getXWeak in UnoControls
    
    Change-Id: I4e1deaffb3c6926bf57715cb10fc38bf59f791a2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150880
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <[email protected]>

diff --git a/UnoControls/source/base/basecontainercontrol.cxx 
b/UnoControls/source/base/basecontainercontrol.cxx
index 7a6bd508e5b8..bf638a9c56a4 100644
--- a/UnoControls/source/base/basecontainercontrol.cxx
+++ b/UnoControls/source/base/basecontainercontrol.cxx
@@ -185,7 +185,7 @@ void SAL_CALL BaseContainerControl::addControl ( const 
OUString& rName, const Re
     maControlInfoList.emplace_back( aNewControl );
 
     // initialize new control
-    aNewControl.xControl->setContext       ( static_cast<OWeakObject*>(this)   
 );
+    aNewControl.xControl->setContext       (getXWeak());
     aNewControl.xControl->addEventListener ( static_cast< XEventListener* >( 
static_cast< XWindowListener* >( this ) ) );
 
     // when container has a peer...
diff --git a/UnoControls/source/controls/framecontrol.cxx 
b/UnoControls/source/controls/framecontrol.cxx
index 54a0f36f6d05..87dd4a07f6f9 100644
--- a/UnoControls/source/controls/framecontrol.cxx
+++ b/UnoControls/source/controls/framecontrol.cxx
@@ -252,7 +252,7 @@ sal_Bool FrameControl::convertFastPropertyValue(        
Any&        rConvertedVa
 
     if ( !bReturn )
     {
-        throw IllegalArgumentException("unknown handle " + 
OUString::number(nHandle), static_cast<cppu::OWeakObject*>(this), 1);
+        throw IllegalArgumentException("unknown handle " + 
OUString::number(nHandle), getXWeak(), 1);
     }
 
     return bReturn;
diff --git a/UnoControls/source/controls/statusindicator.cxx 
b/UnoControls/source/controls/statusindicator.cxx
index ac4b1c86b7b2..448b193d9a61 100644
--- a/UnoControls/source/controls/statusindicator.cxx
+++ b/UnoControls/source/controls/statusindicator.cxx
@@ -139,7 +139,7 @@ void SAL_CALL StatusIndicator::start( const OUString& 
sText, sal_Int32 nRange )
     m_xText->setText( sText );
     m_xProgressBar->setRange( 0, nRange );
     // force repaint ... fixedtext has changed !
-    impl_recalcLayout ( WindowEvent(static_cast< OWeakObject* 
>(this),0,0,impl_getWidth(),impl_getHeight(),0,0,0,0) );
+    impl_recalcLayout ( 
WindowEvent(getXWeak(),0,0,impl_getWidth(),impl_getHeight(),0,0,0,0) );
 }
 
 //  XStatusIndicator
@@ -311,7 +311,7 @@ void SAL_CALL StatusIndicator::setPosSize (
        )
     {
         // calc new layout for controls
-        impl_recalcLayout ( WindowEvent(static_cast< OWeakObject* 
>(this),0,0,nWidth,nHeight,0,0,0,0) );
+        impl_recalcLayout ( WindowEvent(getXWeak(),0,0,nWidth,nHeight,0,0,0,0) 
);
         // clear background (!)
         // [Children were repainted in "recalcLayout" by setPosSize() 
automatically!]
         getPeer()->invalidate(2);

Reply via email to