remove unused enumerators from WindowType

Change-Id: I1e100302dd60ebbcdf187cf30befe0c767c6d6b8
Reviewed-on: https://gerrit.libreoffice.org/34474
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2017-02-20 14:57:03 +02:00
parent 2ae33d4a3b
commit c868dc4927
8 changed files with 6 additions and 38 deletions

View File

@@ -33,22 +33,13 @@ enum class WindowType : sal_uInt16
ERRORBOX , ERRORBOX ,
QUERYBOX , QUERYBOX ,
WINDOW , WINDOW ,
SYSWINDOW ,
WORKWINDOW , WORKWINDOW ,
CONTAINER , CONTAINER ,
FLOATINGWINDOW , FLOATINGWINDOW ,
DIALOG , DIALOG ,
MODELESSDIALOG , MODELESSDIALOG ,
MODALDIALOG , MODALDIALOG ,
SYSTEMDIALOG ,
PATHDIALOG ,
FILEDIALOG ,
PRINTERSETUPDIALOG ,
PRINTDIALOG ,
COLORDIALOG ,
FONTDIALOG ,
CONTROL , CONTROL ,
BUTTON ,
PUSHBUTTON , PUSHBUTTON ,
OKBUTTON , OKBUTTON ,
CANCELBUTTON , CANCELBUTTON ,

View File

