diff options
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/richtext/richtextcontrol.cxx | 6 | ||||
-rw-r--r-- | forms/source/solar/component/navbarcontrol.cxx | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx index 39a29a2b9651..7377389189e0 100644 --- a/forms/source/richtext/richtextcontrol.cxx +++ b/forms/source/richtext/richtextcontrol.cxx @@ -314,7 +314,7 @@ namespace frm { { SolarMutexGuard aGuard; - RichTextControl* pRichTextControl = static_cast< RichTextControl* >( GetWindow() ); + VclPtr< RichTextControl > pRichTextControl = GetAs< RichTextControl* >(); if ( pRichTextControl ) { @@ -417,7 +417,7 @@ namespace frm } else if ( _rPropertyName == PROPERTY_HIDEINACTIVESELECTION ) { - RichTextControl* pRichTextControl = static_cast< RichTextControl* >( GetWindow() ); + VclPtr< RichTextControl > pRichTextControl = GetAs< RichTextControl* >(); bool bHide = pRichTextControl->GetHideInactiveSelection(); OSL_VERIFY( _rValue >>= bHide ); pRichTextControl->SetHideInactiveSelection( bHide ); @@ -469,7 +469,7 @@ namespace frm ORichTextPeer::SingleAttributeDispatcher ORichTextPeer::implCreateDispatcher( SfxSlotId _nSlotId, const ::com::sun::star::util::URL& _rURL ) { - RichTextControl* pRichTextControl = static_cast< RichTextControl* >( GetWindow() ); + VclPtr< RichTextControl > pRichTextControl = GetAs< RichTextControl* >(); OSL_PRECOND( pRichTextControl, "ORichTextPeer::implCreateDispatcher: invalid window!" ); if ( !pRichTextControl ) return SingleAttributeDispatcher( NULL ); diff --git a/forms/source/solar/component/navbarcontrol.cxx b/forms/source/solar/component/navbarcontrol.cxx index 3f2afea11653..695aadcd3bb2 100644 --- a/forms/source/solar/component/navbarcontrol.cxx +++ b/forms/source/solar/component/navbarcontrol.cxx @@ -275,7 +275,7 @@ namespace frm { SolarMutexGuard aGuard; - NavigationToolBar* pNavBar = static_cast< NavigationToolBar* >( GetWindow() ); + VclPtr< NavigationToolBar > pNavBar = GetAs< NavigationToolBar >(); if ( !pNavBar ) { VCLXWindow::setProperty( _rPropertyName, _rValue ); @@ -356,7 +356,7 @@ namespace frm SolarMutexGuard aGuard; Any aReturn; - NavigationToolBar* pNavBar = static_cast< NavigationToolBar* >( GetWindow() ); + VclPtr< NavigationToolBar > pNavBar = GetAs< NavigationToolBar >(); if ( _rPropertyName == PROPERTY_BACKGROUNDCOLOR ) { @@ -408,7 +408,7 @@ namespace frm void ONavigationBarPeer::featureStateChanged( sal_Int16 _nFeatureId, bool _bEnabled ) { // enable this button on the toolbox - NavigationToolBar* pNavBar = static_cast< NavigationToolBar* >( GetWindow() ); + VclPtr< NavigationToolBar > pNavBar = GetAs< NavigationToolBar >(); if ( pNavBar ) { pNavBar->enableFeature( _nFeatureId, _bEnabled ); @@ -436,7 +436,7 @@ namespace frm void ONavigationBarPeer::allFeatureStatesChanged( ) { // force the control to update it's states - NavigationToolBar* pNavBar = static_cast< NavigationToolBar* >( GetWindow() ); + VclPtr< NavigationToolBar > pNavBar = GetAs< NavigationToolBar >(); if ( pNavBar ) pNavBar->setDispatcher( this ); |