diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-13 19:08:14 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-14 10:44:08 +0000 |
commit | 8c00536d87010b14a95e9c81f2f5f1d683e5fa70 (patch) | |
tree | 92ac779cef9c4f5adb1421f8eee51a301dc8ef61 /accessibility/source/helper | |
parent | 5815ca4ef1126140e08f3a1d106bcadc41044505 (diff) |
Convert WindowType to scoped enum
Change-Id: I85cfe02f28729e13f2c0dd3d91cd89e6f3e3b6a9
Reviewed-on: https://gerrit.libreoffice.org/34219
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'accessibility/source/helper')
-rw-r--r-- | accessibility/source/helper/acc_factory.cxx | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/accessibility/source/helper/acc_factory.cxx b/accessibility/source/helper/acc_factory.cxx index 7b5d87236990..287279acde7d 100644 --- a/accessibility/source/helper/acc_factory.cxx +++ b/accessibility/source/helper/acc_factory.cxx @@ -73,7 +73,7 @@ namespace { inline bool hasFloatingChild(vcl::Window *pWindow) { vcl::Window * pChild = pWindow->GetAccessibleChildWindow(0); - if( pChild && WINDOW_FLOATINGWINDOW == pChild->GetType() ) + if( pChild && WindowType::FLOATINGWINDOW == pChild->GetType() ) return true; return false; @@ -293,13 +293,13 @@ Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLX { WindowType nType = pWindow->GetType(); - if ( nType == WINDOW_MENUBARWINDOW || pWindow->IsMenuFloatingWindow() || pWindow->IsToolbarFloatingWindow() ) + if ( nType == WindowType::MENUBARWINDOW || pWindow->IsMenuFloatingWindow() || pWindow->IsToolbarFloatingWindow() ) { Reference< XAccessible > xAcc( pWindow->GetAccessible() ); if ( xAcc.is() ) { Reference< XAccessibleContext > xCont( xAcc->getAccessibleContext() ); - if ( pWindow->GetType() == WINDOW_MENUBARWINDOW || + if ( pWindow->GetType() == WindowType::MENUBARWINDOW || ( xCont.is() && xCont->getAccessibleRole() == AccessibleRole::POPUP_MENU ) ) { xContext = xCont; @@ -307,27 +307,27 @@ Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLX } } - else if ( nType == WINDOW_STATUSBAR ) + else if ( nType == WindowType::STATUSBAR ) { xContext = static_cast<XAccessibleContext*>(new VCLXAccessibleStatusBar( _pXWindow )); } - else if ( nType == WINDOW_TABCONTROL ) + else if ( nType == WindowType::TABCONTROL ) { xContext = static_cast<XAccessibleContext*>(new VCLXAccessibleTabControl( _pXWindow )); } - else if ( nType == WINDOW_TABPAGE && pWindow->GetAccessibleParentWindow() && pWindow->GetAccessibleParentWindow()->GetType() == WINDOW_TABCONTROL ) + else if ( nType == WindowType::TABPAGE && pWindow->GetAccessibleParentWindow() && pWindow->GetAccessibleParentWindow()->GetType() == WindowType::TABCONTROL ) { xContext = new VCLXAccessibleTabPageWindow( _pXWindow ); } - else if ( nType == WINDOW_FLOATINGWINDOW ) + else if ( nType == WindowType::FLOATINGWINDOW ) { xContext = new FloatingWindowAccessible( _pXWindow ); } - else if ( nType == WINDOW_BORDERWINDOW && hasFloatingChild( pWindow ) ) + else if ( nType == WindowType::BORDERWINDOW && hasFloatingChild( pWindow ) ) { // The logic here has to match that of Window::GetAccessibleParentWindow in // vcl/source/window/window.cxx to avoid PopupMenuFloatingWindow @@ -344,7 +344,7 @@ Reference< XAccessibleContext > AccessibleFactory::createAccessibleContext( VCLX xContext = new FloatingWindowAccessible( _pXWindow ); } - else if ( ( nType == WINDOW_HELPTEXTWINDOW ) || ( nType == WINDOW_FIXEDLINE ) ) + else if ( ( nType == WindowType::HELPTEXTWINDOW ) || ( nType == WindowType::FIXEDLINE ) ) { xContext = static_cast<XAccessibleContext*>(new VCLXAccessibleFixedText( _pXWindow )); } |