@@ -319,8 +319,7 @@ namespace svt
// is it a button? // is it a button?
WindowType eType = pChildLoop->GetType(); WindowType eType = pChildLoop->GetType();
if ( (WindowType::BUTTON == eType) if ( (WindowType::PUSHBUTTON == eType)
|| (WindowType::PUSHBUTTON == eType)
|| (WindowType::OKBUTTON == eType) || (WindowType::OKBUTTON == eType)
|| (WindowType::CANCELBUTTON == eType) || (WindowType::CANCELBUTTON == eType)
|| (WindowType::HELPBUTTON == eType) || (WindowType::HELPBUTTON == eType)

View File

@@ -324,13 +324,6 @@ WinBits ImplGetWinBits( sal_uInt32 nComponentAttribs, WindowType nCompType )
|| ( nCompType == WindowType::DIALOG ) || ( nCompType == WindowType::DIALOG )
|| ( nCompType == WindowType::MODELESSDIALOG ) || ( nCompType == WindowType::MODELESSDIALOG )
|| ( nCompType == WindowType::MODALDIALOG ) || ( nCompType == WindowType::MODALDIALOG )
|| ( nCompType == WindowType::SYSTEMDIALOG )
|| ( nCompType == WindowType::PATHDIALOG )
|| ( nCompType == WindowType::FILEDIALOG )
|| ( nCompType == WindowType::PRINTERSETUPDIALOG )
|| ( nCompType == WindowType::PRINTDIALOG )
|| ( nCompType == WindowType::COLORDIALOG )
|| ( nCompType == WindowType::FONTDIALOG )
|| ( nCompType == WindowType::DOCKINGWINDOW ) || ( nCompType == WindowType::DOCKINGWINDOW )
|| ( nCompType == WindowType::TABDIALOG ) || ( nCompType == WindowType::TABDIALOG )
|| ( nCompType == WindowType::BUTTONDIALOG ) || ( nCompType == WindowType::BUTTONDIALOG )

View File

@@ -1754,7 +1754,6 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
switch ( eWinType ) switch ( eWinType )
{ {
case WindowType::COMBOBOX: case WindowType::COMBOBOX:
case WindowType::BUTTON:
case WindowType::PUSHBUTTON: case WindowType::PUSHBUTTON:
case WindowType::OKBUTTON: case WindowType::OKBUTTON:
case WindowType::CANCELBUTTON: case WindowType::CANCELBUTTON:
@@ -1790,7 +1789,6 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
if ( ( eWinType == WindowType::FIXEDTEXT ) if ( ( eWinType == WindowType::FIXEDTEXT )
|| ( eWinType == WindowType::CHECKBOX ) || ( eWinType == WindowType::CHECKBOX )
|| ( eWinType == WindowType::RADIOBUTTON ) || ( eWinType == WindowType::RADIOBUTTON )
|| ( eWinType == WindowType::BUTTON )
|| ( eWinType == WindowType::PUSHBUTTON ) || ( eWinType == WindowType::PUSHBUTTON )
|| ( eWinType == WindowType::OKBUTTON ) || ( eWinType == WindowType::OKBUTTON )
|| ( eWinType == WindowType::CANCELBUTTON ) || ( eWinType == WindowType::CANCELBUTTON )
@@ -2057,7 +2055,6 @@ css::uno::Any VCLXWindow::getProperty( const OUString& PropertyName )
case WindowType::RADIOBUTTON: case WindowType::RADIOBUTTON:
case WindowType::LISTBOX: case WindowType::LISTBOX:
case WindowType::COMBOBOX: case WindowType::COMBOBOX:
case WindowType::BUTTON:
case WindowType::PUSHBUTTON: case WindowType::PUSHBUTTON:
case WindowType::OKBUTTON: case WindowType::OKBUTTON:
case WindowType::CANCELBUTTON: case WindowType::CANCELBUTTON:
@@ -2081,7 +2078,6 @@ css::uno::Any VCLXWindow::getProperty( const OUString& PropertyName )
if ( ( eWinType == WindowType::FIXEDTEXT ) if ( ( eWinType == WindowType::FIXEDTEXT )
|| ( eWinType == WindowType::CHECKBOX ) || ( eWinType == WindowType::CHECKBOX )
|| ( eWinType == WindowType::RADIOBUTTON ) || ( eWinType == WindowType::RADIOBUTTON )
|| ( eWinType == WindowType::BUTTON )
|| ( eWinType == WindowType::PUSHBUTTON ) || ( eWinType == WindowType::PUSHBUTTON )
|| ( eWinType == WindowType::OKBUTTON ) || ( eWinType == WindowType::OKBUTTON )
|| ( eWinType == WindowType::CANCELBUTTON ) || ( eWinType == WindowType::CANCELBUTTON )

View File

@@ -86,7 +86,6 @@ css::uno::Reference< css::awt::XWindowPeer > CreateXWindow( vcl::Window* pWindow
case WindowType::SCROLLBAR: return new VCLXScrollBar; case WindowType::SCROLLBAR: return new VCLXScrollBar;
case WindowType::TIMEFIELD: return new VCLXTimeField; case WindowType::TIMEFIELD: return new VCLXTimeField;
case WindowType::SYSWINDOW:
case WindowType::WORKWINDOW: case WindowType::WORKWINDOW:
case WindowType::DOCKINGWINDOW: case WindowType::DOCKINGWINDOW:
case WindowType::FLOATINGWINDOW: case WindowType::FLOATINGWINDOW:

View File

@@ -74,8 +74,8 @@ namespace {
bool isDialogWindow(vcl::Window* pWindow) bool isDialogWindow(vcl::Window* pWindow)
{ {
WindowType nType = pWindow->GetType(); WindowType nType = pWindow->GetType();
// DIALOG to FONTDIALOG // DIALOG to MODALDIALOG
if (nType >= WindowType::DIALOG && nType <= WindowType::FONTDIALOG) if (nType >= WindowType::DIALOG && nType <= WindowType::MODALDIALOG)
return true; return true;
// MESSBOX, INFOBOX, WARNINGBOX, ERRORBOX, QUERYBOX // MESSBOX, INFOBOX, WARNINGBOX, ERRORBOX, QUERYBOX

View File

@@ -302,9 +302,6 @@ sal_uInt16 Window::getDefaultAccessibleRole() const
case WindowType::MODELESSDIALOG: case WindowType::MODELESSDIALOG:
case WindowType::MODALDIALOG: case WindowType::MODALDIALOG:
case WindowType::SYSTEMDIALOG:
case WindowType::PRINTERSETUPDIALOG:
case WindowType::PRINTDIALOG:
case WindowType::TABDIALOG: case WindowType::TABDIALOG:
case WindowType::BUTTONDIALOG: case WindowType::BUTTONDIALOG:
case WindowType::DIALOG: nRole = accessibility::AccessibleRole::DIALOG; break; case WindowType::DIALOG: nRole = accessibility::AccessibleRole::DIALOG; break;
@@ -315,15 +312,9 @@ sal_uInt16 Window::getDefaultAccessibleRole() const
case WindowType::HELPBUTTON: case WindowType::HELPBUTTON:
case WindowType::IMAGEBUTTON: case WindowType::IMAGEBUTTON:
case WindowType::MOREBUTTON: case WindowType::MOREBUTTON:
case WindowType::SPINBUTTON: case WindowType::SPINBUTTON: nRole = accessibility::AccessibleRole::PUSH_BUTTON; break;
case WindowType::BUTTON: nRole = accessibility::AccessibleRole::PUSH_BUTTON; break;
case WindowType::MENUBUTTON: nRole = accessibility::AccessibleRole::BUTTON_MENU; break; case WindowType::MENUBUTTON: nRole = accessibility::AccessibleRole::BUTTON_MENU; break;
case WindowType::PATHDIALOG: nRole = accessibility::AccessibleRole::DIRECTORY_PANE; break;
case WindowType::FILEDIALOG: nRole = accessibility::AccessibleRole::FILE_CHOOSER; break;
case WindowType::COLORDIALOG: nRole = accessibility::AccessibleRole::COLOR_CHOOSER; break;
case WindowType::FONTDIALOG: nRole = accessibility::AccessibleRole::FONT_CHOOSER; break;
case WindowType::RADIOBUTTON: nRole = accessibility::AccessibleRole::RADIO_BUTTON; break; case WindowType::RADIOBUTTON: nRole = accessibility::AccessibleRole::RADIO_BUTTON; break;
case WindowType::TRISTATEBOX: case WindowType::TRISTATEBOX:
case WindowType::CHECKBOX: nRole = accessibility::AccessibleRole::CHECK_BOX; break; case WindowType::CHECKBOX: nRole = accessibility::AccessibleRole::CHECK_BOX; break;
@@ -380,8 +371,7 @@ sal_uInt16 Window::getDefaultAccessibleRole() const
case WindowType::TABPAGE: nRole = accessibility::AccessibleRole::PANEL; break; case WindowType::TABPAGE: nRole = accessibility::AccessibleRole::PANEL; break;
case WindowType::TABCONTROL: nRole = accessibility::AccessibleRole::PAGE_TAB_LIST; break; case WindowType::TABCONTROL: nRole = accessibility::AccessibleRole::PAGE_TAB_LIST; break;
case WindowType::DOCKINGWINDOW: case WindowType::DOCKINGWINDOW: nRole = (mpWindowImpl->mbFrame) ? accessibility::AccessibleRole::FRAME :
case WindowType::SYSWINDOW: nRole = (mpWindowImpl->mbFrame) ? accessibility::AccessibleRole::FRAME :
accessibility::AccessibleRole::PANEL; break; accessibility::AccessibleRole::PANEL; break;
case WindowType::FLOATINGWINDOW: nRole = ( mpWindowImpl->mbFrame || case WindowType::FLOATINGWINDOW: nRole = ( mpWindowImpl->mbFrame ||

View File

@@ -523,7 +523,7 @@ namespace
isEnabledInLayout(pWindow) && pWindow->IsInputEnabled() && isEnabledInLayout(pWindow) && pWindow->IsInputEnabled() &&
//Pure window shouldn't get window after controls such as //Pure window shouldn't get window after controls such as
//buttons. //buttons.
(pWindow->GetType() != WindowType::WINDOW && pWindow->GetType() != WindowType::SYSWINDOW && (pWindow->GetType() != WindowType::WINDOW &&
pWindow->GetType() != WindowType::WORKWINDOW && pWindow->GetType() != WindowType::CONTROL) pWindow->GetType() != WindowType::WORKWINDOW && pWindow->GetType() != WindowType::CONTROL)
); );
} }