summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-02-13 19:08:14 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-02-14 10:44:08 +0000
commit8c00536d87010b14a95e9c81f2f5f1d683e5fa70 (patch)
tree92ac779cef9c4f5adb1421f8eee51a301dc8ef61 /accessibility
parent5815ca4ef1126140e08f3a1d106bcadc41044505 (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')
-rw-r--r--accessibility/source/extended/accessiblelistbox.cxx2
-rw-r--r--accessibility/source/helper/acc_factory.cxx18
-rw-r--r--accessibility/source/standard/vclxaccessiblebutton.cxx2
-rw-r--r--accessibility/source/standard/vclxaccessibletabcontrol.cxx2
-rw-r--r--accessibility/source/standard/vclxaccessibletabpagewindow.cxx2
-rw-r--r--accessibility/source/standard/vclxaccessibletoolbox.cxx4
6 files changed, 15 insertions, 15 deletions
diff --git a/accessibility/source/extended/accessiblelistbox.cxx b/accessibility/source/extended/accessiblelistbox.cxx
index bfbe9d32b7f8..6933f1087465 100644
--- a/accessibility/source/extended/accessiblelistbox.cxx
+++ b/accessibility/source/extended/accessiblelistbox.cxx
@@ -124,7 +124,7 @@ namespace accessibility
if (pBox)
{
vcl::Window* pParent = static_cast<vcl::Window*>(pBox)->GetParent();
- if (pParent && pParent->GetType() == WINDOW_FLOATINGWINDOW)
+ if (pParent && pParent->GetType() == WindowType::FLOATINGWINDOW)
{
// MT: ImplGetAppSVData shouldn't be exported from VCL.
// In which scenario is this needed?
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 ));
}
diff --git a/accessibility/source/standard/vclxaccessiblebutton.cxx b/accessibility/source/standard/vclxaccessiblebutton.cxx
index c42b39737cd0..f644262a77ba 100644
--- a/accessibility/source/standard/vclxaccessiblebutton.cxx
+++ b/accessibility/source/standard/vclxaccessiblebutton.cxx
@@ -94,7 +94,7 @@ void VCLXAccessibleButton::FillAccessibleStateSet( utl::AccessibleStateSetHelper
rStateSet.AddState( AccessibleStateType::PRESSED );
// IA2 CWS: if the button has a popup menu, it should has the state EXPANDABLE
- if( pButton->GetType() == WINDOW_MENUBUTTON )
+ if( pButton->GetType() == WindowType::MENUBUTTON )
{
rStateSet.AddState( AccessibleStateType::EXPANDABLE );
}
diff --git a/accessibility/source/standard/vclxaccessibletabcontrol.cxx b/accessibility/source/standard/vclxaccessibletabcontrol.cxx
index f2f03104d61d..274af0e7ad36 100644
--- a/accessibility/source/standard/vclxaccessibletabcontrol.cxx
+++ b/accessibility/source/standard/vclxaccessibletabcontrol.cxx
@@ -267,7 +267,7 @@ void VCLXAccessibleTabControl::ProcessWindowChildEvent( const VclWindowEvent& rV
if ( m_pTabControl )
{
vcl::Window* pChild = static_cast< vcl::Window* >( rVclWindowEvent.GetData() );
- if ( pChild && pChild->GetType() == WINDOW_TABPAGE )
+ if ( pChild && pChild->GetType() == WindowType::TABPAGE )
{
for ( sal_Int32 i = 0, nCount = m_pTabControl->GetPageCount(); i < nCount; ++i )
{
diff --git a/accessibility/source/standard/vclxaccessibletabpagewindow.cxx b/accessibility/source/standard/vclxaccessibletabpagewindow.cxx
index ec89a48d5c3a..c160ecd7aef0 100644
--- a/accessibility/source/standard/vclxaccessibletabpagewindow.cxx
+++ b/accessibility/source/standard/vclxaccessibletabpagewindow.cxx
@@ -41,7 +41,7 @@ VCLXAccessibleTabPageWindow::VCLXAccessibleTabPageWindow( VCLXWindow* pVCLXWindo
if ( m_pTabPage )
{
vcl::Window* pParent = m_pTabPage->GetAccessibleParentWindow();
- if ( pParent && pParent->GetType() == WINDOW_TABCONTROL )
+ if ( pParent && pParent->GetType() == WindowType::TABCONTROL )
{
m_pTabControl = static_cast< TabControl* >( pParent );
if ( m_pTabControl )
diff --git a/accessibility/source/standard/vclxaccessibletoolbox.cxx b/accessibility/source/standard/vclxaccessibletoolbox.cxx
index 6aa02c6f89f5..a4111ae28dae 100644
--- a/accessibility/source/standard/vclxaccessibletoolbox.cxx
+++ b/accessibility/source/standard/vclxaccessibletoolbox.cxx
@@ -452,7 +452,7 @@ void VCLXAccessibleToolBox::HandleSubToolBarEvent( const VclWindowEvent& rVclWin
if ( pChildWindow
&& pToolBox
&& pToolBox == pChildWindow->GetParent()
- && pChildWindow->GetType() == WINDOW_TOOLBOX )
+ && pChildWindow->GetType() == WindowType::TOOLBOX )
{
sal_Int32 nIndex = pToolBox->GetItemPos( pToolBox->GetCurItemId() );
Reference< XAccessible > xItem = getAccessibleChild( nIndex );
@@ -602,7 +602,7 @@ void VCLXAccessibleToolBox::ProcessWindowEvent( const VclWindowEvent& rVclWindow
// if this toolbox is a subtoolbox, we have to release it from its parent
VclPtr< vcl::Window > pWin = GetAs< vcl::Window >();
if ( pWin && pWin->GetParent() &&
- pWin->GetParent()->GetType() == WINDOW_TOOLBOX )
+ pWin->GetParent()->GetType() == WindowType::TOOLBOX )
{
VCLXAccessibleToolBox* pParent = static_cast< VCLXAccessibleToolBox* >(
pWin->GetParent()->GetAccessible()->getAccessibleContext().get() );