diff options
Diffstat (limited to 'sd/source/ui/accessibility/AccessibleOutlineView.cxx')
-rw-r--r-- | sd/source/ui/accessibility/AccessibleOutlineView.cxx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/sd/source/ui/accessibility/AccessibleOutlineView.cxx b/sd/source/ui/accessibility/AccessibleOutlineView.cxx index 1e71a03cc8ae..9e165b4c2686 100644 --- a/sd/source/ui/accessibility/AccessibleOutlineView.cxx +++ b/sd/source/ui/accessibility/AccessibleOutlineView.cxx @@ -70,23 +70,23 @@ AccessibleOutlineView::AccessibleOutlineView ( // Beware! Here we leave the paths of the UNO API and descend into the // depths of the core. Necessary for making the edit engine accessible. - if (pSdWindow) - { - ::sd::View* pView = pViewShell->GetView(); + if (!pSdWindow) + return; - if (dynamic_cast<const ::sd::OutlineView* >( pView ) != nullptr) - { - OutlinerView* pOutlineView = static_cast< ::sd::OutlineView*>( - pView)->GetViewByWindow( pSdWindow ); - SdrOutliner& rOutliner = - static_cast< ::sd::OutlineView*>(pView)->GetOutliner(); + ::sd::View* pView = pViewShell->GetView(); - if( pOutlineView ) - { - maTextHelper.SetEditSource( ::std::unique_ptr< SvxEditSource >( new AccessibleOutlineEditSource( - rOutliner, *pView, *pOutlineView, *pSdWindow ) ) ); - } - } + if (dynamic_cast<const ::sd::OutlineView* >( pView ) == nullptr) + return; + + OutlinerView* pOutlineView = static_cast< ::sd::OutlineView*>( + pView)->GetViewByWindow( pSdWindow ); + SdrOutliner& rOutliner = + static_cast< ::sd::OutlineView*>(pView)->GetOutliner(); + + if( pOutlineView ) + { + maTextHelper.SetEditSource( ::std::unique_ptr< SvxEditSource >( new AccessibleOutlineEditSource( + rOutliner, *pView, *pOutlineView, *pSdWindow ) ) ); } } |