diff options
Diffstat (limited to 'accessibility/source/extended')
7 files changed, 17 insertions, 20 deletions
diff --git a/accessibility/source/extended/AccessibleToolPanelDeck.cxx b/accessibility/source/extended/AccessibleToolPanelDeck.cxx index dfb8ede26120..4f69764bcf29 100644 --- a/accessibility/source/extended/AccessibleToolPanelDeck.cxx +++ b/accessibility/source/extended/AccessibleToolPanelDeck.cxx @@ -76,7 +76,7 @@ namespace accessibility ); void checkDisposed(); - bool isDisposed() const { return m_pPanelDeck == NULL; } + bool isDisposed() const { return m_pPanelDeck == nullptr; } void dispose(); virtual ~AccessibleToolPanelDeck_Impl(); @@ -95,7 +95,7 @@ namespace accessibility public: AccessibleToolPanelDeck& m_rAntiImpl; Reference< XAccessible > m_xAccessibleParent; - ::svt::ToolPanelDeck* m_pPanelDeck; + VclPtr<::svt::ToolPanelDeck> m_pPanelDeck; Reference< XAccessible > m_xActivePanelAccessible; }; @@ -141,7 +141,7 @@ namespace accessibility { ENSURE_OR_RETURN_VOID( !isDisposed(), "disposed twice" ); m_pPanelDeck->RemoveListener( *this ); - m_pPanelDeck = NULL; + m_pPanelDeck.clear(); m_xAccessibleParent.clear(); } diff --git a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx index 757c45257c6e..1700aed946b1 100644 --- a/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx +++ b/accessibility/source/extended/AccessibleToolPanelDeckTabBar.cxx @@ -120,7 +120,7 @@ namespace accessibility AccessibleToolPanelTabBar& m_rAntiImpl; Reference< XAccessible > m_xAccessibleParent; ::svt::IToolPanelDeck* m_pPanelDeck; - ::svt::PanelTabBar* m_pTabBar; + VclPtr<::svt::PanelTabBar> m_pTabBar; ::std::vector< Reference< XAccessible > > m_aChildren; }; @@ -163,7 +163,7 @@ namespace accessibility m_pTabBar->GetScrollButton( true ).RemoveEventListener( LINK( this, AccessibleToolPanelTabBar_Impl, OnWindowEvent ) ); m_pTabBar->GetScrollButton( false ).RemoveEventListener( LINK( this, AccessibleToolPanelTabBar_Impl, OnWindowEvent ) ); - m_pTabBar = NULL; + m_pTabBar.clear(); m_xAccessibleParent.clear(); } diff --git a/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx b/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx index 33bca93ae759..f89cb3d7f807 100644 --- a/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx +++ b/accessibility/source/extended/AccessibleToolPanelDeckTabBarItem.cxx @@ -105,7 +105,7 @@ namespace accessibility AccessibleToolPanelDeckTabBarItem& m_rAntiImpl; Reference< XAccessible > m_xAccessibleParent; ::svt::IToolPanelDeck* m_pPanelDeck; - ::svt::PanelTabBar* m_pTabBar; + VclPtr<::svt::PanelTabBar> m_pTabBar; size_t m_nItemPos; }; @@ -139,7 +139,7 @@ namespace accessibility m_xAccessibleParent.clear(); m_pPanelDeck->RemoveListener( *this ); m_pPanelDeck = NULL; - m_pTabBar = NULL; + m_pTabBar.clear(); } Reference< XAccessibleComponent > AccessibleToolPanelDeckTabBarItem_Impl::getParentAccessibleComponent() const diff --git a/accessibility/source/extended/accessibleiconchoicectrl.cxx b/accessibility/source/extended/accessibleiconchoicectrl.cxx index 5ed05d9c27e1..1d512aa0631c 100644 --- a/accessibility/source/extended/accessibleiconchoicectrl.cxx +++ b/accessibility/source/extended/accessibleiconchoicectrl.cxx @@ -367,12 +367,11 @@ namespace accessibility } } - SvtIconChoiceCtrl* AccessibleIconChoiceCtrl::getCtrl() + VclPtr< SvtIconChoiceCtrl > AccessibleIconChoiceCtrl::getCtrl() { - return static_cast<SvtIconChoiceCtrl*>(GetWindow()); + return GetAs<SvtIconChoiceCtrl >(); } - }// namespace accessibility diff --git a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx index 8a5e6efef8ba..811fca30f4b5 100644 --- a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx +++ b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx @@ -91,7 +91,7 @@ throw(RuntimeException, std::exception) if ( _rSource.Source == m_xParent ) { dispose(); - OSL_ENSURE( !m_xParent.is() && ( NULL == m_pIconCtrl ), "" ); + OSL_ENSURE( !m_xParent.is() && ( nullptr == m_pIconCtrl ), "" ); } } diff --git a/accessibility/source/extended/accessiblelistbox.cxx b/accessibility/source/extended/accessiblelistbox.cxx index 2c33734abd30..22cc0202e7bb 100644 --- a/accessibility/source/extended/accessiblelistbox.cxx +++ b/accessibility/source/extended/accessiblelistbox.cxx @@ -67,11 +67,6 @@ namespace accessibility IMPLEMENT_FORWARD_XINTERFACE2(AccessibleListBox, VCLXAccessibleComponent, AccessibleListBox_BASE) IMPLEMENT_FORWARD_XTYPEPROVIDER2(AccessibleListBox, VCLXAccessibleComponent, AccessibleListBox_BASE) - SvTreeListBox* AccessibleListBox::getListBox() const - { - return static_cast< SvTreeListBox* >( GetWindow() ); - } - void AccessibleListBox::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { if ( isAlive() ) @@ -592,7 +587,10 @@ namespace accessibility } } - + VclPtr< SvTreeListBox > AccessibleListBox::getListBox() const + { + return GetAs< SvTreeListBox >(); + } }// namespace accessibility diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx index 2dd16ace0380..fbe72a0e9d07 100644 --- a/accessibility/source/extended/textwindowaccessibility.cxx +++ b/accessibility/source/extended/textwindowaccessibility.cxx @@ -47,17 +47,17 @@ void SfxListenerGuard::endListening() void WindowListenerGuard::startListening(vcl::Window & rNotifier) { - OSL_ENSURE(m_pNotifier == 0, "called more than once"); + OSL_ENSURE(m_pNotifier == nullptr, "called more than once"); m_pNotifier = &rNotifier; m_pNotifier->AddEventListener(m_aListener); } void WindowListenerGuard::endListening() { - if (m_pNotifier != 0) + if (m_pNotifier) { m_pNotifier->RemoveEventListener(m_aListener); - m_pNotifier = 0; + m_pNotifier = nullptr; } } |