summaryrefslogtreecommitdiff
path: root/UnoControls
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-04-23 20:15:24 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2023-05-27 15:20:51 +0200
commit5c1c768e128d9356cbe17adb96ef6290ec3bb1ad (patch)
tree93164f6c292e6d90b184e1008f4238db31b9bfc0 /UnoControls
parent1aba7cd7385a08e450a4b86ce0b378be5eedb903 (diff)
Use getXWeak in UnoControls
Change-Id: I4e1deaffb3c6926bf57715cb10fc38bf59f791a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150880 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'UnoControls')
-rw-r--r--UnoControls/source/base/basecontainercontrol.cxx2
-rw-r--r--UnoControls/source/controls/framecontrol.cxx2
-rw-r--r--UnoControls/source/controls/statusindicator.cxx4
3 files changed, 4 insertions, 4 deletions
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);