summaryrefslogtreecommitdiff
path: root/accessibility/source/standard/vclxaccessiblebutton.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'accessibility/source/standard/vclxaccessiblebutton.cxx')
-rw-r--r--accessibility/source/standard/vclxaccessiblebutton.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/accessibility/source/standard/vclxaccessiblebutton.cxx b/accessibility/source/standard/vclxaccessiblebutton.cxx
index 622565a8d6f3..ae3698d6b298 100644
--- a/accessibility/source/standard/vclxaccessiblebutton.cxx
+++ b/accessibility/source/standard/vclxaccessiblebutton.cxx
@@ -65,7 +65,7 @@ void VCLXAccessibleButton::ProcessWindowEvent( const VclWindowEvent& rVclWindowE
Any aOldValue;
Any aNewValue;
- PushButton* pButton = static_cast<PushButton*>( GetWindow() );
+ VclPtr< PushButton > pButton = GetAs< PushButton >();
if ( pButton && pButton->GetState() == TRISTATE_TRUE )
aNewValue <<= AccessibleStateType::CHECKED;
else
@@ -85,7 +85,7 @@ void VCLXAccessibleButton::FillAccessibleStateSet( utl::AccessibleStateSetHelper
{
VCLXAccessibleTextComponent::FillAccessibleStateSet( rStateSet );
- PushButton* pButton = static_cast<PushButton*>( GetWindow() );
+ VclPtr< PushButton > pButton = GetAs< PushButton >();
if ( pButton )
{
rStateSet.AddState( AccessibleStateType::FOCUSABLE );
@@ -196,7 +196,7 @@ sal_Bool VCLXAccessibleButton::doAccessibleAction ( sal_Int32 nIndex ) throw (In
if ( nIndex < 0 || nIndex >= getAccessibleActionCount() )
throw IndexOutOfBoundsException();
- PushButton* pButton = static_cast<PushButton*>( GetWindow() );
+ VclPtr< PushButton > pButton = GetAs< PushButton >();
if ( pButton )
pButton->Click();
@@ -264,7 +264,7 @@ Any VCLXAccessibleButton::getCurrentValue( ) throw (RuntimeException, std::exce
Any aValue;
- PushButton* pButton = static_cast<PushButton*>( GetWindow() );
+ VclPtr< PushButton > pButton = GetAs< PushButton >();
if ( pButton )
aValue <<= (sal_Int32) pButton->IsPressed();
@@ -279,7 +279,7 @@ sal_Bool VCLXAccessibleButton::setCurrentValue( const Any& aNumber ) throw (Runt
bool bReturn = false;
- PushButton* pButton = static_cast<PushButton*>( GetWindow() );
+ VclPtr< PushButton > pButton = GetAs< PushButton >();
if ( pButton )
{
sal_Int32 nValue = 0;