summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
-rw-r--r--cui/source/customize/cfg.cxx2
-rw-r--r--cui/source/dialogs/cuifmsearch.cxx2
-rw-r--r--fpicker/source/office/OfficeControlAccess.cxx18
-rw-r--r--framework/source/helper/persistentwindowstate.cxx2
-rw-r--r--framework/source/helper/tagwindowasmodified.cxx2
-rw-r--r--framework/source/helper/titlebarupdate.cxx6
-rw-r--r--framework/source/layoutmanager/helpers.cxx6
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx4
-rw-r--r--framework/source/layoutmanager/toolbarlayoutmanager.cxx22
-rw-r--r--framework/source/loadenv/loadenv.cxx2
-rw-r--r--framework/source/services/frame.cxx2
-rw-r--r--framework/source/uielement/addonstoolbarmanager.cxx2
-rw-r--r--framework/source/uielement/progressbarwrapper.cxx8
-rw-r--r--framework/source/uielement/subtoolbarcontroller.cxx4
-rw-r--r--framework/source/uielement/toolbarmanager.cxx2
-rw-r--r--include/tools/wintypes.hxx177
-rw-r--r--include/vcl/layout.hxx4
-rw-r--r--sc/source/ui/app/inputwin.cxx2
-rw-r--r--sfx2/source/appl/childwin.cxx4
-rw-r--r--sfx2/source/appl/workwin.cxx8
-rw-r--r--sfx2/source/notebookbar/ContextVBox.cxx2
-rw-r--r--sfx2/source/notebookbar/PriorityHBox.cxx2
-rw-r--r--sfx2/source/sidebar/ControllerFactory.cxx2
-rw-r--r--svtools/source/contnr/treelistbox.cxx2
-rw-r--r--svtools/source/control/ruler.cxx2
-rw-r--r--svtools/source/dialogs/wizardmachine.cxx16
-rw-r--r--svtools/source/uno/popupwindowcontroller.cxx2
-rw-r--r--svtools/source/uno/statusbarcontroller.cxx4
-rw-r--r--svx/source/accessibility/svxpixelctlaccessiblecontext.cxx4
-rw-r--r--svx/source/dialog/dlgctrl.cxx8
-rw-r--r--svx/source/sidebar/PanelLayout.cxx2
-rw-r--r--svx/source/tbxctrls/SvxColorValueSet.cxx2
-rw-r--r--svx/source/tbxctrls/verttexttbxctrl.cxx3
-rw-r--r--sw/source/ui/index/cnttab.cxx40
-rw-r--r--sw/source/uibase/dbui/dbui.cxx2
-rw-r--r--toolkit/source/awt/vclxaccessiblecomponent.cxx6
-rw-r--r--toolkit/source/awt/vclxcontainer.cxx2
-rw-r--r--toolkit/source/awt/vclxtoolkit.cxx339
-rw-r--r--toolkit/source/awt/vclxwindow.cxx172
-rw-r--r--toolkit/source/awt/vclxwindow1.cxx2
-rw-r--r--toolkit/source/awt/vclxwindows.cxx32
-rw-r--r--toolkit/source/helper/unowrapper.cxx130
-rw-r--r--vcl/osx/a11yfocustracker.cxx12
-rw-r--r--vcl/source/app/help.cxx2
-rw-r--r--vcl/source/control/button.cxx70
-rw-r--r--vcl/source/control/combobox.cxx2
-rw-r--r--vcl/source/control/ctrl.cxx2
-rw-r--r--vcl/source/control/edit.cxx42
-rw-r--r--vcl/source/control/fixed.cxx8
-rw-r--r--vcl/source/control/group.cxx2
-rw-r--r--vcl/source/control/imp_listbox.cxx2
-rw-r--r--vcl/source/control/listbox.cxx4
-rw-r--r--vcl/source/control/menubtn.cxx2
-rw-r--r--vcl/source/control/morebtn.cxx2
-rw-r--r--vcl/source/control/notebookbar.cxx2
-rw-r--r--vcl/source/control/scrbar.cxx4
-rw-r--r--vcl/source/control/slider.cxx2
-rw-r--r--vcl/source/control/spinbtn.cxx2
-rw-r--r--vcl/source/control/spinfld.cxx22
-rw-r--r--vcl/source/control/tabctrl.cxx2
-rw-r--r--vcl/source/edit/vclmedit.cxx2
-rw-r--r--vcl/source/uitest/uiobject.cxx10
-rw-r--r--vcl/source/window/accessibility.cxx242
-rw-r--r--vcl/source/window/brdwin.cxx76
-rw-r--r--vcl/source/window/btndlg.cxx8
-rw-r--r--vcl/source/window/builder.cxx32
-rw-r--r--vcl/source/window/debug.cxx2
-rw-r--r--vcl/source/window/decoview.cxx4
-rw-r--r--vcl/source/window/dialog.cxx40
-rw-r--r--vcl/source/window/dlgctrl.cxx28
-rw-r--r--vcl/source/window/dockingarea.cxx2
-rw-r--r--vcl/source/window/dockmgr.cxx2
-rw-r--r--vcl/source/window/dockwin.cxx4
-rw-r--r--vcl/source/window/event.cxx6
-rw-r--r--vcl/source/window/floatwin.cxx4
-rw-r--r--vcl/source/window/introwin.cxx2
-rw-r--r--vcl/source/window/layout.cxx18
-rw-r--r--vcl/source/window/legacyaccessibility.cxx60
-rw-r--r--vcl/source/window/menubarwindow.cxx4
-rw-r--r--vcl/source/window/msgbox.cxx2
-rw-r--r--vcl/source/window/settings.cxx4
-rw-r--r--vcl/source/window/split.cxx2
-rw-r--r--vcl/source/window/splitwin.cxx2
-rw-r--r--vcl/source/window/stacking.cxx4
-rw-r--r--vcl/source/window/status.cxx2
-rw-r--r--vcl/source/window/syschild.cxx4
-rw-r--r--vcl/source/window/syswin.cxx14
-rw-r--r--vcl/source/window/tabdlg.cxx8
-rw-r--r--vcl/source/window/tabpage.cxx8
-rw-r--r--vcl/source/window/taskpanelist.cxx2
-rw-r--r--vcl/source/window/toolbox.cxx12
-rw-r--r--vcl/source/window/window.cxx48
-rw-r--r--vcl/source/window/window2.cxx4
-rw-r--r--vcl/source/window/window3.cxx4
-rw-r--r--vcl/source/window/winproc.cxx6
-rw-r--r--vcl/source/window/wrkwin.cxx6
-rw-r--r--vcl/unx/gtk/a11y/atkfactory.cxx2
-rw-r--r--vcl/unx/gtk/a11y/atkutil.cxx8
-rw-r--r--vcl/unx/gtk/a11y/atkwindow.cxx14
-rw-r--r--vcl/win/window/salframe.cxx2
-rw-r--r--vcl/workben/vcldemo.cxx2
107 files changed, 987 insertions, 988 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() );
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 17c0249d4943..8cb2bc172479 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -3719,7 +3719,7 @@ void ToolbarSaveInData::SetSystemStyle(
window = VCLUnoHelper::GetWindow( xWindow ).get();
}
- if ( window != nullptr && window->GetType() == WINDOW_TOOLBOX )
+ if ( window != nullptr && window->GetType() == WindowType::TOOLBOX )
{
ToolBox* toolbox = static_cast<ToolBox*>(window);
diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx
index 0e1675105acd..06739fa9ba83 100644
--- a/cui/source/dialogs/cuifmsearch.cxx
+++ b/cui/source/dialogs/cuifmsearch.cxx
@@ -614,7 +614,7 @@ void FmSearchDialog::EnableSearchUI(bool bEnable)
if ( m_pPreSearchFocus )
{
m_pPreSearchFocus->GrabFocus();
- if ( WINDOW_EDIT == m_pPreSearchFocus->GetType() )
+ if ( WindowType::EDIT == m_pPreSearchFocus->GetType() )
{
Edit* pEdit = static_cast< Edit* >( m_pPreSearchFocus.get() );
pEdit->SetSelection( Selection( 0, pEdit->GetText().getLength() ) );
diff --git a/fpicker/source/office/OfficeControlAccess.cxx b/fpicker/source/office/OfficeControlAccess.cxx
index a8ba8215e99e..74ba41a2b5e4 100644
--- a/fpicker/source/office/OfficeControlAccess.cxx
+++ b/fpicker/source/office/OfficeControlAccess.cxx
@@ -373,7 +373,7 @@ namespace svt
}
else
{
- DBG_ASSERT( WINDOW_LISTBOX == pControl->GetType(), "OControlAccess::SetValue: implGetControl returned nonsense!" );
+ DBG_ASSERT( WindowType::LISTBOX == pControl->GetType(), "OControlAccess::SetValue: implGetControl returned nonsense!" );
implDoListboxAction( static_cast< ListBox* >( pControl ), _nControlAction, _rValue );
}
break;
@@ -597,7 +597,7 @@ namespace svt
case PropFlags::ListItems:
{
- DBG_ASSERT( WINDOW_LISTBOX == _pControl->GetType(),
+ DBG_ASSERT( WindowType::LISTBOX == _pControl->GetType(),
"OControlAccess::implSetControlProperty: invalid control/property combination!" );
Sequence< OUString > aItems;
@@ -627,7 +627,7 @@ namespace svt
case PropFlags::SelectedItem:
{
- DBG_ASSERT( WINDOW_LISTBOX == _pControl->GetType(),
+ DBG_ASSERT( WindowType::LISTBOX == _pControl->GetType(),
"OControlAccess::implSetControlProperty: invalid control/property combination!" );
OUString sSelected;
@@ -644,7 +644,7 @@ namespace svt
case PropFlags::SelectedItemIndex:
{
- DBG_ASSERT( WINDOW_LISTBOX == _pControl->GetType(),
+ DBG_ASSERT( WindowType::LISTBOX == _pControl->GetType(),
"OControlAccess::implSetControlProperty: invalid control/property combination!" );
sal_Int32 nPos = 0;
@@ -661,7 +661,7 @@ namespace svt
case PropFlags::Checked:
{
- DBG_ASSERT( WINDOW_CHECKBOX == _pControl->GetType(),
+ DBG_ASSERT( WindowType::CHECKBOX == _pControl->GetType(),
"OControlAccess::implSetControlProperty: invalid control/property combination!" );
bool bChecked = false;
@@ -707,7 +707,7 @@ namespace svt
case PropFlags::ListItems:
{
- DBG_ASSERT( WINDOW_LISTBOX == _pControl->GetType(),
+ DBG_ASSERT( WindowType::LISTBOX == _pControl->GetType(),
"OControlAccess::implGetControlProperty: invalid control/property combination!" );
Sequence< OUString > aItems( static_cast< ListBox* >( _pControl )->GetEntryCount() );
@@ -721,7 +721,7 @@ namespace svt
case PropFlags::SelectedItem:
{
- DBG_ASSERT( WINDOW_LISTBOX == _pControl->GetType(),
+ DBG_ASSERT( WindowType::LISTBOX == _pControl->GetType(),
"OControlAccess::implGetControlProperty: invalid control/property combination!" );
sal_Int32 nSelected = static_cast< ListBox* >( _pControl )->GetSelectEntryPos();
@@ -734,7 +734,7 @@ namespace svt
case PropFlags::SelectedItemIndex:
{
- DBG_ASSERT( WINDOW_LISTBOX == _pControl->GetType(),
+ DBG_ASSERT( WindowType::LISTBOX == _pControl->GetType(),
"OControlAccess::implGetControlProperty: invalid control/property combination!" );
sal_Int32 nSelected = static_cast< ListBox* >( _pControl )->GetSelectEntryPos();
@@ -746,7 +746,7 @@ namespace svt
break;
case PropFlags::Checked:
- DBG_ASSERT( WINDOW_CHECKBOX == _pControl->GetType(),
+ DBG_ASSERT( WindowType::CHECKBOX == _pControl->GetType(),
"OControlAccess::implGetControlProperty: invalid control/property combination!" );
aReturn <<= static_cast< CheckBox* >( _pControl )->IsChecked( );
diff --git a/framework/source/helper/persistentwindowstate.cxx b/framework/source/helper/persistentwindowstate.cxx
index 537fa79fc81d..59ab70e5c5e9 100644
--- a/framework/source/helper/persistentwindowstate.cxx
+++ b/framework/source/helper/persistentwindowstate.cxx
@@ -245,7 +245,7 @@ void PersistentWindowState::implst_setWindowStateOnWindow(const css::uno::Refere
// check for system and work window - its necessary to guarantee correct pointer cast!
bool bSystemWindow = pWindow->IsSystemWindow();
- bool bWorkWindow = (pWindow->GetType() == WINDOW_WORKWINDOW);
+ bool bWorkWindow = (pWindow->GetType() == WindowType::WORKWINDOW);
if (!bSystemWindow && !bWorkWindow)
return;
diff --git a/framework/source/helper/tagwindowasmodified.cxx b/framework/source/helper/tagwindowasmodified.cxx
index a71b613f8d45..b17dc129a242 100644
--- a/framework/source/helper/tagwindowasmodified.cxx
+++ b/framework/source/helper/tagwindowasmodified.cxx
@@ -90,7 +90,7 @@ void SAL_CALL TagWindowAsModified::modified(const css::lang::EventObject& aEvent
return;
bool bSystemWindow = pWindow->IsSystemWindow();
- bool bWorkWindow = (pWindow->GetType() == WINDOW_WORKWINDOW);
+ bool bWorkWindow = (pWindow->GetType() == WindowType::WORKWINDOW);
if (!bSystemWindow && !bWorkWindow)
return;
diff --git a/framework/source/helper/titlebarupdate.cxx b/framework/source/helper/titlebarupdate.cxx
index 15476a178ce2..edacb2777581 100644
--- a/framework/source/helper/titlebarupdate.cxx
+++ b/framework/source/helper/titlebarupdate.cxx
@@ -168,7 +168,7 @@ void TitleBarUpdate::impl_updateApplicationID(const css::uno::Reference< css::fr
VclPtr<vcl::Window> pWindow = (VCLUnoHelper::GetWindow( xWindow ));
if (
( pWindow ) &&
- ( pWindow->GetType() == WINDOW_WORKWINDOW )
+ ( pWindow->GetType() == WindowType::WORKWINDOW )
)
{
WorkWindow* pWorkWindow = static_cast<WorkWindow*>(pWindow.get());
@@ -285,7 +285,7 @@ void TitleBarUpdate::impl_updateIcon(const css::uno::Reference< css::frame::XFra
VclPtr<vcl::Window> pWindow = (VCLUnoHelper::GetWindow( xWindow ));
if (
( pWindow ) &&
- ( pWindow->GetType() == WINDOW_WORKWINDOW )
+ ( pWindow->GetType() == WindowType::WORKWINDOW )
)
{
WorkWindow* pWorkWindow = static_cast<WorkWindow*>(pWindow.get());
@@ -319,7 +319,7 @@ void TitleBarUpdate::impl_updateTitle(const css::uno::Reference< css::frame::XFr
VclPtr<vcl::Window> pWindow = (VCLUnoHelper::GetWindow( xWindow ));
if (
( pWindow ) &&
- ( pWindow->GetType() == WINDOW_WORKWINDOW )
+ ( pWindow->GetType() == WindowType::WORKWINDOW )
)
{
WorkWindow* pWorkWindow = static_cast<WorkWindow*>(pWindow.get());
diff --git a/framework/source/layoutmanager/helpers.cxx b/framework/source/layoutmanager/helpers.cxx
index 7bf7a3d72660..92404ddcb818 100644
--- a/framework/source/layoutmanager/helpers.cxx
+++ b/framework/source/layoutmanager/helpers.cxx
@@ -83,7 +83,7 @@ OUString retrieveToolbarNameFromHelpURL( vcl::Window* pWindow )
{
OUString aToolbarName;
- if ( pWindow->GetType() == WINDOW_TOOLBOX )
+ if ( pWindow->GetType() == WindowType::TOOLBOX )
{
ToolBox* pToolBox = dynamic_cast<ToolBox *>( pWindow );
if ( pToolBox )
@@ -102,7 +102,7 @@ OUString retrieveToolbarNameFromHelpURL( vcl::Window* pWindow )
ToolBox* getToolboxPtr( vcl::Window* pWindow )
{
ToolBox* pToolbox(nullptr);
- if ( pWindow->GetType() == WINDOW_TOOLBOX )
+ if ( pWindow->GetType() == WindowType::TOOLBOX )
pToolbox = dynamic_cast<ToolBox*>( pWindow );
return pToolbox;
}
@@ -151,7 +151,7 @@ bool lcl_checkUIElement(const uno::Reference< ui::XUIElement >& xUIElement, awt:
_rPosSize = _xWindow->getPosSize();
VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( _xWindow );
- if ( pWindow->GetType() == WINDOW_TOOLBOX )
+ if ( pWindow->GetType() == WindowType::TOOLBOX )
{
::Size aSize = static_cast<ToolBox*>(pWindow.get())->CalcWindowSizePixel( 1 );
_rPosSize.Width = aSize.Width();
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index efec9ece7cef..2f9f88160cd6 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -980,7 +980,7 @@ void LayoutManager::implts_setStatusBarPosSize( const ::Point& rPos, const ::Siz
SolarMutexGuard aGuard;
VclPtr<vcl::Window> pParentWindow = VCLUnoHelper::GetWindow( xContainerWindow );
VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( xWindow );
- if ( pParentWindow && ( pWindow && pWindow->GetType() == WINDOW_STATUSBAR ))
+ if ( pParentWindow && ( pWindow && pWindow->GetType() == WindowType::STATUSBAR ))
{
vcl::Window* pOldParentWindow = pWindow->GetParent();
if ( pParentWindow != pOldParentWindow )
@@ -1396,7 +1396,7 @@ uno::Reference< ui::XUIElement > LayoutManager::implts_createDockingWindow( cons
IMPL_LINK( LayoutManager, WindowEventListener, VclWindowEvent&, rEvent, void )
{
vcl::Window* pWindow = rEvent.GetWindow();
- if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX )
+ if ( pWindow && pWindow->GetType() == WindowType::TOOLBOX )
{
SolarMutexClearableGuard aReadLock;
ToolbarLayoutManager* pToolbarManager( m_xToolbarManager.get() );
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 6ef563206cda..4f69df830dcb 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -544,7 +544,7 @@ bool ToolbarLayoutManager::createToolbar( const OUString& rResourceURL )
SolarMutexGuard aGuard;
VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( xWindow );
- if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX )
+ if ( pWindow && pWindow->GetType() == WindowType::TOOLBOX )
{
ToolBox* pToolbar = static_cast<ToolBox *>(pWindow.get());
ToolBoxMenuType nMenuType = pToolbar->GetMenuType();
@@ -829,7 +829,7 @@ bool ToolbarLayoutManager::dockToolbar( const OUString& rResourceURL, ui::Dockin
{
SolarMutexGuard aGuard;
pWindow = VCLUnoHelper::GetWindow( xWindow ).get();
- if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX )
+ if ( pWindow && pWindow->GetType() == WindowType::TOOLBOX )
{
pToolBox = static_cast<ToolBox *>(pWindow);
@@ -1171,7 +1171,7 @@ void ToolbarLayoutManager::implts_createAddonsToolBars()
VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( xWindow );
if ( pWindow->GetText().isEmpty() )
pWindow->SetText( aGenericAddonTitle );
- if ( pWindow->GetType() == WINDOW_TOOLBOX )
+ if ( pWindow->GetType() == WindowType::TOOLBOX )
{
ToolBox* pToolbar = static_cast<ToolBox *>(pWindow.get());
pToolbar->SetMenuType();
@@ -1429,7 +1429,7 @@ void ToolbarLayoutManager::implts_setElementData( UIElement& rElement, const uno
pWindow->SetText( rElement.m_aUIName );
if ( rElement.m_bNoClose )
pWindow->SetStyle( pWindow->GetStyle() & ~WB_CLOSEABLE );
- if ( pWindow->GetType() == WINDOW_TOOLBOX )
+ if ( pWindow->GetType() == WindowType::TOOLBOX )
pToolBox = static_cast<ToolBox *>(pWindow);
}
if ( pToolBox )
@@ -2480,7 +2480,7 @@ void ToolbarLayoutManager::implts_calcWindowPosSizeOnSingleRowColumn(
{
uno::Reference< awt::XWindow > xWindow = rRowColumnWindowData.aRowColumnWindows[i];
VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( xWindow );
- if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX )
+ if ( pWindow && pWindow->GetType() == WindowType::TOOLBOX )
aMinSize = static_cast<ToolBox *>(pWindow.get())->CalcMinimumWindowSizePixel();
}
@@ -2642,7 +2642,7 @@ void ToolbarLayoutManager::implts_calcDockingPosSize(
SolarMutexGuard aGuard;
pDockingAreaWindow = VCLUnoHelper::GetWindow( xDockingAreaWindow ).get();
VclPtr<vcl::Window> pDockWindow = VCLUnoHelper::GetWindow( xWindow );
- if ( pDockWindow && pDockWindow->GetType() == WINDOW_TOOLBOX )
+ if ( pDockWindow && pDockWindow->GetType() == WindowType::TOOLBOX )
pToolBox = static_cast<ToolBox *>(pDockWindow.get());
aDockingAreaRect = ::Rectangle( pDockingAreaWindow->GetPosPixel(), pDockingAreaWindow->GetSizePixel() );
@@ -3289,7 +3289,7 @@ void SAL_CALL ToolbarLayoutManager::startDocking( const awt::DockingEvent& e )
SolarMutexGuard aGuard;
VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( xWindow );
- if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX )
+ if ( pWindow && pWindow->GetType() == WindowType::TOOLBOX )
{
ToolBox* pToolBox = static_cast<ToolBox *>(pWindow.get());
aUIElement.m_aFloatingData.m_nLines = pToolBox->GetFloatingLines();
@@ -3382,7 +3382,7 @@ awt::DockingData SAL_CALL ToolbarLayoutManager::docking( const awt::DockingEvent
// Determine if we have a toolbar and set alignment according to the docking area!
VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( xWindow );
ToolBox* pToolBox = nullptr;
- if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX )
+ if ( pWindow && pWindow->GetType() == WindowType::TOOLBOX )
pToolBox = static_cast<ToolBox *>(pWindow.get());
if ( eDockingArea != -1 )
@@ -3537,7 +3537,7 @@ void SAL_CALL ToolbarLayoutManager::endDocking( const awt::EndDockingEvent& e )
SolarMutexGuard aGuard;
VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( uno::Reference< awt::XWindow >( e.Source, uno::UNO_QUERY ));
ToolBox* pToolBox = nullptr;
- if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX )
+ if ( pWindow && pWindow->GetType() == WindowType::TOOLBOX )
pToolBox = static_cast<ToolBox *>(pWindow.get());
if ( pToolBox )
@@ -3596,7 +3596,7 @@ sal_Bool SAL_CALL ToolbarLayoutManager::prepareToggleFloatingMode( const lang::E
{
SolarMutexGuard aGuard;
VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( xWindow );
- if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX )
+ if ( pWindow && pWindow->GetType() == WindowType::TOOLBOX )
{
ToolBox* pToolBox = static_cast< ToolBox *>( pWindow.get() );
aUIDockingElement.m_aFloatingData.m_aPos = AWTPoint(pToolBox->GetPosPixel());
@@ -3635,7 +3635,7 @@ void SAL_CALL ToolbarLayoutManager::toggleFloatingMode( const lang::EventObject&
xWindow.set( e.Source, uno::UNO_QUERY );
pWindow = VCLUnoHelper::GetWindow( xWindow ).get();
- if ( pWindow && pWindow->GetType() == WINDOW_TOOLBOX )
+ if ( pWindow && pWindow->GetType() == WindowType::TOOLBOX )
pToolBox = static_cast<ToolBox *>(pWindow);
}
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index 396e9c1b42f4..4687489b07f4 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -1646,7 +1646,7 @@ void LoadEnv::impl_applyPersistentWindowState(const css::uno::Reference< css::aw
return;
bool bSystemWindow = pWindow->IsSystemWindow();
- bool bWorkWindow = (pWindow->GetType() == WINDOW_WORKWINDOW);
+ bool bWorkWindow = (pWindow->GetType() == WindowType::WORKWINDOW);
if (!bSystemWindow && !bWorkWindow)
return;
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index de2c2a334e2f..3bdda7772091 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -3052,7 +3052,7 @@ void Frame::implts_setIconOnWindow()
VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( xContainerWindow );
if(
( pWindow != nullptr ) &&
- ( pWindow->GetType() == WINDOW_WORKWINDOW )
+ ( pWindow->GetType() == WindowType::WORKWINDOW )
)
{
WorkWindow* pWorkWindow = static_cast<WorkWindow*>(pWindow.get());
diff --git a/framework/source/uielement/addonstoolbarmanager.cxx b/framework/source/uielement/addonstoolbarmanager.cxx
index 4f8a4f6a7b7d..0043c25a45c2 100644
--- a/framework/source/uielement/addonstoolbarmanager.cxx
+++ b/framework/source/uielement/addonstoolbarmanager.cxx
@@ -356,7 +356,7 @@ void AddonsToolBarManager::FillToolbar( const Sequence< Sequence< PropertyValue
if ( pItemWin )
{
WindowType nType = pItemWin->GetType();
- if ( nType == WINDOW_LISTBOX || nType == WINDOW_MULTILISTBOX || nType == WINDOW_COMBOBOX )
+ if ( nType == WindowType::LISTBOX || nType == WindowType::MULTILISTBOX || nType == WindowType::COMBOBOX )
pItemWin->SetAccessibleName( m_pToolBar->GetItemText( nId ) );
m_pToolBar->SetItemWindow( nId, pItemWin );
}
diff --git a/framework/source/uielement/progressbarwrapper.cxx b/framework/source/uielement/progressbarwrapper.cxx
index 07f34520c5aa..981e7eef3c53 100644
--- a/framework/source/uielement/progressbarwrapper.cxx
+++ b/framework/source/uielement/progressbarwrapper.cxx
@@ -104,7 +104,7 @@ void ProgressBarWrapper::start( const OUString& Text, ::sal_Int32 Range )
{
SolarMutexGuard aSolarMutexGuard;
VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( xWindow );
- if ( pWindow && pWindow->GetType() == WINDOW_STATUSBAR )
+ if ( pWindow && pWindow->GetType() == WindowType::STATUSBAR )
{
StatusBar* pStatusBar = static_cast<StatusBar *>(pWindow.get());
if ( !pStatusBar->IsProgressMode() )
@@ -141,7 +141,7 @@ void ProgressBarWrapper::end()
{
SolarMutexGuard aSolarMutexGuard;
VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( xWindow );
- if ( pWindow && pWindow->GetType() == WINDOW_STATUSBAR )
+ if ( pWindow && pWindow->GetType() == WindowType::STATUSBAR )
{
StatusBar* pStatusBar = static_cast<StatusBar *>(pWindow.get());
if ( pStatusBar->IsProgressMode() )
@@ -170,7 +170,7 @@ void ProgressBarWrapper::setText( const OUString& Text )
{
SolarMutexGuard aSolarMutexGuard;
VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( xWindow );
- if ( pWindow && pWindow->GetType() == WINDOW_STATUSBAR )
+ if ( pWindow && pWindow->GetType() == WindowType::STATUSBAR )
{
StatusBar* pStatusBar = static_cast<StatusBar *>(pWindow.get());
if( pStatusBar->IsProgressMode() )
@@ -222,7 +222,7 @@ void ProgressBarWrapper::setValue( ::sal_Int32 nValue )
{
SolarMutexGuard aSolarMutexGuard;
VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( xWindow );
- if ( pWindow && pWindow->GetType() == WINDOW_STATUSBAR )
+ if ( pWindow && pWindow->GetType() == WindowType::STATUSBAR )
{
StatusBar* pStatusBar = static_cast<StatusBar *>(pWindow.get());
if ( !pStatusBar->IsProgressMode() )
diff --git a/framework/source/uielement/subtoolbarcontroller.cxx b/framework/source/uielement/subtoolbarcontroller.cxx
index aa5450fe9436..146051d1958f 100644
--- a/framework/source/uielement/subtoolbarcontroller.cxx
+++ b/framework/source/uielement/subtoolbarcontroller.cxx
@@ -238,7 +238,7 @@ css::uno::Reference< css::awt::XWindow > SubToolBarController::createPopupWindow
m_xUIElement = xUIElement;
VclPtr<vcl::Window> pTbxWindow = VCLUnoHelper::GetWindow( xSubToolBar );
- if ( pTbxWindow && pTbxWindow->GetType() == WINDOW_TOOLBOX )
+ if ( pTbxWindow && pTbxWindow->GetType() == WindowType::TOOLBOX )
{
ToolBox* pToolBar = static_cast< ToolBox* >( pTbxWindow.get() );
pToolBar->SetParent( pToolBox );
@@ -369,7 +369,7 @@ void SubToolBarController::endPopupMode( const css::awt::EndPopupModeEvent& e )
try
{
VclPtr<vcl::Window> pTbxWindow = VCLUnoHelper::GetWindow( xSubToolBar );
- if ( pTbxWindow && pTbxWindow->GetType() == WINDOW_TOOLBOX )
+ if ( pTbxWindow && pTbxWindow->GetType() == WindowType::TOOLBOX )
{
css::uno::Any a = xProp->getPropertyValue( aPersistentString );
xProp->setPropertyValue( aPersistentString, css::uno::makeAny( false ) );
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index c7af7cf5869e..a42fe2d2ecf2 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -854,7 +854,7 @@ void ToolBarManager::CreateControllers()
if ( pItemWin )
{
WindowType nType = pItemWin->GetType();
- if ( nType == WINDOW_LISTBOX || nType == WINDOW_MULTILISTBOX || nType == WINDOW_COMBOBOX )
+ if ( nType == WindowType::LISTBOX || nType == WindowType::MULTILISTBOX || nType == WindowType::COMBOBOX )
pItemWin->SetAccessibleName( m_pToolBar->GetItemText( nId ) );
m_pToolBar->SetItemWindow( nId, pItemWin );
}
diff --git a/include/tools/wintypes.hxx b/include/tools/wintypes.hxx
index 7324ee0d8979..bf6b4d261442 100644
--- a/include/tools/wintypes.hxx
+++ b/include/tools/wintypes.hxx
@@ -23,92 +23,97 @@
// Window-Types
-typedef sal_uInt16 WindowType;
-#define WINDOW_BASE 0x0100
-#define WINDOW_FIRST (WINDOW_BASE + 0x30)
-#define WINDOW_MESSBOX (WINDOW_FIRST)
-#define WINDOW_INFOBOX (WINDOW_FIRST + 0x01)
-#define WINDOW_WARNINGBOX (WINDOW_FIRST + 0x02)
-#define WINDOW_ERRORBOX (WINDOW_FIRST + 0x03)
-#define WINDOW_QUERYBOX (WINDOW_FIRST + 0x04)
-#define WINDOW_WINDOW (WINDOW_FIRST + 0x05)
-#define WINDOW_SYSWINDOW (WINDOW_FIRST + 0x06)
-#define WINDOW_WORKWINDOW (WINDOW_FIRST + 0x07)
-#define WINDOW_CONTAINER (WINDOW_FIRST + 0x08)
-#define WINDOW_FLOATINGWINDOW (WINDOW_FIRST + 0x09)
-#define WINDOW_DIALOG (WINDOW_FIRST + 0x0a)
-#define WINDOW_MODELESSDIALOG (WINDOW_FIRST + 0x0b)
-#define WINDOW_MODALDIALOG (WINDOW_FIRST + 0x0c)
-#define WINDOW_SYSTEMDIALOG (WINDOW_FIRST + 0x0d)
-#define WINDOW_PATHDIALOG (WINDOW_FIRST + 0x0e)
-#define WINDOW_FILEDIALOG (WINDOW_FIRST + 0x0f)
-#define WINDOW_PRINTERSETUPDIALOG (WINDOW_FIRST + 0x10)
-#define WINDOW_PRINTDIALOG (WINDOW_FIRST + 0x11)
-#define WINDOW_COLORDIALOG (WINDOW_FIRST + 0x12)
-#define WINDOW_FONTDIALOG (WINDOW_FIRST + 0x13)
-#define WINDOW_CONTROL (WINDOW_FIRST + 0x14)
-#define WINDOW_BUTTON (WINDOW_FIRST + 0x15)
-#define WINDOW_PUSHBUTTON (WINDOW_FIRST + 0x16)
-#define WINDOW_OKBUTTON (WINDOW_FIRST + 0x17)
-#define WINDOW_CANCELBUTTON (WINDOW_FIRST + 0x18)
-#define WINDOW_HELPBUTTON (WINDOW_FIRST + 0x19)
-#define WINDOW_IMAGEBUTTON (WINDOW_FIRST + 0x1a)
-#define WINDOW_MENUBUTTON (WINDOW_FIRST + 0x1b)
-#define WINDOW_MOREBUTTON (WINDOW_FIRST + 0x1c)
-#define WINDOW_SPINBUTTON (WINDOW_FIRST + 0x1d)
-#define WINDOW_RADIOBUTTON (WINDOW_FIRST + 0x1e)
-#define WINDOW_IMAGERADIOBUTTON (WINDOW_FIRST + 0x1f)
-#define WINDOW_CHECKBOX (WINDOW_FIRST + 0x20)
-#define WINDOW_TRISTATEBOX (WINDOW_FIRST + 0x21)
-#define WINDOW_EDIT (WINDOW_FIRST + 0x22)
-#define WINDOW_MULTILINEEDIT (WINDOW_FIRST + 0x23)
-#define WINDOW_COMBOBOX (WINDOW_FIRST + 0x24)
-#define WINDOW_LISTBOX (WINDOW_FIRST + 0x25)
-#define WINDOW_MULTILISTBOX (WINDOW_FIRST + 0x26)
-#define WINDOW_FIXEDTEXT (WINDOW_FIRST + 0x27)
-#define WINDOW_FIXEDLINE (WINDOW_FIRST + 0x28)
-#define WINDOW_FIXEDBITMAP (WINDOW_FIRST + 0x29)
-#define WINDOW_FIXEDIMAGE (WINDOW_FIRST + 0x2a)
-#define WINDOW_GROUPBOX (WINDOW_FIRST + 0x2c)
-#define WINDOW_SCROLLBAR (WINDOW_FIRST + 0x2d)
-#define WINDOW_SCROLLBARBOX (WINDOW_FIRST + 0x2e)
-#define WINDOW_SPLITTER (WINDOW_FIRST + 0x2f)
-#define WINDOW_SPLITWINDOW (WINDOW_FIRST + 0x30)
-#define WINDOW_SPINFIELD (WINDOW_FIRST + 0x31)
-#define WINDOW_PATTERNFIELD (WINDOW_FIRST + 0x32)
-#define WINDOW_NUMERICFIELD (WINDOW_FIRST + 0x33)
-#define WINDOW_METRICFIELD (WINDOW_FIRST + 0x34)
-#define WINDOW_CURRENCYFIELD (WINDOW_FIRST + 0x35)
-#define WINDOW_DATEFIELD (WINDOW_FIRST + 0x36)
-#define WINDOW_TIMEFIELD (WINDOW_FIRST + 0x37)
-#define WINDOW_PATTERNBOX (WINDOW_FIRST + 0x38)
-#define WINDOW_NUMERICBOX (WINDOW_FIRST + 0x39)
-#define WINDOW_METRICBOX (WINDOW_FIRST + 0x3a)
-#define WINDOW_CURRENCYBOX (WINDOW_FIRST + 0x3b)
-#define WINDOW_DATEBOX (WINDOW_FIRST + 0x3c)
-#define WINDOW_TIMEBOX (WINDOW_FIRST + 0x3d)
-#define WINDOW_LONGCURRENCYFIELD (WINDOW_FIRST + 0x3e)
-#define WINDOW_LONGCURRENCYBOX (WINDOW_FIRST + 0x3f)
-#define WINDOW_SCROLLWINDOW (WINDOW_FIRST + 0x40)
-#define WINDOW_TOOLBOX (WINDOW_FIRST + 0x41)
-#define WINDOW_DOCKINGWINDOW (WINDOW_FIRST + 0x42)
-#define WINDOW_STATUSBAR (WINDOW_FIRST + 0x43)
-#define WINDOW_TABPAGE (WINDOW_FIRST + 0x44)
-#define WINDOW_TABCONTROL (WINDOW_FIRST + 0x45)
-#define WINDOW_TABDIALOG (WINDOW_FIRST + 0x46)
-#define WINDOW_BORDERWINDOW (WINDOW_FIRST + 0x47)
-#define WINDOW_BUTTONDIALOG (WINDOW_FIRST + 0x48)
-#define WINDOW_SYSTEMCHILDWINDOW (WINDOW_FIRST + 0x49)
-#define WINDOW_SLIDER (WINDOW_FIRST + 0x4a)
-#define WINDOW_MENUBARWINDOW (WINDOW_FIRST + 0x4b)
-#define WINDOW_TREELISTBOX (WINDOW_FIRST + 0x4c)
-#define WINDOW_HELPTEXTWINDOW (WINDOW_FIRST + 0x4d)
-#define WINDOW_INTROWINDOW (WINDOW_FIRST + 0x4e)
-#define WINDOW_LISTBOXWINDOW (WINDOW_FIRST + 0x4f)
-#define WINDOW_DOCKINGAREA (WINDOW_FIRST + 0x50)
-#define WINDOW_RULER (WINDOW_FIRST + 0x51)
-#define WINDOW_CALCINPUTLINE (WINDOW_FIRST + 0x52)
-#define WINDOW_LAST (WINDOW_CALCINPUTLINE)
+enum class WindowType : sal_uInt16
+{
+ NONE = 0,
+ FIRST = 0x0130,
+ MESSBOX = FIRST,
+ INFOBOX ,
+ WARNINGBOX ,
+ ERRORBOX ,
+ QUERYBOX ,
+ WINDOW ,
+ SYSWINDOW ,
+ WORKWINDOW ,
+ CONTAINER ,
+ FLOATINGWINDOW ,
+ DIALOG ,
+ MODELESSDIALOG ,
+ MODALDIALOG ,
+ SYSTEMDIALOG ,
+ PATHDIALOG ,
+ FILEDIALOG ,
+ PRINTERSETUPDIALOG ,
+ PRINTDIALOG ,
+ COLORDIALOG ,
+ FONTDIALOG ,
+ CONTROL ,
+ BUTTON ,
+ PUSHBUTTON ,
+ OKBUTTON ,
+ CANCELBUTTON ,
+ HELPBUTTON ,
+ IMAGEBUTTON ,
+ MENUBUTTON ,
+ MOREBUTTON ,
+ SPINBUTTON ,
+ RADIOBUTTON ,
+ IMAGERADIOBUTTON ,
+ CHECKBOX ,
+ TRISTATEBOX ,
+ EDIT ,
+ MULTILINEEDIT ,
+ COMBOBOX ,
+ LISTBOX ,
+ MULTILISTBOX ,
+ FIXEDTEXT ,
+ FIXEDLINE ,
+ FIXEDBITMAP ,
+ FIXEDIMAGE ,
+ GROUPBOX ,
+ SCROLLBAR ,
+ SCROLLBARBOX ,
+ SPLITTER ,
+ SPLITWINDOW ,
+ SPINFIELD ,
+ PATTERNFIELD ,
+ NUMERICFIELD ,
+ METRICFIELD ,
+ CURRENCYFIELD ,
+ DATEFIELD ,
+ TIMEFIELD ,
+ PATTERNBOX ,
+ NUMERICBOX ,
+ METRICBOX ,
+ CURRENCYBOX ,
+ DATEBOX ,
+ TIMEBOX ,
+ LONGCURRENCYFIELD ,
+ LONGCURRENCYBOX ,
+ SCROLLWINDOW ,
+ TOOLBOX ,
+ DOCKINGWINDOW ,
+ STATUSBAR ,
+ TABPAGE ,
+ TABCONTROL ,
+ TABDIALOG ,
+ BORDERWINDOW ,
+ BUTTONDIALOG ,
+ SYSTEMCHILDWINDOW ,
+ SLIDER ,
+ MENUBARWINDOW ,
+ TREELISTBOX ,
+ HELPTEXTWINDOW ,
+ INTROWINDOW ,
+ LISTBOXWINDOW ,
+ DOCKINGAREA ,
+ RULER ,
+ CALCINPUTLINE ,
+ LAST = CALCINPUTLINE,
+ // only used in vclxtoolkit.cxx
+ TOOLKIT_FRAMEWINDOW = 0x1000,
+ TOOLKIT_SYSTEMCHILDWINDOW = 0x1001,
+};
// Window-Bits
diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx
index 3e03ca20c860..1673605373eb 100644
--- a/include/vcl/layout.hxx
+++ b/include/vcl/layout.hxx
@@ -711,8 +711,8 @@ VCL_DLLPUBLIC bool isLayoutEnabled(const vcl::Window *pWindow);
inline bool isContainerWindow(const vcl::Window &rWindow)
{
WindowType eType = rWindow.GetType();
- return eType == WINDOW_CONTAINER || eType == WINDOW_SCROLLWINDOW ||
- (eType == WINDOW_DOCKINGWINDOW && ::isLayoutEnabled(&rWindow));
+ return eType == WindowType::CONTAINER || eType == WindowType::SCROLLWINDOW ||
+ (eType == WindowType::DOCKINGWINDOW && ::isLayoutEnabled(&rWindow));
}
inline bool isContainerWindow(const vcl::Window *pWindow)
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index 5aab050efedd..e44d5ec30ccc 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -104,7 +104,7 @@ ScTextWndBase::ScTextWndBase( vcl::Window* pParent, WinBits nStyle )
{
if ( IsNativeControlSupported( ControlType::Editbox, ControlPart::Entire ) )
{
- SetType( WINDOW_CALCINPUTLINE );
+ SetType( WindowType::CALCINPUTLINE );
SetBorderStyle( WindowBorderStyle::NWF );
}
}
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 84cfd12d1703..9116876d02fc 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -520,11 +520,11 @@ SfxChildWindowContext::~SfxChildWindowContext()
FloatingWindow* SfxChildWindowContext::GetFloatingWindow(vcl::Window *pParent)
{
- if (pParent->GetType() == WINDOW_DOCKINGWINDOW || pParent->GetType() == WINDOW_TOOLBOX)
+ if (pParent->GetType() == WindowType::DOCKINGWINDOW || pParent->GetType() == WindowType::TOOLBOX)
{
return static_cast<DockingWindow*>(pParent)->GetFloatingWindow();
}
- if (pParent->GetType() == WINDOW_FLOATINGWINDOW)
+ if (pParent->GetType() == WindowType::FLOATINGWINDOW)
{
return static_cast<FloatingWindow*>(pParent);
}
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx
index 10e3366b3dc3..f0cdfc4915e0 100644
--- a/sfx2/source/appl/workwin.cxx
+++ b/sfx2/source/appl/workwin.cxx
@@ -747,7 +747,7 @@ SvBorder SfxWorkWindow::Arrange_Impl()
case SfxChildAlignment::TOOLBOXTOP:
case SfxChildAlignment::LOWESTTOP:
aSize.Width() = aTmp.GetWidth();
- if ( pCli->pWin->GetType() == WINDOW_SPLITWINDOW )
+ if ( pCli->pWin->GetType() == WindowType::SPLITWINDOW )
aSize = static_cast<SplitWindow *>(pCli->pWin.get())->CalcLayoutSizePixel( aSize );
bAllowHiding = false;
aBorder.Top() += aSize.Height();
@@ -762,7 +762,7 @@ SvBorder SfxWorkWindow::Arrange_Impl()
case SfxChildAlignment::TOOLBOXBOTTOM:
case SfxChildAlignment::HIGHESTBOTTOM:
aSize.Width() = aTmp.GetWidth();
- if ( pCli->pWin->GetType() == WINDOW_SPLITWINDOW )
+ if ( pCli->pWin->GetType() == WindowType::SPLITWINDOW )
aSize = static_cast<SplitWindow *>(pCli->pWin.get())->CalcLayoutSizePixel( aSize );
aBorder.Bottom() += aSize.Height();
aPos = aTmp.BottomLeft();
@@ -777,7 +777,7 @@ SvBorder SfxWorkWindow::Arrange_Impl()
case SfxChildAlignment::LASTLEFT:
case SfxChildAlignment::TOOLBOXLEFT:
aSize.Height() = aTmp.GetHeight();
- if ( pCli->pWin->GetType() == WINDOW_SPLITWINDOW )
+ if ( pCli->pWin->GetType() == WindowType::SPLITWINDOW )
aSize = static_cast<SplitWindow *>(pCli->pWin.get())->CalcLayoutSizePixel( aSize );
bAllowHiding = false;
aBorder.Left() += aSize.Width();
@@ -792,7 +792,7 @@ SvBorder SfxWorkWindow::Arrange_Impl()
case SfxChildAlignment::LASTRIGHT:
case SfxChildAlignment::TOOLBOXRIGHT:
aSize.Height() = aTmp.GetHeight();
- if ( pCli->pWin->GetType() == WINDOW_SPLITWINDOW )
+ if ( pCli->pWin->GetType() == WindowType::SPLITWINDOW )
aSize = static_cast<SplitWindow *>(pCli->pWin.get())->CalcLayoutSizePixel( aSize );
aBorder.Right() += aSize.Width();
aPos = aTmp.TopRight();
diff --git a/sfx2/source/notebookbar/ContextVBox.cxx b/sfx2/source/notebookbar/ContextVBox.cxx
index 8723cc458c2e..8b59cfaf5dce 100644
--- a/sfx2/source/notebookbar/ContextVBox.cxx
+++ b/sfx2/source/notebookbar/ContextVBox.cxx
@@ -46,7 +46,7 @@ public:
{
for (int nChild = 0; nChild < GetChildCount(); ++nChild)
{
- if ( GetChild( nChild )->GetType() == WINDOW_CONTAINER )
+ if ( GetChild( nChild )->GetType() == WindowType::CONTAINER )
{
VclContainer* pChild = static_cast<VclContainer*>( GetChild( nChild ) );
diff --git a/sfx2/source/notebookbar/PriorityHBox.cxx b/sfx2/source/notebookbar/PriorityHBox.cxx
index 13ff34fd983a..c1f60ac26374 100644
--- a/sfx2/source/notebookbar/PriorityHBox.cxx
+++ b/sfx2/source/notebookbar/PriorityHBox.cxx
@@ -126,7 +126,7 @@ public:
m_nNeededWidth += pChild->GetSizePixel().Width() + spacing;
// Add only containers which have explicitly assigned priority.
- IPrioritable* pPrioritable = pChild->GetType() == WINDOW_CONTAINER ?
+ IPrioritable* pPrioritable = pChild->GetType() == WindowType::CONTAINER ?
dynamic_cast<IPrioritable*>(pChild) : nullptr;
if (pPrioritable && pPrioritable->GetPriority() != VCL_PRIORITY_DEFAULT)
m_aSortedChilds.push_back(pPrioritable);
diff --git a/sfx2/source/sidebar/ControllerFactory.cxx b/sfx2/source/sidebar/ControllerFactory.cxx
index 45d26eb854a4..00484980174b 100644
--- a/sfx2/source/sidebar/ControllerFactory.cxx
+++ b/sfx2/source/sidebar/ControllerFactory.cxx
@@ -110,7 +110,7 @@ Reference<frame::XToolbarController> ControllerFactory::CreateToolBoxController(
if (pItemWindow != nullptr)
{
WindowType nType = pItemWindow->GetType();
- if (nType == WINDOW_LISTBOX || nType == WINDOW_MULTILISTBOX || nType == WINDOW_COMBOBOX)
+ if (nType == WindowType::LISTBOX || nType == WindowType::MULTILISTBOX || nType == WindowType::COMBOBOX)
pItemWindow->SetAccessibleName(pToolBox->GetItemText(nItemId));
if (nWidth > 0)
pItemWindow->SetSizePixel(Size(nWidth, pItemWindow->GetSizePixel().Height()));
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index bd87930beb8d..fcbdc002b123 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -357,7 +357,7 @@ SvTreeListBox::SvTreeListBox(vcl::Window* pParent, WinBits nWinStyle) :
pEdCtrl = nullptr;
eSelMode = SelectionMode::Single;
nDragDropMode = DragDropMode::NONE;
- SetType(WINDOW_TREELISTBOX);
+ SetType(WindowType::TREELISTBOX);
InitTreeView();
diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx
index 413e92cd9bea..874caa55e499 100644
--- a/svtools/source/control/ruler.cxx
+++ b/svtools/source/control/ruler.cxx
@@ -278,7 +278,7 @@ void Ruler::ImplInit( WinBits nWinBits )
else
aDefSize.Width() = nDefHeight;
SetOutputSizePixel( aDefSize );
- SetType(WINDOW_RULER);
+ SetType(WindowType::RULER);
}
Ruler::Ruler( vcl::Window* pParent, WinBits nWinStyle ) :
diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx
index e6dd46ca926d..09235381fb74 100644
--- a/svtools/source/dialogs/wizardmachine.cxx
+++ b/svtools/source/dialogs/wizardmachine.cxx
@@ -319,14 +319,14 @@ namespace svt
// is it a button?
WindowType eType = pChildLoop->GetType();
- if ( (WINDOW_BUTTON == eType)
- || (WINDOW_PUSHBUTTON == eType)
- || (WINDOW_OKBUTTON == eType)
- || (WINDOW_CANCELBUTTON == eType)
- || (WINDOW_HELPBUTTON == eType)
- || (WINDOW_IMAGEBUTTON == eType)
- || (WINDOW_MENUBUTTON == eType)
- || (WINDOW_MOREBUTTON == eType)
+ if ( (WindowType::BUTTON == eType)
+ || (WindowType::PUSHBUTTON == eType)
+ || (WindowType::OKBUTTON == eType)
+ || (WindowType::CANCELBUTTON == eType)
+ || (WindowType::HELPBUTTON == eType)
+ || (WindowType::IMAGEBUTTON == eType)
+ || (WindowType::MENUBUTTON == eType)
+ || (WindowType::MOREBUTTON == eType)
)
{
pChildLoop->SetStyle(pChildLoop->GetStyle() & ~WB_DEFBUTTON);
diff --git a/svtools/source/uno/popupwindowcontroller.cxx b/svtools/source/uno/popupwindowcontroller.cxx
index 51d7bbc38dde..dd4f6cf7a820 100644
--- a/svtools/source/uno/popupwindowcontroller.cxx
+++ b/svtools/source/uno/popupwindowcontroller.cxx
@@ -196,7 +196,7 @@ Reference< awt::XWindow > SAL_CALL PopupWindowController::createPopupWindow()
FloatWinPopupFlags::NoMouseUpClose;
WinBits nWinBits;
- if ( pWin->GetType() == WINDOW_DOCKINGWINDOW )
+ if ( pWin->GetType() == WindowType::DOCKINGWINDOW )
nWinBits = static_cast< DockingWindow* >( pWin.get() )->GetFloatStyle();
else
nWinBits = pWin->GetStyle();
diff --git a/svtools/source/uno/statusbarcontroller.cxx b/svtools/source/uno/statusbarcontroller.cxx
index 8bb37ea27ae7..0b00ac3bdf54 100644
--- a/svtools/source/uno/statusbarcontroller.cxx
+++ b/svtools/source/uno/statusbarcontroller.cxx
@@ -279,7 +279,7 @@ void SAL_CALL StatusbarController::statusChanged( const FeatureStateEvent& Event
return;
VclPtr<vcl::Window> pWindow = VCLUnoHelper::GetWindow( m_xParentWindow );
- if ( pWindow && pWindow->GetType() == WINDOW_STATUSBAR && m_nID != 0 )
+ if ( pWindow && pWindow->GetType() == WindowType::STATUSBAR && m_nID != 0 )
{
OUString aStrValue;
StatusBar* pStatusBar = static_cast<StatusBar *>(pWindow.get());
@@ -503,7 +503,7 @@ void StatusbarController::bindListener()
if ( m_xParentWindow.is() )
{
VclPtr< StatusBar > pStatusBar = dynamic_cast< StatusBar* >( VCLUnoHelper::GetWindow( m_xParentWindow ).get() );
- if ( pStatusBar && pStatusBar->GetType() == WINDOW_STATUSBAR )
+ if ( pStatusBar && pStatusBar->GetType() == WindowType::STATUSBAR )
aRect = pStatusBar->GetItemRect( m_nID );
}
}
diff --git a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
index 162264f88aa6..ed62e566d250 100644
--- a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx
@@ -90,7 +90,7 @@ uno::Reference< XAccessible > SvxPixelCtlAccessible::getAccessibleParent( )
{
::osl::MutexGuard aGuard( m_aMutex );
vcl::Window *pTabPage = getNonLayoutParent(&mrPixelCtl);
- if (!pTabPage || WINDOW_TABPAGE != pTabPage->GetType())
+ if (!pTabPage || WindowType::TABPAGE != pTabPage->GetType())
return uno::Reference< XAccessible >();
else
return pTabPage->GetAccessible();
@@ -101,7 +101,7 @@ sal_Int32 SvxPixelCtlAccessible::getAccessibleIndexInParent( )
::osl::MutexGuard aGuard( m_aMutex );
sal_uInt16 nIdx = 0;
vcl::Window *pTabPage = getNonLayoutParent(&mrPixelCtl);
- if (!pTabPage || WINDOW_TABPAGE != pTabPage->GetType())
+ if (!pTabPage || WindowType::TABPAGE != pTabPage->GetType())
return -1;
sal_uInt16 nChildren = pTabPage->GetChildCount();
for(nIdx = 0; nIdx < nChildren; nIdx++)
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index 42bde26b4155..c6283bac516a 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -270,7 +270,7 @@ void SvxRectCtl::MouseButtonDown( const MouseEvent& rMEvt )
SetActualRP( eRP );
vcl::Window *pTabPage = getNonLayoutParent(this);
- if (pTabPage && WINDOW_TABPAGE == pTabPage->GetType())
+ if (pTabPage && WindowType::TABPAGE == pTabPage->GetType())
static_cast<SvxTabPage*>(pTabPage)->PointChanged( this, eRP );
}
}
@@ -355,7 +355,7 @@ void SvxRectCtl::KeyInput( const KeyEvent& rKeyEvt )
SetActualRP( eNewRP );
vcl::Window *pTabPage = getNonLayoutParent(this);
- if (pTabPage && WINDOW_TABPAGE == pTabPage->GetType())
+ if (pTabPage && WindowType::TABPAGE == pTabPage->GetType())
static_cast<SvxTabPage*>(pTabPage)->PointChanged(this, eRP);
SetFocusRect();
@@ -671,7 +671,7 @@ void SvxRectCtl::SetState( CTL_STATE nState )
Invalidate();
vcl::Window *pTabPage = getNonLayoutParent(this);
- if (pTabPage && WINDOW_TABPAGE == pTabPage->GetType())
+ if (pTabPage && WindowType::TABPAGE == pTabPage->GetType())
static_cast<SvxTabPage*>(pTabPage)->PointChanged(this, eRP);
}
@@ -792,7 +792,7 @@ long SvxPixelCtl::ShowPosition( const Point &pt)
Invalidate(Rectangle(Point(0,0),aRectSize));
vcl::Window *pTabPage = getNonLayoutParent(this);
- if (pTabPage && WINDOW_TABPAGE == pTabPage->GetType())
+ if (pTabPage && WindowType::TABPAGE == pTabPage->GetType())
static_cast<SvxTabPage*>(pTabPage)->PointChanged( this, RectPoint::MM ); // RectPoint ist dummy
return GetFocusPosIndex();
diff --git a/svx/source/sidebar/PanelLayout.cxx b/svx/source/sidebar/PanelLayout.cxx
index 80245dcd9bf2..4f02866ec33a 100644
--- a/svx/source/sidebar/PanelLayout.cxx
+++ b/svx/source/sidebar/PanelLayout.cxx
@@ -85,7 +85,7 @@ void PanelLayout::setPosSizePixel(long nX, long nY, long nWidth, long nHeight, P
bool bIsLayoutEnabled = isLayoutEnabled(this);
vcl::Window *pChild = GetWindow(GetWindowType::FirstChild);
- if (bIsLayoutEnabled && pChild->GetType() == WINDOW_SCROLLWINDOW)
+ if (bIsLayoutEnabled && pChild->GetType() == WindowType::SCROLLWINDOW)
{
WinBits nStyle = pChild->GetStyle();
if (nStyle & (WB_AUTOHSCROLL | WB_HSCROLL))
diff --git a/svx/source/tbxctrls/SvxColorValueSet.cxx b/svx/source/tbxctrls/SvxColorValueSet.cxx
index cde72ac18c96..65955445e602 100644
--- a/svx/source/tbxctrls/SvxColorValueSet.cxx
+++ b/svx/source/tbxctrls/SvxColorValueSet.cxx
@@ -124,7 +124,7 @@ void SvxColorValueSet::Resize()
{
vcl::Window *pParent = GetParent();
//don't do this for the drop down color palettes
- if (pParent && pParent->GetType() != WINDOW_FLOATINGWINDOW)
+ if (pParent && pParent->GetType() != WindowType::FLOATINGWINDOW)
layoutToGivenHeight(GetOutputSizePixel().Height(), GetItemCount());
ValueSet::Resize();
}
diff --git a/svx/source/tbxctrls/verttexttbxctrl.cxx b/svx/source/tbxctrls/verttexttbxctrl.cxx
index dce2e51c909e..3b1a33daf093 100644
--- a/svx/source/tbxctrls/verttexttbxctrl.cxx
+++ b/svx/source/tbxctrls/verttexttbxctrl.cxx
@@ -80,8 +80,7 @@ void SvxVertCTLTextTbxCtrl::StateChanged(
{
ToolBox& rTbx = GetToolBox();
vcl::Window* pParent = rTbx.GetParent();
- WindowType nWinType = pParent->GetType();
- if(WINDOW_FLOATINGWINDOW == nWinType)
+ if(WindowType::FLOATINGWINDOW == pParent->GetType())
{
Size aSize(rTbx.CalcWindowSizePixel());
rTbx.SetPosSizePixel( Point(), aSize );
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index d1c630b0cacd..66a8e0129fca 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -2245,8 +2245,8 @@ IMPL_LINK(SwTOXEntryTabPage, RemoveInsertAuthHdl, Button*, pButton, void)
else
{
Control* pCtrl = m_pTokenWIN->GetActiveControl();
- OSL_ENSURE(WINDOW_EDIT != pCtrl->GetType(), "Remove should be disabled");
- if( WINDOW_EDIT != pCtrl->GetType() )
+ OSL_ENSURE(WindowType::EDIT != pCtrl->GetType(), "Remove should be disabled");
+ if( WindowType::EDIT != pCtrl->GetType() )
{
//fill it into the ListBox
const SwFormToken& rToken = static_cast<SwTOXButton*>(pCtrl)->GetFormToken();
@@ -2544,7 +2544,7 @@ IMPL_LINK(SwTOXEntryTabPage, StyleSelectHdl, ListBox&, rBox, void)
OSL_ENSURE(pCtrl, "no active control?");
if(pCtrl)
{
- if(WINDOW_EDIT == pCtrl->GetType())
+ if(WindowType::EDIT == pCtrl->GetType())
static_cast<SwTOXEdit*>(pCtrl)->SetCharStyleName(sEntry, nId);
else
static_cast<SwTOXButton*>(pCtrl)->SetCharStyleName(sEntry, nId);
@@ -2560,7 +2560,7 @@ IMPL_LINK(SwTOXEntryTabPage, ChapterInfoHdl, ListBox&, rBox, void)
{
Control* pCtrl = m_pTokenWIN->GetActiveControl();
OSL_ENSURE(pCtrl, "no active control?");
- if(pCtrl && WINDOW_EDIT != pCtrl->GetType())
+ if(pCtrl && WindowType::EDIT != pCtrl->GetType())
static_cast<SwTOXButton*>(pCtrl)->SetChapterInfo(nPos);
ModifyHdl(nullptr);
@@ -2573,7 +2573,7 @@ IMPL_LINK(SwTOXEntryTabPage, ChapterInfoOutlineHdl, Edit&, rEdit, void)
Control* pCtrl = m_pTokenWIN->GetActiveControl();
OSL_ENSURE(pCtrl, "no active control?");
- if(pCtrl && WINDOW_EDIT != pCtrl->GetType())
+ if(pCtrl && WindowType::EDIT != pCtrl->GetType())
static_cast<SwTOXButton*>(pCtrl)->SetOutlineLevel(nLevel);
ModifyHdl(nullptr);
@@ -2587,7 +2587,7 @@ IMPL_LINK(SwTOXEntryTabPage, NumberFormatHdl, ListBox&, rBox, void)
{
Control* pCtrl = m_pTokenWIN->GetActiveControl();
OSL_ENSURE(pCtrl, "no active control?");
- if(pCtrl && WINDOW_EDIT != pCtrl->GetType())
+ if(pCtrl && WindowType::EDIT != pCtrl->GetType())
{
static_cast<SwTOXButton*>(pCtrl)->SetEntryNumberFormat(nPos);//i89791
}
@@ -2599,10 +2599,10 @@ IMPL_LINK(SwTOXEntryTabPage, TabPosHdl, Edit&, rEdit, void)
{
MetricField* pField = static_cast<MetricField*>(&rEdit);
Control* pCtrl = m_pTokenWIN->GetActiveControl();
- OSL_ENSURE(pCtrl && WINDOW_EDIT != pCtrl->GetType() &&
+ OSL_ENSURE(pCtrl && WindowType::EDIT != pCtrl->GetType() &&
TOKEN_TAB_STOP == static_cast<SwTOXButton*>(pCtrl)->GetFormToken().eTokenType,
"no active style::TabStop control?");
- if( pCtrl && WINDOW_EDIT != pCtrl->GetType() )
+ if( pCtrl && WindowType::EDIT != pCtrl->GetType() )
{
static_cast<SwTOXButton*>(pCtrl)->SetTabPosition( static_cast< SwTwips >(
pField->Denormalize( pField->GetValue( FUNIT_TWIP ))));
@@ -2613,10 +2613,10 @@ IMPL_LINK(SwTOXEntryTabPage, TabPosHdl, Edit&, rEdit, void)
IMPL_LINK(SwTOXEntryTabPage, FillCharHdl, Edit&, rBox, void)
{
Control* pCtrl = m_pTokenWIN->GetActiveControl();
- OSL_ENSURE(pCtrl && WINDOW_EDIT != pCtrl->GetType() &&
+ OSL_ENSURE(pCtrl && WindowType::EDIT != pCtrl->GetType() &&
TOKEN_TAB_STOP == static_cast<SwTOXButton*>(pCtrl)->GetFormToken().eTokenType,
"no active style::TabStop control?");
- if(pCtrl && WINDOW_EDIT != pCtrl->GetType())
+ if(pCtrl && WindowType::EDIT != pCtrl->GetType())
{
sal_Unicode cSet;
if( !rBox.GetText().isEmpty() )
@@ -2632,7 +2632,7 @@ IMPL_LINK(SwTOXEntryTabPage, AutoRightHdl, Button*, pBox, void)
{
//the most right style::TabStop is usually right aligned
Control* pCurCtrl = m_pTokenWIN->GetActiveControl();
- OSL_ENSURE(WINDOW_EDIT != pCurCtrl->GetType() &&
+ OSL_ENSURE(WindowType::EDIT != pCurCtrl->GetType() &&
static_cast<SwTOXButton*>(pCurCtrl)->GetFormToken().eTokenType == TOKEN_TAB_STOP,
"no style::TabStop selected!");
@@ -2853,7 +2853,7 @@ void SwTokenWindow::SetActiveControl(Control* pSet)
pActiveCtrl->GrabFocus();
//it must be a SwTOXEdit
const SwFormToken* pFToken;
- if( WINDOW_EDIT == pActiveCtrl->GetType() )
+ if( WindowType::EDIT == pActiveCtrl->GetType() )
pFToken = &static_cast<SwTOXEdit*>(pActiveCtrl.get())->GetFormToken();
else
pFToken = &static_cast<SwTOXButton*>(pActiveCtrl.get())->GetFormToken();
@@ -2977,7 +2977,7 @@ void SwTokenWindow::InsertAtSelection(const OUString& rText, const SwFormToken&
{
pControl = *it;
- if( WINDOW_EDIT != pControl->GetType())
+ if( WindowType::EDIT != pControl->GetType())
{
const SwFormToken& rNewToken =
static_cast<const SwTOXButton*>(pControl)->GetFormToken();
@@ -3009,7 +3009,7 @@ void SwTokenWindow::InsertAtSelection(const OUString& rText, const SwFormToken&
pControl = *it;
if( pControl != pActiveCtrl &&
- WINDOW_EDIT != pControl->GetType())
+ WindowType::EDIT != pControl->GetType())
{
const SwFormToken& rNewToken =
static_cast<const SwTOXButton*>(pControl)->GetFormToken();
@@ -3073,7 +3073,7 @@ void SwTokenWindow::InsertAtSelection(const OUString& rText, const SwFormToken&
Size aControlSize(GetOutputSizePixel());
- if( WINDOW_EDIT == pActiveCtrl->GetType())
+ if( WindowType::EDIT == pActiveCtrl->GetType())
{
++iterActive;
@@ -3371,7 +3371,7 @@ OUString SwTokenWindow::GetPattern() const
{
const Control *pCtrl = *it;
- const SwFormToken &rNewToken = pCtrl->GetType() == WINDOW_EDIT
+ const SwFormToken &rNewToken = pCtrl->GetType() == WindowType::EDIT
? const_cast<SwTOXEdit*>(static_cast<const SwTOXEdit*>(pCtrl))->GetFormToken()
: static_cast<const SwTOXButton*>(pCtrl)->GetFormToken();
@@ -3391,7 +3391,7 @@ bool SwTokenWindow::Contains(FormTokenType eSearchFor) const
{
const Control *pCtrl = *it;
- const SwFormToken &rNewToken = pCtrl->GetType() == WINDOW_EDIT
+ const SwFormToken &rNewToken = pCtrl->GetType() == WindowType::EDIT
? const_cast<SwTOXEdit*>(static_cast<const SwTOXEdit*>(pCtrl))->GetFormToken()
: static_cast<const SwTOXButton*>(pCtrl)->GetFormToken();
@@ -3480,7 +3480,7 @@ IMPL_LINK(SwTokenWindow, TbxFocusHdl, Control&, rControl, void)
SwTOXEdit* pEdit = static_cast<SwTOXEdit*>(&rControl);
for (VclPtr<Control> const & pCtrl : aControlList)
{
- if (pCtrl && pCtrl->GetType() != WINDOW_EDIT)
+ if (pCtrl && pCtrl->GetType() != WindowType::EDIT)
static_cast<SwTOXButton*>(pCtrl.get())->Check(false);
}
@@ -3531,7 +3531,7 @@ IMPL_LINK(SwTokenWindow, TbxFocusBtnHdl, Control&, rControl, void )
{
Control *pControl = it->get();
- if (pControl && WINDOW_EDIT != pControl->GetType())
+ if (pControl && WindowType::EDIT != pControl->GetType())
static_cast<SwTOXButton*>(pControl)->Check(pBtn == pControl);
}
@@ -3577,7 +3577,7 @@ sal_uInt32 SwTokenWindow::GetControlIndex(FormTokenType eType) const
for (ctrl_const_iterator it = aControlList.begin(); it != aControlList.end(); ++it)
{
const Control* pControl = *it;
- const SwFormToken& rNewToken = WINDOW_EDIT == pControl->GetType()
+ const SwFormToken& rNewToken = WindowType::EDIT == pControl->GetType()
? const_cast<SwTOXEdit*>(static_cast<const SwTOXEdit*>(pControl))->GetFormToken()
: static_cast<const SwTOXButton*>(pControl)->GetFormToken();
diff --git a/sw/source/uibase/dbui/dbui.cxx b/sw/source/uibase/dbui/dbui.cxx
index 75d3d3696c0d..931683f5472f 100644
--- a/sw/source/uibase/dbui/dbui.cxx
+++ b/sw/source/uibase/dbui/dbui.cxx
@@ -108,7 +108,7 @@ void CreateMonitor::SetCurrentPosition( sal_Int32 nCurrent )
CancelableDialog::CancelableDialog( vcl::Window *pParent, bool modal,
const OUString& rID, const OUString& rUIXMLDescription )
: Dialog( pParent , rID, rUIXMLDescription,
- modal ? WINDOW_MODALDIALOG : WINDOW_MODELESSDIALOG )
+ modal ? WindowType::MODALDIALOG : WindowType::MODELESSDIALOG )
, mbModal( modal )
{
get(m_pCancelButton, "cancel");
diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx
index e1396e11b45c..7d3600bc93c7 100644
--- a/toolkit/source/awt/vclxaccessiblecomponent.cxx
+++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx
@@ -436,7 +436,7 @@ void VCLXAccessibleComponent::FillAccessibleStateSet( utl::AccessibleStateSetHel
}
//If a combobox or list's edit child isn't read-only,EDITABLE state
//should be set.
- if( pWindow && pWindow->GetType() == WINDOW_COMBOBOX )
+ if( pWindow && pWindow->GetType() == WindowType::COMBOBOX )
{
if( !( pWindow->GetStyle() & WB_READONLY) ||
!static_cast<Edit*>(pWindow.get())->IsReadOnly() )
@@ -448,14 +448,14 @@ void VCLXAccessibleComponent::FillAccessibleStateSet( utl::AccessibleStateSetHel
while( pWindow && pChild )
{
VclPtr<vcl::Window> pWinTemp = pChild->GetWindow( GetWindowType::FirstChild );
- if( pWinTemp && pWinTemp->GetType() == WINDOW_EDIT )
+ if( pWinTemp && pWinTemp->GetType() == WindowType::EDIT )
{
if( !( pWinTemp->GetStyle() & WB_READONLY) ||
!static_cast<Edit*>(pWinTemp.get())->IsReadOnly() )
rStateSet.AddState( accessibility::AccessibleStateType::EDITABLE );
break;
}
- if( pChild->GetType() == WINDOW_EDIT )
+ if( pChild->GetType() == WindowType::EDIT )
{
if( !( pChild->GetStyle() & WB_READONLY) ||
!static_cast<Edit*>(pChild.get())->IsReadOnly())
diff --git a/toolkit/source/awt/vclxcontainer.cxx b/toolkit/source/awt/vclxcontainer.cxx
index 0f8a3bb657b0..ec437aadae06 100644
--- a/toolkit/source/awt/vclxcontainer.cxx
+++ b/toolkit/source/awt/vclxcontainer.cxx
@@ -185,7 +185,7 @@ void VCLXContainer::setGroup( const css::uno::Sequence< css::uno::Reference< css
vcl::Window* pSortBehind = pPrevWin;
// #57096# Sort all radios consecutively
bool bNewPrevWin = true;
- if ( pWin->GetType() == WINDOW_RADIOBUTTON )
+ if ( pWin->GetType() == WindowType::RADIOBUTTON )
{
if ( pPrevRadio )
{
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index b80d2607525a..5feba0603a6d 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -124,9 +124,6 @@
#include "helper/unowrapper.hxx"
-#define VCLWINDOW_FRAMEWINDOW 0x1000
-#define VCLWINDOW_SYSTEMCHILDWINDOW 0x1001
-
#if defined(_WIN32)
#define SYSTEM_DEPENDENT_TYPE css::lang::SystemDependent::SYSTEM_WIN32
#elif defined(MACOSX)
@@ -308,36 +305,36 @@ public:
};
-WinBits ImplGetWinBits( sal_uInt32 nComponentAttribs, sal_uInt16 nCompType )
+WinBits ImplGetWinBits( sal_uInt32 nComponentAttribs, WindowType nCompType )
{
WinBits nWinBits = 0;
bool bMessBox = false;
- if ( ( nCompType == WINDOW_INFOBOX ) ||
- ( nCompType == WINDOW_MESSBOX ) ||
- ( nCompType == WINDOW_QUERYBOX ) ||
- ( nCompType == WINDOW_WARNINGBOX ) ||
- ( nCompType == WINDOW_ERRORBOX ) )
+ if ( ( nCompType == WindowType::INFOBOX ) ||
+ ( nCompType == WindowType::MESSBOX ) ||
+ ( nCompType == WindowType::QUERYBOX ) ||
+ ( nCompType == WindowType::WARNINGBOX ) ||
+ ( nCompType == WindowType::ERRORBOX ) )
{
bMessBox = true;
}
bool bDecoratedWindow = false;
if ( bMessBox
- || ( nCompType == WINDOW_DIALOG )
- || ( nCompType == WINDOW_MODELESSDIALOG )
- || ( nCompType == WINDOW_MODALDIALOG )
- || ( nCompType == WINDOW_SYSTEMDIALOG )
- || ( nCompType == WINDOW_PATHDIALOG )
- || ( nCompType == WINDOW_FILEDIALOG )
- || ( nCompType == WINDOW_PRINTERSETUPDIALOG )
- || ( nCompType == WINDOW_PRINTDIALOG )
- || ( nCompType == WINDOW_COLORDIALOG )
- || ( nCompType == WINDOW_FONTDIALOG )
- || ( nCompType == WINDOW_DOCKINGWINDOW )
- || ( nCompType == WINDOW_TABDIALOG )
- || ( nCompType == WINDOW_BUTTONDIALOG )
- || ( nCompType == WINDOW_SYSTEMCHILDWINDOW )
+ || ( nCompType == WindowType::DIALOG )
+ || ( nCompType == WindowType::MODELESSDIALOG )
+ || ( 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::TABDIALOG )
+ || ( nCompType == WindowType::BUTTONDIALOG )
+ || ( nCompType == WindowType::SYSTEMCHILDWINDOW )
)
{
bDecoratedWindow = true;
@@ -404,7 +401,7 @@ WinBits ImplGetWinBits( sal_uInt32 nComponentAttribs, sal_uInt16 nCompType )
if( nComponentAttribs & css::awt::VclWindowPeerAttribute::DEF_NO )
nWinBits |= WB_DEF_NO;
}
- if ( nCompType == WINDOW_MULTILINEEDIT || nCompType == WINDOW_DIALOG || nCompType == WINDOW_GROUPBOX )
+ if ( nCompType == WindowType::MULTILINEEDIT || nCompType == WindowType::DIALOG || nCompType == WindowType::GROUPBOX )
{
if( nComponentAttribs & css::awt::VclWindowPeerAttribute::AUTOHSCROLL )
nWinBits |= WB_AUTOHSCROLL;
@@ -438,72 +435,72 @@ struct ComponentInfo
static ComponentInfo aComponentInfos [] =
{
- { "buttondialog", WINDOW_BUTTONDIALOG },
- { "cancelbutton", WINDOW_CANCELBUTTON },
- { "checkbox", WINDOW_CHECKBOX },
- { "combobox", WINDOW_COMBOBOX },
- { "control", WINDOW_CONTROL },
- { "currencybox", WINDOW_CURRENCYBOX },
- { "currencyfield", WINDOW_CURRENCYFIELD },
- { "datebox", WINDOW_DATEBOX },
- { "datefield", WINDOW_DATEFIELD },
- { "dialog", WINDOW_DIALOG },
- { "dockingarea", WINDOW_DOCKINGAREA },
- { "dockingwindow", WINDOW_DOCKINGWINDOW },
- { "edit", WINDOW_EDIT },
- { "errorbox", WINDOW_ERRORBOX },
- { "fixedbitmap", WINDOW_FIXEDBITMAP },
- { "fixedimage", WINDOW_FIXEDIMAGE },
- { "fixedline", WINDOW_FIXEDLINE },
- { "fixedtext", WINDOW_FIXEDTEXT },
- { "floatingwindow", WINDOW_FLOATINGWINDOW },
- { "framewindow", VCLWINDOW_FRAMEWINDOW },
- { "groupbox", WINDOW_GROUPBOX },
- { "frame", WINDOW_GROUPBOX },
- { "helpbutton", WINDOW_HELPBUTTON },
- { "imagebutton", WINDOW_IMAGEBUTTON },
- { "infobox", WINDOW_INFOBOX },
- { "listbox", WINDOW_LISTBOX },
- { "longcurrencybox", WINDOW_LONGCURRENCYBOX },
- { "longcurrencyfield", WINDOW_LONGCURRENCYFIELD },
- { "menubutton", WINDOW_MENUBUTTON },
- { "messbox", WINDOW_MESSBOX },
- { "metricbox", WINDOW_METRICBOX },
- { "metricfield", WINDOW_METRICFIELD },
- { "modaldialog", WINDOW_MODALDIALOG },
- { "modelessdialog", WINDOW_MODELESSDIALOG },
- { "morebutton", WINDOW_MOREBUTTON },
- { "multilineedit", WINDOW_MULTILINEEDIT },
- { "multilistbox", WINDOW_MULTILISTBOX },
- { "numericbox", WINDOW_NUMERICBOX },
- { "numericfield", WINDOW_NUMERICFIELD },
- { "okbutton", WINDOW_OKBUTTON },
- { "patternbox", WINDOW_PATTERNBOX },
- { "patternfield", WINDOW_PATTERNFIELD },
- { "pushbutton", WINDOW_PUSHBUTTON },
- { "querybox", WINDOW_QUERYBOX },
- { "radiobutton", WINDOW_RADIOBUTTON },
- { "scrollbar", WINDOW_SCROLLBAR },
- { "scrollbarbox", WINDOW_SCROLLBARBOX },
- { "animatedimages", WINDOW_CONTROL },
- { "spinbutton", WINDOW_SPINBUTTON },
- { "spinfield", WINDOW_SPINFIELD },
- { "splitter", WINDOW_SPLITTER },
- { "splitwindow", WINDOW_SPLITWINDOW },
- { "statusbar", WINDOW_STATUSBAR },
- { "systemchildwindow", VCLWINDOW_SYSTEMCHILDWINDOW },
- { "tabcontrol", WINDOW_TABCONTROL },
- { "tabdialog", WINDOW_TABDIALOG },
- { "tabpage", WINDOW_TABPAGE },
- { "timebox", WINDOW_TIMEBOX },
- { "timefield", WINDOW_TIMEFIELD },
- { "toolbox", WINDOW_TOOLBOX },
- { "tristatebox", WINDOW_TRISTATEBOX },
- { "warningbox", WINDOW_WARNINGBOX },
- { "window", WINDOW_WINDOW },
- { "workwindow", WINDOW_WORKWINDOW },
- { "tabpagecontainer", WINDOW_CONTROL },
- { "tabpagemodel", WINDOW_TABPAGE }
+ { "buttondialog", WindowType::BUTTONDIALOG },
+ { "cancelbutton", WindowType::CANCELBUTTON },
+ { "checkbox", WindowType::CHECKBOX },
+ { "combobox", WindowType::COMBOBOX },
+ { "control", WindowType::CONTROL },
+ { "currencybox", WindowType::CURRENCYBOX },
+ { "currencyfield", WindowType::CURRENCYFIELD },
+ { "datebox", WindowType::DATEBOX },
+ { "datefield", WindowType::DATEFIELD },
+ { "dialog", WindowType::DIALOG },
+ { "dockingarea", WindowType::DOCKINGAREA },
+ { "dockingwindow", WindowType::DOCKINGWINDOW },
+ { "edit", WindowType::EDIT },
+ { "errorbox", WindowType::ERRORBOX },
+ { "fixedbitmap", WindowType::FIXEDBITMAP },
+ { "fixedimage", WindowType::FIXEDIMAGE },
+ { "fixedline", WindowType::FIXEDLINE },
+ { "fixedtext", WindowType::FIXEDTEXT },
+ { "floatingwindow", WindowType::FLOATINGWINDOW },
+ { "framewindow", WindowType::TOOLKIT_FRAMEWINDOW },
+ { "groupbox", WindowType::GROUPBOX },
+ { "frame", WindowType::GROUPBOX },
+ { "helpbutton", WindowType::HELPBUTTON },
+ { "imagebutton", WindowType::IMAGEBUTTON },
+ { "infobox", WindowType::INFOBOX },
+ { "listbox", WindowType::LISTBOX },
+ { "longcurrencybox", WindowType::LONGCURRENCYBOX },
+ { "longcurrencyfield", WindowType::LONGCURRENCYFIELD },
+ { "menubutton", WindowType::MENUBUTTON },
+ { "messbox", WindowType::MESSBOX },
+ { "metricbox", WindowType::METRICBOX },
+ { "metricfield", WindowType::METRICFIELD },
+ { "modaldialog", WindowType::MODALDIALOG },
+ { "modelessdialog", WindowType::MODELESSDIALOG },
+ { "morebutton", WindowType::MOREBUTTON },
+ { "multilineedit", WindowType::MULTILINEEDIT },
+ { "multilistbox", WindowType::MULTILISTBOX },
+ { "numericbox", WindowType::NUMERICBOX },
+ { "numericfield", WindowType::NUMERICFIELD },
+ { "okbutton", WindowType::OKBUTTON },
+ { "patternbox", WindowType::PATTERNBOX },
+ { "patternfield", WindowType::PATTERNFIELD },
+ { "pushbutton", WindowType::PUSHBUTTON },
+ { "querybox", WindowType::QUERYBOX },
+ { "radiobutton", WindowType::RADIOBUTTON },
+ { "scrollbar", WindowType::SCROLLBAR },
+ { "scrollbarbox", WindowType::SCROLLBARBOX },
+ { "animatedimages", WindowType::CONTROL },
+ { "spinbutton", WindowType::SPINBUTTON },
+ { "spinfield", WindowType::SPINFIELD },
+ { "splitter", WindowType::SPLITTER },
+ { "splitwindow", WindowType::SPLITWINDOW },
+ { "statusbar", WindowType::STATUSBAR },
+ { "systemchildwindow", WindowType::TOOLKIT_SYSTEMCHILDWINDOW },
+ { "tabcontrol", WindowType::TABCONTROL },
+ { "tabdialog", WindowType::TABDIALOG },
+ { "tabpage", WindowType::TABPAGE },
+ { "timebox", WindowType::TIMEBOX },
+ { "timefield", WindowType::TIMEFIELD },
+ { "toolbox", WindowType::TOOLBOX },
+ { "tristatebox", WindowType::TRISTATEBOX },
+ { "warningbox", WindowType::WARNINGBOX },
+ { "window", WindowType::WINDOW },
+ { "workwindow", WindowType::WORKWINDOW },
+ { "tabpagecontainer", WindowType::CONTROL },
+ { "tabpagemodel", WindowType::TABPAGE }
};
extern "C"
@@ -515,7 +512,7 @@ static int SAL_CALL ComponentInfoCompare( const void* pFirst, const void* pSecon
}
}
-sal_uInt16 ImplGetComponentType( const OUString& rServiceName )
+WindowType ImplGetComponentType( const OUString& rServiceName )
{
static bool bSorted = false;
if( !bSorted )
@@ -541,7 +538,7 @@ sal_uInt16 ImplGetComponentType( const OUString& rServiceName )
sizeof( ComponentInfo ),
ComponentInfoCompare ));
- return pInf ? pInf->nWinType : 0;
+ return pInf ? pInf->nWinType : WindowType::NONE;
}
@@ -800,7 +797,7 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
aServiceName = aServiceName.toAsciiLowerCase();
VclPtr<vcl::Window> pNewWindow;
- sal_uInt16 nType = ImplGetComponentType( aServiceName );
+ WindowType nType = ImplGetComponentType( aServiceName );
bool bFrameControl = false;
if ( aServiceName == "frame" )
bFrameControl = true;
@@ -814,19 +811,19 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
// Wenn die Component einen Parent braucht, dann NULL zurueckgeben,
// spaeter mal css::uno::Exception...
bool bException = true;
- if ( ( nType == WINDOW_DIALOG )
- || ( nType == WINDOW_MODALDIALOG )
- || ( nType == WINDOW_MODELESSDIALOG )
- || ( nType == WINDOW_MESSBOX )
- || ( nType == WINDOW_INFOBOX )
- || ( nType == WINDOW_WARNINGBOX )
- || ( nType == WINDOW_ERRORBOX )
- || ( nType == WINDOW_QUERYBOX )
+ if ( ( nType == WindowType::DIALOG )
+ || ( nType == WindowType::MODALDIALOG )
+ || ( nType == WindowType::MODELESSDIALOG )
+ || ( nType == WindowType::MESSBOX )
+ || ( nType == WindowType::INFOBOX )
+ || ( nType == WindowType::WARNINGBOX )
+ || ( nType == WindowType::ERRORBOX )
+ || ( nType == WindowType::QUERYBOX )
)
bException = false;
- else if ( ( nType == WINDOW_WINDOW ) ||
- ( nType == WINDOW_WORKWINDOW ) ||
- ( nType == VCLWINDOW_FRAMEWINDOW ) )
+ else if ( ( nType == WindowType::WINDOW ) ||
+ ( nType == WindowType::WORKWINDOW ) ||
+ ( nType == WindowType::TOOLKIT_FRAMEWINDOW ) )
{
if ( rDescriptor.Type == css::awt::WindowClass_TOP )
bException = false;
@@ -839,72 +836,72 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
}
}
- if ( nType )
+ if ( nType != WindowType::NONE )
{
SolarMutexGuard aVclGuard;
- switch ( (WindowType)nType )
+ switch ( nType )
{
- case WINDOW_CANCELBUTTON:
+ case WindowType::CANCELBUTTON:
pNewWindow = VclPtr<CancelButton>::Create( pParent, nWinBits );
*ppNewComp = new VCLXButton;
break;
- case WINDOW_CHECKBOX:
+ case WindowType::CHECKBOX:
pNewWindow = VclPtr<CheckBox>::Create( pParent, nWinBits );
*ppNewComp = new VCLXCheckBox;
break;
- case WINDOW_COMBOBOX:
+ case WindowType::COMBOBOX:
pNewWindow = VclPtr<ComboBox>::Create( pParent, nWinBits|WB_AUTOHSCROLL );
static_cast<ComboBox*>(pNewWindow.get())->EnableAutoSize( false );
*ppNewComp = new VCLXComboBox;
break;
- case WINDOW_CURRENCYBOX:
+ case WindowType::CURRENCYBOX:
pNewWindow = VclPtr<CurrencyBox>::Create( pParent, nWinBits );
break;
- case WINDOW_CURRENCYFIELD:
+ case WindowType::CURRENCYFIELD:
pNewWindow = VclPtr<CurrencyField>::Create( pParent, nWinBits );
static_cast<CurrencyField*>(pNewWindow.get())->EnableEmptyFieldValue( true );
*ppNewComp = new VCLXNumericField;
static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( static_cast<FormatterBase*>(static_cast<CurrencyField*>(pNewWindow.get())) );
break;
- case WINDOW_DATEBOX:
+ case WindowType::DATEBOX:
pNewWindow = VclPtr<DateBox>::Create( pParent, nWinBits );
break;
- case WINDOW_DATEFIELD:
+ case WindowType::DATEFIELD:
pNewWindow = VclPtr<DateField>::Create( pParent, nWinBits );
static_cast<DateField*>(pNewWindow.get())->EnableEmptyFieldValue( true );
*ppNewComp = new VCLXDateField;
static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( static_cast<FormatterBase*>(static_cast<DateField*>(pNewWindow.get())) );
break;
- case WINDOW_DOCKINGAREA:
+ case WindowType::DOCKINGAREA:
pNewWindow = VclPtr<DockingAreaWindow>::Create( pParent );
break;
- case WINDOW_MULTILINEEDIT:
- case WINDOW_EDIT:
+ case WindowType::MULTILINEEDIT:
+ case WindowType::EDIT:
pNewWindow = VclPtr<Edit>::Create( pParent, nWinBits );
*ppNewComp = new VCLXEdit;
break;
- case WINDOW_ERRORBOX:
+ case WindowType::ERRORBOX:
pNewWindow = VclPtr<ErrorBox>::Create( pParent, nWinBits, OUString() );
*ppNewComp = new VCLXMessageBox;
break;
- case WINDOW_FIXEDBITMAP:
+ case WindowType::FIXEDBITMAP:
pNewWindow = VclPtr<FixedBitmap>::Create( pParent, nWinBits );
break;
- case WINDOW_FIXEDIMAGE:
+ case WindowType::FIXEDIMAGE:
pNewWindow = VclPtr<ImageControl>::Create( pParent, nWinBits );
*ppNewComp = new VCLXImageControl;
break;
- case WINDOW_FIXEDLINE:
+ case WindowType::FIXEDLINE:
pNewWindow = VclPtr<FixedLine>::Create( pParent, nWinBits );
break;
- case WINDOW_FIXEDTEXT:
+ case WindowType::FIXEDTEXT:
pNewWindow = VclPtr<FixedText>::Create( pParent, nWinBits );
*ppNewComp = new VCLXFixedText;
break;
- case WINDOW_FLOATINGWINDOW:
+ case WindowType::FLOATINGWINDOW:
pNewWindow = VclPtr<FloatingWindow>::Create( pParent, nWinBits );
break;
- case WINDOW_GROUPBOX:
+ case WindowType::GROUPBOX:
pNewWindow = VclPtr<GroupBox>::Create( pParent, nWinBits );
if ( bFrameControl )
{
@@ -915,50 +912,50 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
pGroupBox->SetMouseTransparent( false );
}
break;
- case WINDOW_HELPBUTTON:
+ case WindowType::HELPBUTTON:
pNewWindow = VclPtr<HelpButton>::Create( pParent, nWinBits );
*ppNewComp = new VCLXButton;
break;
- case WINDOW_IMAGEBUTTON:
+ case WindowType::IMAGEBUTTON:
pNewWindow = VclPtr<ImageButton>::Create( pParent, nWinBits );
*ppNewComp = new VCLXButton;
break;
- case WINDOW_INFOBOX:
+ case WindowType::INFOBOX:
pNewWindow = VclPtr<InfoBox>::Create( pParent, OUString() );
*ppNewComp = new VCLXMessageBox;
break;
- case WINDOW_LISTBOX:
+ case WindowType::LISTBOX:
pNewWindow = VclPtr<ListBox>::Create( pParent, nWinBits|WB_SIMPLEMODE|WB_AUTOHSCROLL );
static_cast<ListBox*>(pNewWindow.get())->EnableAutoSize( false );
*ppNewComp = new VCLXListBox;
break;
- case WINDOW_LONGCURRENCYBOX:
+ case WindowType::LONGCURRENCYBOX:
pNewWindow = VclPtr<LongCurrencyBox>::Create( pParent, nWinBits );
break;
- case WINDOW_LONGCURRENCYFIELD:
+ case WindowType::LONGCURRENCYFIELD:
pNewWindow = VclPtr<LongCurrencyField>::Create( pParent, nWinBits );
*ppNewComp = new VCLXCurrencyField;
static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( static_cast<FormatterBase*>(static_cast<LongCurrencyField*>(pNewWindow.get())) );
break;
- case WINDOW_MENUBUTTON:
+ case WindowType::MENUBUTTON:
pNewWindow = VclPtr<MenuButton>::Create( pParent, nWinBits );
*ppNewComp = new VCLXButton;
break;
- case WINDOW_MESSBOX:
+ case WindowType::MESSBOX:
pNewWindow = VclPtr<MessBox>::Create( pParent, nWinBits, OUString(), OUString() );
*ppNewComp = new VCLXMessageBox;
break;
- case WINDOW_METRICBOX:
+ case WindowType::METRICBOX:
pNewWindow = VclPtr<MetricBox>::Create( pParent, nWinBits );
break;
- case WINDOW_METRICFIELD:
+ case WindowType::METRICFIELD:
pNewWindow = VclPtr<MetricField>::Create( pParent, nWinBits );
*ppNewComp = new VCLXMetricField;
static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( static_cast<FormatterBase*>(static_cast<MetricField*>(pNewWindow.get())) );
break;
- case WINDOW_DIALOG:
- case WINDOW_MODALDIALOG:
- case WINDOW_MODELESSDIALOG:
+ case WindowType::DIALOG:
+ case WindowType::MODALDIALOG:
+ case WindowType::MODELESSDIALOG:
{
// Modal/Modeless nur durch Show/Execute
if ( (pParent == nullptr ) && ( rDescriptor.ParentIndex == -1 ) )
@@ -975,44 +972,44 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
*ppNewComp = new VCLXDialog;
}
break;
- case WINDOW_MOREBUTTON:
+ case WindowType::MOREBUTTON:
pNewWindow = VclPtr<MoreButton>::Create( pParent, nWinBits );
*ppNewComp = new VCLXButton;
break;
- case WINDOW_MULTILISTBOX:
+ case WindowType::MULTILISTBOX:
pNewWindow = VclPtr<MultiListBox>::Create( pParent, nWinBits );
*ppNewComp = new VCLXListBox;
break;
- case WINDOW_NUMERICBOX:
+ case WindowType::NUMERICBOX:
pNewWindow = VclPtr<NumericBox>::Create( pParent, nWinBits );
break;
- case WINDOW_NUMERICFIELD:
+ case WindowType::NUMERICFIELD:
pNewWindow = VclPtr<NumericField>::Create( pParent, nWinBits );
static_cast<NumericField*>(pNewWindow.get())->EnableEmptyFieldValue( true );
*ppNewComp = new VCLXNumericField;
static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( static_cast<FormatterBase*>(static_cast<NumericField*>(pNewWindow.get())) );
break;
- case WINDOW_OKBUTTON:
+ case WindowType::OKBUTTON:
pNewWindow = VclPtr<OKButton>::Create( pParent, nWinBits );
*ppNewComp = new VCLXButton;
break;
- case WINDOW_PATTERNBOX:
+ case WindowType::PATTERNBOX:
pNewWindow = VclPtr<PatternBox>::Create( pParent, nWinBits );
break;
- case WINDOW_PATTERNFIELD:
+ case WindowType::PATTERNFIELD:
pNewWindow = VclPtr<PatternField>::Create( pParent, nWinBits );
*ppNewComp = new VCLXPatternField;
static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( static_cast<FormatterBase*>(static_cast<PatternField*>(pNewWindow.get())) );
break;
- case WINDOW_PUSHBUTTON:
+ case WindowType::PUSHBUTTON:
pNewWindow = VclPtr<PushButton>::Create( pParent, nWinBits );
*ppNewComp = new VCLXButton;
break;
- case WINDOW_QUERYBOX:
+ case WindowType::QUERYBOX:
pNewWindow = VclPtr<QueryBox>::Create( pParent, nWinBits, OUString() );
*ppNewComp = new VCLXMessageBox;
break;
- case WINDOW_RADIOBUTTON:
+ case WindowType::RADIOBUTTON:
pNewWindow = VclPtr<RadioButton>::Create( pParent, nWinBits );
*ppNewComp = new VCLXRadioButton;
@@ -1027,74 +1024,74 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
// 07.08.2001 - #87254# - frank.schoenheit@sun.com
static_cast<RadioButton*>(pNewWindow.get())->EnableRadioCheck( false );
break;
- case WINDOW_SCROLLBAR:
+ case WindowType::SCROLLBAR:
pNewWindow = VclPtr<ScrollBar>::Create( pParent, nWinBits );
*ppNewComp = new VCLXScrollBar;
break;
- case WINDOW_SCROLLBARBOX:
+ case WindowType::SCROLLBARBOX:
pNewWindow = VclPtr<ScrollBarBox>::Create( pParent, nWinBits );
break;
- case WINDOW_SPINBUTTON:
+ case WindowType::SPINBUTTON:
pNewWindow = VclPtr<SpinButton>::Create( pParent, nWinBits );
*ppNewComp = new ::toolkit::VCLXSpinButton;
break;
- case WINDOW_SPINFIELD:
+ case WindowType::SPINFIELD:
pNewWindow = VclPtr<SpinField>::Create( pParent, nWinBits );
*ppNewComp = new VCLXNumericField;
break;
- case WINDOW_SPLITTER:
+ case WindowType::SPLITTER:
pNewWindow = VclPtr<Splitter>::Create( pParent, nWinBits );
break;
- case WINDOW_SPLITWINDOW:
+ case WindowType::SPLITWINDOW:
pNewWindow = VclPtr<SplitWindow>::Create( pParent, nWinBits );
break;
- case WINDOW_STATUSBAR:
+ case WindowType::STATUSBAR:
pNewWindow = VclPtr<StatusBar>::Create( pParent, nWinBits );
break;
- case VCLWINDOW_SYSTEMCHILDWINDOW:
+ case WindowType::TOOLKIT_SYSTEMCHILDWINDOW:
pNewWindow = VclPtr<SystemChildWindow>::Create( pParent, nWinBits );
*ppNewComp = new VCLXSystemDependentWindow();
break;
- case WINDOW_TABCONTROL:
+ case WindowType::TABCONTROL:
pNewWindow = VclPtr<TabControl>::Create( pParent, nWinBits );
*ppNewComp = new VCLXMultiPage;
break;
- case WINDOW_TABDIALOG:
+ case WindowType::TABDIALOG:
pNewWindow = VclPtr<TabDialog>::Create( pParent, nWinBits );
break;
- case WINDOW_TABPAGE:
+ case WindowType::TABPAGE:
{
pNewWindow = VclPtr<TabPage>::Create( pParent, nWinBits );
*ppNewComp = new VCLXTabPage;
}
break;
- case WINDOW_TIMEBOX:
+ case WindowType::TIMEBOX:
pNewWindow = VclPtr<TimeBox>::Create( pParent, nWinBits );
break;
- case WINDOW_TIMEFIELD:
+ case WindowType::TIMEFIELD:
pNewWindow = VclPtr<TimeField>::Create( pParent, nWinBits );
static_cast<TimeField*>(pNewWindow.get())->EnableEmptyFieldValue( true );
*ppNewComp = new VCLXTimeField;
static_cast<VCLXFormattedSpinField*>(*ppNewComp)->SetFormatter( static_cast<FormatterBase*>(static_cast<TimeField*>(pNewWindow.get())) );
break;
- case WINDOW_TOOLBOX:
+ case WindowType::TOOLBOX:
pNewWindow = VclPtr<ToolBox>::Create( pParent, nWinBits );
*ppNewComp = new VCLXToolBox;
break;
- case WINDOW_TRISTATEBOX:
+ case WindowType::TRISTATEBOX:
pNewWindow = VclPtr<TriStateBox>::Create( pParent, nWinBits );
break;
- case WINDOW_WARNINGBOX:
+ case WindowType::WARNINGBOX:
pNewWindow = VclPtr<WarningBox>::Create( pParent, nWinBits, OUString() );
*ppNewComp = new VCLXMessageBox;
break;
- case WINDOW_WORKWINDOW:
- case WINDOW_WINDOW:
- case VCLWINDOW_FRAMEWINDOW:
- case WINDOW_DOCKINGWINDOW:
+ case WindowType::WORKWINDOW:
+ case WindowType::WINDOW:
+ case WindowType::TOOLKIT_FRAMEWINDOW:
+ case WindowType::DOCKINGWINDOW:
if ( rDescriptor.Type == css::awt::WindowClass_TOP )
{
- if (nType == WINDOW_DOCKINGWINDOW )
+ if (nType == WindowType::DOCKINGWINDOW )
pNewWindow = VclPtr<DockingWindow>::Create( pParent, nWinBits );
else
{
@@ -1163,11 +1160,11 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
pNewWindow = VclPtr<WorkWindow>::Create( pParent, nWinBits );
}
- *ppNewComp = new VCLXTopWindow( pNewWindow->GetType() == WINDOW_WORKWINDOW );
+ *ppNewComp = new VCLXTopWindow( pNewWindow->GetType() == WindowType::WORKWINDOW );
}
else if ( rDescriptor.Type == css::awt::WindowClass_CONTAINER )
{
- if (nType == WINDOW_DOCKINGWINDOW )
+ if (nType == WindowType::DOCKINGWINDOW )
pNewWindow = VclPtr<DockingWindow>::Create( pParent, nWinBits );
else
pNewWindow = VclPtr<vcl::Window>::Create( pParent, nWinBits );
@@ -1175,14 +1172,14 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp,
}
else
{
- if (nType == WINDOW_DOCKINGWINDOW )
+ if (nType == WindowType::DOCKINGWINDOW )
pNewWindow = VclPtr<DockingWindow>::Create( pParent, nWinBits );
else
pNewWindow = VclPtr<vcl::Window>::Create( pParent, nWinBits );
*ppNewComp = new VCLXWindow;
}
break;
- case WINDOW_CONTROL:
+ case WindowType::CONTROL:
if ( rDescriptor.WindowServiceName.equalsIgnoreAsciiCase(
"tabpagecontainer" ) )
{
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 12fd7822a413..272108a9f9c0 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -1140,9 +1140,9 @@ void VCLXWindow::setBackground( sal_Int32 nColor )
GetWindow()->SetControlBackground( aColor );
WindowType eWinType = GetWindow()->GetType();
- if ( ( eWinType == WINDOW_WINDOW ) ||
- ( eWinType == WINDOW_WORKWINDOW ) ||
- ( eWinType == WINDOW_FLOATINGWINDOW ) )
+ if ( ( eWinType == WindowType::WINDOW ) ||
+ ( eWinType == WindowType::WORKWINDOW ) ||
+ ( eWinType == WindowType::FLOATINGWINDOW ) )
{
GetWindow()->Invalidate();
}
@@ -1487,9 +1487,9 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
{
switch (eWinType)
{
- case WINDOW_OKBUTTON:
- case WINDOW_CANCELBUTTON:
- case WINDOW_HELPBUTTON:
+ case WindowType::OKBUTTON:
+ case WindowType::CANCELBUTTON:
+ case WindowType::HELPBUTTON:
// Standard Button: overwrite only if not empty.
if (!aText.isEmpty())
pWindow->SetText( aText );
@@ -1571,13 +1571,13 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
switch ( eWinType )
{
// set dialog color for default
- case WINDOW_DIALOG:
- case WINDOW_MESSBOX:
- case WINDOW_INFOBOX:
- case WINDOW_WARNINGBOX:
- case WINDOW_ERRORBOX:
- case WINDOW_QUERYBOX:
- case WINDOW_TABPAGE:
+ case WindowType::DIALOG:
+ case WindowType::MESSBOX:
+ case WindowType::INFOBOX:
+ case WindowType::WARNINGBOX:
+ case WindowType::ERRORBOX:
+ case WindowType::QUERYBOX:
+ case WindowType::TABPAGE:
{
Color aColor = pWindow->GetSettings().GetStyleSettings().GetDialogColor();
pWindow->SetBackground( aColor );
@@ -1585,11 +1585,11 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
break;
}
- case WINDOW_FIXEDTEXT:
- case WINDOW_CHECKBOX:
- case WINDOW_RADIOBUTTON:
- case WINDOW_GROUPBOX:
- case WINDOW_FIXEDLINE:
+ case WindowType::FIXEDTEXT:
+ case WindowType::CHECKBOX:
+ case WindowType::RADIOBUTTON:
+ case WindowType::GROUPBOX:
+ case WindowType::FIXEDLINE:
{
// support transparency only for special controls
pWindow->SetBackground();
@@ -1622,11 +1622,11 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
switch ( eWinType )
{
// reset paint transparent mode
- case WINDOW_FIXEDTEXT:
- case WINDOW_CHECKBOX:
- case WINDOW_RADIOBUTTON:
- case WINDOW_GROUPBOX:
- case WINDOW_FIXEDLINE:
+ case WindowType::FIXEDTEXT:
+ case WindowType::CHECKBOX:
+ case WindowType::RADIOBUTTON:
+ case WindowType::GROUPBOX:
+ case WindowType::FIXEDLINE:
pWindow->SetPaintTransparent( false );
break;
default:
@@ -1753,20 +1753,20 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
sal_Int16 nAlign = PROPERTY_ALIGN_LEFT;
switch ( eWinType )
{
- case WINDOW_COMBOBOX:
- case WINDOW_BUTTON:
- case WINDOW_PUSHBUTTON:
- case WINDOW_OKBUTTON:
- case WINDOW_CANCELBUTTON:
- case WINDOW_HELPBUTTON:
+ case WindowType::COMBOBOX:
+ case WindowType::BUTTON:
+ case WindowType::PUSHBUTTON:
+ case WindowType::OKBUTTON:
+ case WindowType::CANCELBUTTON:
+ case WindowType::HELPBUTTON:
nAlign = PROPERTY_ALIGN_CENTER;
SAL_FALLTHROUGH;
- case WINDOW_FIXEDTEXT:
- case WINDOW_EDIT:
- case WINDOW_MULTILINEEDIT:
- case WINDOW_CHECKBOX:
- case WINDOW_RADIOBUTTON:
- case WINDOW_LISTBOX:
+ case WindowType::FIXEDTEXT:
+ case WindowType::EDIT:
+ case WindowType::MULTILINEEDIT:
+ case WindowType::CHECKBOX:
+ case WindowType::RADIOBUTTON:
+ case WindowType::LISTBOX:
{
WinBits nStyle = pWindow->GetStyle();
nStyle &= ~(WB_LEFT|WB_CENTER|WB_RIGHT);
@@ -1781,19 +1781,20 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
pWindow->SetStyle( nStyle );
}
break;
+ default: break;
}
}
break;
case BASEPROPERTY_MULTILINE:
{
- if ( ( eWinType == WINDOW_FIXEDTEXT )
- || ( eWinType == WINDOW_CHECKBOX )
- || ( eWinType == WINDOW_RADIOBUTTON )
- || ( eWinType == WINDOW_BUTTON )
- || ( eWinType == WINDOW_PUSHBUTTON )
- || ( eWinType == WINDOW_OKBUTTON )
- || ( eWinType == WINDOW_CANCELBUTTON )
- || ( eWinType == WINDOW_HELPBUTTON )
+ if ( ( eWinType == WindowType::FIXEDTEXT )
+ || ( eWinType == WindowType::CHECKBOX )
+ || ( eWinType == WindowType::RADIOBUTTON )
+ || ( eWinType == WindowType::BUTTON )
+ || ( eWinType == WindowType::PUSHBUTTON )
+ || ( eWinType == WindowType::OKBUTTON )
+ || ( eWinType == WindowType::CANCELBUTTON )
+ || ( eWinType == WindowType::HELPBUTTON )
)
{
WinBits nStyle = pWindow->GetStyle();
@@ -1809,24 +1810,20 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const css::uno::Any&
break;
case BASEPROPERTY_ORIENTATION:
{
- switch ( eWinType )
+ if ( eWinType == WindowType::FIXEDLINE)
{
- case WINDOW_FIXEDLINE:
+ sal_Int32 nOrientation = 0;
+ if ( Value >>= nOrientation )
{
- sal_Int32 nOrientation = 0;
- if ( Value >>= nOrientation )
- {
- WinBits nStyle = pWindow->GetStyle();
- nStyle &= ~(WB_HORZ|WB_VERT);
- if ( nOrientation == 0 )
- nStyle |= WB_HORZ;
- else
- nStyle |= WB_VERT;
-
- pWindow->SetStyle( nStyle );
- }
+ WinBits nStyle = pWindow->GetStyle();
+ nStyle &= ~(WB_HORZ|WB_VERT);
+ if ( nOrientation == 0 )
+ nStyle |= WB_HORZ;
+ else
+ nStyle |= WB_VERT;
+
+ pWindow->SetStyle( nStyle );
}
- break;
}
}
break;
@@ -2053,18 +2050,18 @@ css::uno::Any VCLXWindow::getProperty( const OUString& PropertyName )
{
switch ( eWinType )
{
- case WINDOW_FIXEDTEXT:
- case WINDOW_EDIT:
- case WINDOW_MULTILINEEDIT:
- case WINDOW_CHECKBOX:
- case WINDOW_RADIOBUTTON:
- case WINDOW_LISTBOX:
- case WINDOW_COMBOBOX:
- case WINDOW_BUTTON:
- case WINDOW_PUSHBUTTON:
- case WINDOW_OKBUTTON:
- case WINDOW_CANCELBUTTON:
- case WINDOW_HELPBUTTON:
+ case WindowType::FIXEDTEXT:
+ case WindowType::EDIT:
+ case WindowType::MULTILINEEDIT:
+ case WindowType::CHECKBOX:
+ case WindowType::RADIOBUTTON:
+ case WindowType::LISTBOX:
+ case WindowType::COMBOBOX:
+ case WindowType::BUTTON:
+ case WindowType::PUSHBUTTON:
+ case WindowType::OKBUTTON:
+ case WindowType::CANCELBUTTON:
+ case WindowType::HELPBUTTON:
{
WinBits nStyle = GetWindow()->GetStyle();
if ( nStyle & WB_LEFT )
@@ -2075,19 +2072,20 @@ css::uno::Any VCLXWindow::getProperty( const OUString& PropertyName )
aProp <<= (sal_Int16) PROPERTY_ALIGN_RIGHT;
}
break;
+ default: break;
}
}
break;
case BASEPROPERTY_MULTILINE:
{
- if ( ( eWinType == WINDOW_FIXEDTEXT )
- || ( eWinType == WINDOW_CHECKBOX )
- || ( eWinType == WINDOW_RADIOBUTTON )
- || ( eWinType == WINDOW_BUTTON )
- || ( eWinType == WINDOW_PUSHBUTTON )
- || ( eWinType == WINDOW_OKBUTTON )
- || ( eWinType == WINDOW_CANCELBUTTON )
- || ( eWinType == WINDOW_HELPBUTTON )
+ if ( ( eWinType == WindowType::FIXEDTEXT )
+ || ( eWinType == WindowType::CHECKBOX )
+ || ( eWinType == WindowType::RADIOBUTTON )
+ || ( eWinType == WindowType::BUTTON )
+ || ( eWinType == WindowType::PUSHBUTTON )
+ || ( eWinType == WindowType::OKBUTTON )
+ || ( eWinType == WindowType::CANCELBUTTON )
+ || ( eWinType == WindowType::HELPBUTTON )
)
aProp <<= ( GetWindow()->GetStyle() & WB_WORDBREAK ) != 0;
}
@@ -2149,22 +2147,22 @@ css::awt::Size VCLXWindow::getMinimumSize( )
WindowType nWinType = GetWindow()->GetType();
switch ( nWinType )
{
- case WINDOW_CONTROL:
+ case WindowType::CONTROL:
aSz.Width() = GetWindow()->GetTextWidth( GetWindow()->GetText() )+2*12;
aSz.Height() = GetWindow()->GetTextHeight()+2*6;
break;
- case WINDOW_PATTERNBOX:
- case WINDOW_NUMERICBOX:
- case WINDOW_METRICBOX:
- case WINDOW_CURRENCYBOX:
- case WINDOW_DATEBOX:
- case WINDOW_TIMEBOX:
- case WINDOW_LONGCURRENCYBOX:
+ case WindowType::PATTERNBOX:
+ case WindowType::NUMERICBOX:
+ case WindowType::METRICBOX:
+ case WindowType::CURRENCYBOX:
+ case WindowType::DATEBOX:
+ case WindowType::TIMEBOX:
+ case WindowType::LONGCURRENCYBOX:
aSz.Width() = GetWindow()->GetTextWidth( GetWindow()->GetText() )+2*2;
aSz.Height() = GetWindow()->GetTextHeight()+2*2;
break;
- case WINDOW_SCROLLBARBOX:
+ case WindowType::SCROLLBARBOX:
return VCLXScrollBar::implGetMinimumSize( GetWindow() );
default:
aSz = GetWindow()->get_preferred_size();
diff --git a/toolkit/source/awt/vclxwindow1.cxx b/toolkit/source/awt/vclxwindow1.cxx
index e706418db73b..93c99d8150a8 100644
--- a/toolkit/source/awt/vclxwindow1.cxx
+++ b/toolkit/source/awt/vclxwindow1.cxx
@@ -38,7 +38,7 @@ void VCLXWindow::SetSystemParent_Impl( const css::uno::Any& rHandle )
{
// does only work for WorkWindows
VclPtr<vcl::Window> pWindow = GetWindow();
- if ( pWindow->GetType() != WINDOW_WORKWINDOW )
+ if ( pWindow->GetType() != WindowType::WORKWINDOW )
{
css::uno::RuntimeException aException;
aException.Message = "not a work window";
diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx
index e475b8ec655d..af6d16f34089 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -252,9 +252,9 @@ void VCLXGraphicControl::setProperty( const OUString& PropertyName, const css::u
case BASEPROPERTY_IMAGEALIGN:
{
WindowType eType = GetWindow()->GetType();
- if ( ( eType == WINDOW_PUSHBUTTON )
- || ( eType == WINDOW_RADIOBUTTON )
- || ( eType == WINDOW_CHECKBOX )
+ if ( ( eType == WindowType::PUSHBUTTON )
+ || ( eType == WindowType::RADIOBUTTON )
+ || ( eType == WindowType::CHECKBOX )
)
{
sal_Int16 nAlignment = sal_Int16();
@@ -266,9 +266,9 @@ void VCLXGraphicControl::setProperty( const OUString& PropertyName, const css::u
case BASEPROPERTY_IMAGEPOSITION:
{
WindowType eType = GetWindow()->GetType();
- if ( ( eType == WINDOW_PUSHBUTTON )
- || ( eType == WINDOW_RADIOBUTTON )
- || ( eType == WINDOW_CHECKBOX )
+ if ( ( eType == WindowType::PUSHBUTTON )
+ || ( eType == WindowType::RADIOBUTTON )
+ || ( eType == WindowType::CHECKBOX )
)
{
sal_Int16 nImagePosition = 2;
@@ -300,9 +300,9 @@ css::uno::Any VCLXGraphicControl::getProperty( const OUString& PropertyName )
case BASEPROPERTY_IMAGEALIGN:
{
WindowType eType = GetWindow()->GetType();
- if ( ( eType == WINDOW_PUSHBUTTON )
- || ( eType == WINDOW_RADIOBUTTON )
- || ( eType == WINDOW_CHECKBOX )
+ if ( ( eType == WindowType::PUSHBUTTON )
+ || ( eType == WindowType::RADIOBUTTON )
+ || ( eType == WindowType::CHECKBOX )
)
{
aProp <<= ::toolkit::getCompatibleImageAlign(
@@ -313,9 +313,9 @@ css::uno::Any VCLXGraphicControl::getProperty( const OUString& PropertyName )
case BASEPROPERTY_IMAGEPOSITION:
{
WindowType eType = GetWindow()->GetType();
- if ( ( eType == WINDOW_PUSHBUTTON )
- || ( eType == WINDOW_RADIOBUTTON )
- || ( eType == WINDOW_CHECKBOX )
+ if ( ( eType == WindowType::PUSHBUTTON )
+ || ( eType == WindowType::RADIOBUTTON )
+ || ( eType == WindowType::CHECKBOX )
)
{
aProp <<= ::toolkit::translateImagePosition(
@@ -512,7 +512,7 @@ void VCLXButton::setProperty( const OUString& PropertyName, const css::uno::Any&
break;
case BASEPROPERTY_STATE:
{
- if ( GetWindow()->GetType() == WINDOW_PUSHBUTTON )
+ if ( GetWindow()->GetType() == WindowType::PUSHBUTTON )
{
sal_Int16 n = sal_Int16();
if ( Value >>= n )
@@ -554,7 +554,7 @@ css::uno::Any VCLXButton::getProperty( const OUString& PropertyName )
break;
case BASEPROPERTY_STATE:
{
- if ( GetWindow()->GetType() == WINDOW_PUSHBUTTON )
+ if ( GetWindow()->GetType() == WindowType::PUSHBUTTON )
{
aProp <<= (sal_Int16)static_cast<PushButton*>(pButton.get())->GetState();
}
@@ -4754,7 +4754,7 @@ css::uno::Reference< css::accessibility::XAccessibleContext > VCLXDateField::Cre
VclPtr< vcl::Window > pWindow = GetWindow();
if ( pWindow )
{
- pWindow->SetType( WINDOW_DATEFIELD );
+ pWindow->SetType( WindowType::DATEFIELD );
}
return getAccessibleFactory().createAccessibleContext( this );
}
@@ -5101,7 +5101,7 @@ css::uno::Reference< css::accessibility::XAccessibleContext > VCLXTimeField::Cre
VclPtr< vcl::Window > pWindow = GetWindow();
if ( pWindow )
{
- pWindow->SetType( WINDOW_TIMEFIELD );
+ pWindow->SetType( WindowType::TIMEFIELD );
}
return getAccessibleFactory().createAccessibleContext( this );
}
diff --git a/toolkit/source/helper/unowrapper.cxx b/toolkit/source/helper/unowrapper.cxx
index d5a00ada8826..6b5ed794cf46 100644
--- a/toolkit/source/helper/unowrapper.cxx
+++ b/toolkit/source/helper/unowrapper.cxx
@@ -43,76 +43,76 @@ css::uno::Reference< css::awt::XWindowPeer > CreateXWindow( vcl::Window* pWindow
{
switch ( pWindow->GetType() )
{
- case WINDOW_IMAGEBUTTON:
- case WINDOW_SPINBUTTON:
- case WINDOW_MENUBUTTON:
- case WINDOW_MOREBUTTON:
- case WINDOW_PUSHBUTTON:
- case WINDOW_HELPBUTTON:
- case WINDOW_OKBUTTON:
- case WINDOW_CANCELBUTTON: return new VCLXButton;
- case WINDOW_CHECKBOX: return new VCLXCheckBox;
+ case WindowType::IMAGEBUTTON:
+ case WindowType::SPINBUTTON:
+ case WindowType::MENUBUTTON:
+ case WindowType::MOREBUTTON:
+ case WindowType::PUSHBUTTON:
+ case WindowType::HELPBUTTON:
+ case WindowType::OKBUTTON:
+ case WindowType::CANCELBUTTON: return new VCLXButton;
+ case WindowType::CHECKBOX: return new VCLXCheckBox;
// #i95042#
// A Window of type <MetricBox> is inherited from type <ComboBox>.
// Thus, it does make more sense to return a <VCLXComboBox> instance
// instead of only a <VCLXWindow> instance, especially regarding its
// corresponding accessibility API.
- case WINDOW_METRICBOX:
- case WINDOW_COMBOBOX: return new VCLXComboBox;
- case WINDOW_SPINFIELD:
- case WINDOW_NUMERICFIELD:
- case WINDOW_CURRENCYFIELD: return new VCLXNumericField;
- case WINDOW_DATEFIELD: return new VCLXDateField;
- case WINDOW_MULTILINEEDIT:
- case WINDOW_EDIT: return new VCLXEdit;
- case WINDOW_METRICFIELD: return new VCLXSpinField;
- case WINDOW_MESSBOX:
- case WINDOW_INFOBOX:
- case WINDOW_WARNINGBOX:
- case WINDOW_QUERYBOX:
- case WINDOW_ERRORBOX: return new VCLXMessageBox;
- case WINDOW_FIXEDIMAGE: return new VCLXImageControl;
- case WINDOW_FIXEDTEXT: return new VCLXFixedText;
- case WINDOW_MULTILISTBOX:
- case WINDOW_LISTBOX: return new VCLXListBox;
- case WINDOW_LONGCURRENCYFIELD: return new VCLXCurrencyField;
- case WINDOW_DIALOG:
- case WINDOW_MODALDIALOG:
- case WINDOW_TABDIALOG:
- case WINDOW_BUTTONDIALOG:
- case WINDOW_MODELESSDIALOG: return new VCLXDialog;
- case WINDOW_PATTERNFIELD: return new VCLXPatternField;
- case WINDOW_RADIOBUTTON: return new VCLXRadioButton;
- case WINDOW_SCROLLBAR: return new VCLXScrollBar;
- case WINDOW_TIMEFIELD: return new VCLXTimeField;
-
- case WINDOW_SYSWINDOW:
- case WINDOW_WORKWINDOW:
- case WINDOW_DOCKINGWINDOW:
- case WINDOW_FLOATINGWINDOW:
- case WINDOW_HELPTEXTWINDOW: return new VCLXTopWindow;
-
- case WINDOW_WINDOW:
- case WINDOW_TABPAGE: return new VCLXContainer;
-
- case WINDOW_TOOLBOX: return new VCLXToolBox;
- case WINDOW_TABCONTROL: return new VCLXMultiPage;
-
- // case WINDOW_FIXEDLINE:
- // case WINDOW_FIXEDBITMAP:
- // case WINDOW_DATEBOX:
- // case WINDOW_GROUPBOX:
- // case WINDOW_LONGCURRENCYBOX:
- // case WINDOW_SPLITTER:
- // case WINDOW_STATUSBAR:
- // case WINDOW_TABCONTROL:
- // case WINDOW_NUMERICBOX:
- // case WINDOW_TRISTATEBOX:
- // case WINDOW_TIMEBOX:
- // case WINDOW_SPLITWINDOW:
- // case WINDOW_SCROLLBARBOX:
- // case WINDOW_PATTERNBOX:
- // case WINDOW_CURRENCYBOX:
+ case WindowType::METRICBOX:
+ case WindowType::COMBOBOX: return new VCLXComboBox;
+ case WindowType::SPINFIELD:
+ case WindowType::NUMERICFIELD:
+ case WindowType::CURRENCYFIELD: return new VCLXNumericField;
+ case WindowType::DATEFIELD: return new VCLXDateField;
+ case WindowType::MULTILINEEDIT:
+ case WindowType::EDIT: return new VCLXEdit;
+ case WindowType::METRICFIELD: return new VCLXSpinField;
+ case WindowType::MESSBOX:
+ case WindowType::INFOBOX:
+ case WindowType::WARNINGBOX:
+ case WindowType::QUERYBOX:
+ case WindowType::ERRORBOX: return new VCLXMessageBox;
+ case WindowType::FIXEDIMAGE: return new VCLXImageControl;
+ case WindowType::FIXEDTEXT: return new VCLXFixedText;
+ case WindowType::MULTILISTBOX:
+ case WindowType::LISTBOX: return new VCLXListBox;
+ case WindowType::LONGCURRENCYFIELD: return new VCLXCurrencyField;
+ case WindowType::DIALOG:
+ case WindowType::MODALDIALOG:
+ case WindowType::TABDIALOG:
+ case WindowType::BUTTONDIALOG:
+ case WindowType::MODELESSDIALOG: return new VCLXDialog;
+ case WindowType::PATTERNFIELD: return new VCLXPatternField;
+ case WindowType::RADIOBUTTON: return new VCLXRadioButton;
+ case WindowType::SCROLLBAR: return new VCLXScrollBar;
+ case WindowType::TIMEFIELD: return new VCLXTimeField;
+
+ case WindowType::SYSWINDOW:
+ case WindowType::WORKWINDOW:
+ case WindowType::DOCKINGWINDOW:
+ case WindowType::FLOATINGWINDOW:
+ case WindowType::HELPTEXTWINDOW: return new VCLXTopWindow;
+
+ case WindowType::WINDOW:
+ case WindowType::TABPAGE: return new VCLXContainer;
+
+ case WindowType::TOOLBOX: return new VCLXToolBox;
+ case WindowType::TABCONTROL: return new VCLXMultiPage;
+
+ // case WindowType::FIXEDLINE:
+ // case WindowType::FIXEDBITMAP:
+ // case WindowType::DATEBOX:
+ // case WindowType::GROUPBOX:
+ // case WindowType::LONGCURRENCYBOX:
+ // case WindowType::SPLITTER:
+ // case WindowType::STATUSBAR:
+ // case WindowType::TABCONTROL:
+ // case WindowType::NUMERICBOX:
+ // case WindowType::TRISTATEBOX:
+ // case WindowType::TIMEBOX:
+ // case WindowType::SPLITWINDOW:
+ // case WindowType::SCROLLBARBOX:
+ // case WindowType::PATTERNBOX:
+ // case WindowType::CURRENCYBOX:
default: return new VCLXWindow( true );
}
}
diff --git a/vcl/osx/a11yfocustracker.cxx b/vcl/osx/a11yfocustracker.cxx
index 5f2e1c94ad64..ad0f4f28e127 100644
--- a/vcl/osx/a11yfocustracker.cxx
+++ b/vcl/osx/a11yfocustracker.cxx
@@ -132,9 +132,9 @@ void AquaA11yFocusTracker::toolbox_open_floater(vcl::Window *pWindow)
bool bFloatingWindowFound = false;
vcl::Window * pFloatingWindow = nullptr;
while ( pWindow != nullptr ) {
- if ( pWindow->GetType() == WINDOW_TOOLBOX ) {
+ if ( pWindow->GetType() == WindowType::TOOLBOX ) {
bToolboxFound = true;
- } else if ( pWindow->GetType() == WINDOW_FLOATINGWINDOW ) {
+ } else if ( pWindow->GetType() == WindowType::FLOATINGWINDOW ) {
bFloatingWindowFound = true;
pFloatingWindow = pWindow;
}
@@ -210,14 +210,14 @@ void AquaA11yFocusTracker::menu_highlighted(const VclMenuEvent *pEvent)
void AquaA11yFocusTracker::window_got_focus(vcl::Window *pWindow)
{
// The menu bar is handled through VclEventId::MenuHighlightED
- if( ! pWindow || !pWindow->IsReallyVisible() || pWindow->GetType() == WINDOW_MENUBARWINDOW )
+ if( ! pWindow || !pWindow->IsReallyVisible() || pWindow->GetType() == WindowType::MENUBARWINDOW )
return;
// ToolBoxes are handled through VclEventId::ToolboxHighlight
- if( pWindow->GetType() == WINDOW_TOOLBOX )
+ if( pWindow->GetType() == WindowType::TOOLBOX )
return;
- if( pWindow->GetType() == WINDOW_TABCONTROL )
+ if( pWindow->GetType() == WindowType::TABCONTROL )
{
tabpage_activated( pWindow );
return;
@@ -241,7 +241,7 @@ void AquaA11yFocusTracker::window_got_focus(vcl::Window *pWindow)
/* the UNO ToolBox wrapper does not (yet?) support XAccessibleSelection, so we
* need to add listeners to the children instead of re-using the tabpage stuff
*/
- if( xStateSet->contains(AccessibleStateType::FOCUSED) && (pWindow->GetType() != WINDOW_TREELISTBOX) )
+ if( xStateSet->contains(AccessibleStateType::FOCUSED) && (pWindow->GetType() != WindowType::TREELISTBOX) )
{
setFocusedObject( xAccessible );
}
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index 2b185790314a..e6f3c8a4f215 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -254,7 +254,7 @@ HelpTextWindow::HelpTextWindow( vcl::Window* pParent, const OUString& rText, sal
FloatingWindow( pParent, WB_SYSTEMWINDOW|WB_TOOLTIPWIN ), // #105827# if we change the parent, mirroring will not work correctly when positioning this window
maHelpText( rText )
{
- SetType( WINDOW_HELPTEXTWINDOW );
+ SetType( WindowType::HELPTEXTWINDOW );
ImplSetMouseTransparent( true );
mnHelpWinStyle = nHelpWinStyle;
mnStyle = nStyle;
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 7acb1d6f5470..e565639c7763 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -674,10 +674,10 @@ WinBits PushButton::ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyl
if ( !(nStyle & WB_NOGROUP) &&
(!pPrevWindow ||
- ((pPrevWindow->GetType() != WINDOW_PUSHBUTTON ) &&
- (pPrevWindow->GetType() != WINDOW_OKBUTTON ) &&
- (pPrevWindow->GetType() != WINDOW_CANCELBUTTON) &&
- (pPrevWindow->GetType() != WINDOW_HELPBUTTON )) ) )
+ ((pPrevWindow->GetType() != WindowType::PUSHBUTTON ) &&
+ (pPrevWindow->GetType() != WindowType::OKBUTTON ) &&
+ (pPrevWindow->GetType() != WindowType::CANCELBUTTON) &&
+ (pPrevWindow->GetType() != WindowType::HELPBUTTON )) ) )
nStyle |= WB_GROUP;
return nStyle;
}
@@ -955,20 +955,20 @@ void PushButton::ImplDrawPushButton(vcl::RenderContext& rRenderContext)
ControlType aCtrlType = ControlType::Generic;
switch(GetParent()->GetType())
{
- case WINDOW_LISTBOX:
- case WINDOW_MULTILISTBOX:
- case WINDOW_TREELISTBOX:
+ case WindowType::LISTBOX:
+ case WindowType::MULTILISTBOX:
+ case WindowType::TREELISTBOX:
aCtrlType = ControlType::Listbox;
break;
- case WINDOW_COMBOBOX:
- case WINDOW_PATTERNBOX:
- case WINDOW_NUMERICBOX:
- case WINDOW_METRICBOX:
- case WINDOW_CURRENCYBOX:
- case WINDOW_DATEBOX:
- case WINDOW_TIMEBOX:
- case WINDOW_LONGCURRENCYBOX:
+ case WindowType::COMBOBOX:
+ case WindowType::PATTERNBOX:
+ case WindowType::NUMERICBOX:
+ case WindowType::METRICBOX:
+ case WindowType::CURRENCYBOX:
+ case WindowType::DATEBOX:
+ case WindowType::TIMEBOX:
+ case WindowType::LONGCURRENCYBOX:
aCtrlType = ControlType::Combobox;
break;
default:
@@ -1199,7 +1199,7 @@ PushButton::PushButton( WindowType nType ) :
}
PushButton::PushButton( vcl::Window* pParent, WinBits nStyle ) :
- Button( WINDOW_PUSHBUTTON )
+ Button( WindowType::PUSHBUTTON )
{
ImplInitPushButtonData();
ImplInit( pParent, nStyle );
@@ -1496,20 +1496,20 @@ bool PushButton::PreNotify( NotifyEvent& rNEvt )
ControlType aCtrlType = ControlType::Generic;
switch( GetParent()->GetType() )
{
- case WINDOW_LISTBOX:
- case WINDOW_MULTILISTBOX:
- case WINDOW_TREELISTBOX:
+ case WindowType::LISTBOX:
+ case WindowType::MULTILISTBOX:
+ case WindowType::TREELISTBOX:
aCtrlType = ControlType::Listbox;
break;
- case WINDOW_COMBOBOX:
- case WINDOW_PATTERNBOX:
- case WINDOW_NUMERICBOX:
- case WINDOW_METRICBOX:
- case WINDOW_CURRENCYBOX:
- case WINDOW_DATEBOX:
- case WINDOW_TIMEBOX:
- case WINDOW_LONGCURRENCYBOX:
+ case WindowType::COMBOBOX:
+ case WindowType::PATTERNBOX:
+ case WindowType::NUMERICBOX:
+ case WindowType::METRICBOX:
+ case WindowType::CURRENCYBOX:
+ case WindowType::DATEBOX:
+ case WindowType::TIMEBOX:
+ case WindowType::LONGCURRENCYBOX:
aCtrlType = ControlType::Combobox;
break;
default:
@@ -1704,7 +1704,7 @@ void OKButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
}
OKButton::OKButton( vcl::Window* pParent, WinBits nStyle ) :
- PushButton( WINDOW_OKBUTTON )
+ PushButton( WindowType::OKBUTTON )
{
ImplInit( pParent, nStyle );
}
@@ -1750,7 +1750,7 @@ void CancelButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
}
CancelButton::CancelButton( vcl::Window* pParent, WinBits nStyle ) :
- PushButton( WINDOW_CANCELBUTTON )
+ PushButton( WindowType::CANCELBUTTON )
{
ImplInit( pParent, nStyle );
}
@@ -1802,7 +1802,7 @@ void HelpButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
}
HelpButton::HelpButton( vcl::Window* pParent, WinBits nStyle ) :
- PushButton( WINDOW_HELPBUTTON )
+ PushButton( WindowType::HELPBUTTON )
{
ImplInit( pParent, nStyle );
}
@@ -1841,7 +1841,7 @@ void RadioButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
WinBits RadioButton::ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle )
{
if ( !(nStyle & WB_NOGROUP) &&
- (!pPrevWindow || (pPrevWindow->GetType() != WINDOW_RADIOBUTTON)) )
+ (!pPrevWindow || (pPrevWindow->GetType() != WindowType::RADIOBUTTON)) )
nStyle |= WB_GROUP;
if ( !(nStyle & WB_NOTABSTOP) )
{
@@ -2240,7 +2240,7 @@ std::vector< VclPtr<RadioButton> > RadioButton::GetRadioButtonGroup(bool bInclud
// insert radiobuttons up to next group
do
{
- if( pFirst->GetType() == WINDOW_RADIOBUTTON )
+ if( pFirst->GetType() == WindowType::RADIOBUTTON )
{
if( pFirst != this || bIncludeThis )
aGroup.push_back( static_cast<RadioButton*>(pFirst) );
@@ -2299,7 +2299,7 @@ void RadioButton::ImplCallClick( bool bGrabFocus, GetFocusFlags nFocusFlags )
}
RadioButton::RadioButton( vcl::Window* pParent, WinBits nStyle ) :
- Button( WINDOW_RADIOBUTTON ), mbLegacyNoTextAlign( false )
+ Button( WindowType::RADIOBUTTON ), mbLegacyNoTextAlign( false )
{
ImplInitRadioButtonData();
ImplInit( pParent, nStyle );
@@ -2947,7 +2947,7 @@ WinBits CheckBox::ImplInitStyle( const vcl::Window* pPrevWindow, WinBits nStyle
if ( !(nStyle & WB_NOTABSTOP) )
nStyle |= WB_TABSTOP;
if ( !(nStyle & WB_NOGROUP) &&
- (!pPrevWindow || (pPrevWindow->GetType() != WINDOW_CHECKBOX)) )
+ (!pPrevWindow || (pPrevWindow->GetType() != WindowType::CHECKBOX)) )
nStyle |= WB_GROUP;
return nStyle;
}
@@ -3185,7 +3185,7 @@ void CheckBox::ImplCheck()
}
CheckBox::CheckBox( vcl::Window* pParent, WinBits nStyle ) :
- Button( WINDOW_CHECKBOX ), mbLegacyNoTextAlign( false )
+ Button( WindowType::CHECKBOX ), mbLegacyNoTextAlign( false )
{
ImplInitCheckBoxData();
ImplInit( pParent, nStyle );
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 118bad1d8530..84d1edcf9e5c 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -102,7 +102,7 @@ static void lcl_GetSelectedEntries( ::std::set< sal_Int32 >& rSelectedPos, const
}
ComboBox::ComboBox(vcl::Window *const pParent, WinBits const nStyle)
- : Edit( WINDOW_COMBOBOX )
+ : Edit( WindowType::COMBOBOX )
, m_pImpl(new Impl(*this))
{
m_pImpl->ImplInitComboBoxData();
diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx
index 15a9215c756d..ff90996359d8 100644
--- a/vcl/source/control/ctrl.cxx
+++ b/vcl/source/control/ctrl.cxx
@@ -47,7 +47,7 @@ Control::Control( WindowType nType ) :
}
Control::Control( vcl::Window* pParent, WinBits nStyle ) :
- Window( WINDOW_CONTROL )
+ Window( WindowType::CONTROL )
{
ImplInitControlData();
ImplInit( pParent, nStyle, nullptr );
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index a81ec9527ad4..95dc4d916c10 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -156,7 +156,7 @@ Edit::Edit( WindowType nType )
}
Edit::Edit( vcl::Window* pParent, WinBits nStyle )
- : Control( WINDOW_EDIT )
+ : Control( WindowType::EDIT )
{
ImplInitEditData();
ImplInit( pParent, nStyle );
@@ -262,7 +262,7 @@ void Edit::dispose()
mxDnDListener.clear();
}
- SetType(WINDOW_WINDOW);
+ SetType(WindowType::WINDOW);
mpSubEdit.disposeAndClear();
Control::dispose();
@@ -939,33 +939,33 @@ ControlType Edit::ImplGetNativeControlType() const
switch (pControl->GetType())
{
- case WINDOW_COMBOBOX:
- case WINDOW_PATTERNBOX:
- case WINDOW_NUMERICBOX:
- case WINDOW_METRICBOX:
- case WINDOW_CURRENCYBOX:
- case WINDOW_DATEBOX:
- case WINDOW_TIMEBOX:
- case WINDOW_LONGCURRENCYBOX:
+ case WindowType::COMBOBOX:
+ case WindowType::PATTERNBOX:
+ case WindowType::NUMERICBOX:
+ case WindowType::METRICBOX:
+ case WindowType::CURRENCYBOX:
+ case WindowType::DATEBOX:
+ case WindowType::TIMEBOX:
+ case WindowType::LONGCURRENCYBOX:
nCtrl = ControlType::Combobox;
break;
- case WINDOW_MULTILINEEDIT:
+ case WindowType::MULTILINEEDIT:
if ( GetWindow( GetWindowType::Border ) != this )
nCtrl = ControlType::MultilineEditbox;
else
nCtrl = ControlType::EditboxNoBorder;
break;
- case WINDOW_EDIT:
- case WINDOW_PATTERNFIELD:
- case WINDOW_METRICFIELD:
- case WINDOW_CURRENCYFIELD:
- case WINDOW_DATEFIELD:
- case WINDOW_TIMEFIELD:
- case WINDOW_LONGCURRENCYFIELD:
- case WINDOW_NUMERICFIELD:
- case WINDOW_SPINFIELD:
+ case WindowType::EDIT:
+ case WindowType::PATTERNFIELD:
+ case WindowType::METRICFIELD:
+ case WindowType::CURRENCYFIELD:
+ case WindowType::DATEFIELD:
+ case WindowType::TIMEFIELD:
+ case WindowType::LONGCURRENCYFIELD:
+ case WindowType::NUMERICFIELD:
+ case WindowType::SPINFIELD:
if (pControl->GetStyle() & WB_SPIN)
nCtrl = ControlType::Spinbox;
else
@@ -2520,7 +2520,7 @@ void Edit::ImplSetSelection( const Selection& rSelection, bool bPaint )
}
// #103511# notify combobox listeners of deselection
- if( !maSelection && GetParent() && GetParent()->GetType() == WINDOW_COMBOBOX )
+ if( !maSelection && GetParent() && GetParent()->GetType() == WindowType::COMBOBOX )
static_cast<Edit*>(GetParent())->CallEventListeners( VclEventId::ComboboxDeselect );
}
}
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index 46d1299d93a8..da3202945acf 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -105,7 +105,7 @@ const Color& FixedText::GetCanonicalTextColor( const StyleSettings& _rStyle ) co
}
FixedText::FixedText( vcl::Window* pParent, WinBits nStyle )
- : Control(WINDOW_FIXEDTEXT)
+ : Control(WindowType::FIXEDTEXT)
, m_nMaxWidthChars(-1)
, m_nMinWidthChars(-1)
, m_pMnemonicWindow(nullptr)
@@ -567,7 +567,7 @@ void FixedLine::ImplDraw(vcl::RenderContext& rRenderContext)
}
FixedLine::FixedLine( vcl::Window* pParent, WinBits nStyle ) :
- Control( WINDOW_FIXEDLINE )
+ Control( WindowType::FIXEDLINE )
{
ImplInit( pParent, nStyle );
SetSizePixel( Size( 2, 2 ) );
@@ -690,7 +690,7 @@ WinBits FixedBitmap::ImplInitStyle( WinBits nStyle )
}
FixedBitmap::FixedBitmap( vcl::Window* pParent, WinBits nStyle ) :
- Control( WINDOW_FIXEDBITMAP )
+ Control( WindowType::FIXEDBITMAP )
{
ImplInit( pParent, nStyle );
}
@@ -827,7 +827,7 @@ WinBits FixedImage::ImplInitStyle( WinBits nStyle )
}
FixedImage::FixedImage( vcl::Window* pParent, WinBits nStyle ) :
- Control( WINDOW_FIXEDIMAGE )
+ Control( WindowType::FIXEDIMAGE )
{
ImplInit( pParent, nStyle );
}
diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx
index 68cd7030463c..48d3ffdbdfc6 100644
--- a/vcl/source/control/group.cxx
+++ b/vcl/source/control/group.cxx
@@ -87,7 +87,7 @@ void GroupBox::ImplInitSettings( bool bFont,
}
GroupBox::GroupBox( vcl::Window* pParent, WinBits nStyle ) :
- Control( WINDOW_GROUPBOX )
+ Control( WindowType::GROUPBOX )
{
ImplInit( pParent, nStyle );
}
diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx
index 806c26f2c034..c56845b85352 100644
--- a/vcl/source/control/imp_listbox.cxx
+++ b/vcl/source/control/imp_listbox.cxx
@@ -2115,7 +2115,7 @@ ImplListBox::ImplListBox( vcl::Window* pParent, WinBits nWinStyle ) :
maLBWindow(VclPtr<ImplListBoxWindow>::Create( this, nWinStyle&(~WB_BORDER) ))
{
// for native widget rendering we must be able to detect this window type
- SetType( WINDOW_LISTBOXWINDOW );
+ SetType( WindowType::LISTBOXWINDOW );
mpVScrollBar = VclPtr<ScrollBar>::Create( this, WB_VSCROLL | WB_DRAG );
mpHScrollBar = VclPtr<ScrollBar>::Create( this, WB_HSCROLL | WB_DRAG );
diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx
index 225efd5436e5..eedb2cbe4110 100644
--- a/vcl/source/control/listbox.cxx
+++ b/vcl/source/control/listbox.cxx
@@ -50,7 +50,7 @@ ListBox::ListBox(WindowType nType)
ImplInitListBoxData();
}
-ListBox::ListBox( vcl::Window* pParent, WinBits nStyle ) : Control( WINDOW_LISTBOX )
+ListBox::ListBox( vcl::Window* pParent, WinBits nStyle ) : Control( WindowType::LISTBOX )
{
ImplInitListBoxData();
ImplInit( pParent, nStyle );
@@ -1456,7 +1456,7 @@ FactoryFunction ListBox::GetUITestFactory() const
}
MultiListBox::MultiListBox( vcl::Window* pParent, WinBits nStyle ) :
- ListBox( WINDOW_MULTILISTBOX )
+ ListBox( WindowType::MULTILISTBOX )
{
ImplInit( pParent, nStyle );
EnableMultiSelection( true );
diff --git a/vcl/source/control/menubtn.cxx b/vcl/source/control/menubtn.cxx
index a6ae684ed545..cc30eb548cc5 100644
--- a/vcl/source/control/menubtn.cxx
+++ b/vcl/source/control/menubtn.cxx
@@ -73,7 +73,7 @@ OString MenuButton::GetCurItemIdent() const
}
MenuButton::MenuButton( vcl::Window* pParent, WinBits nWinBits )
- : PushButton(WINDOW_MENUBUTTON)
+ : PushButton(WindowType::MENUBUTTON)
, mpMenuTimer(nullptr)
, mnCurItemId(0)
, mbDelayMenu(false)
diff --git a/vcl/source/control/morebtn.cxx b/vcl/source/control/morebtn.cxx
index 90f968321342..9509e152e21f 100644
--- a/vcl/source/control/morebtn.cxx
+++ b/vcl/source/control/morebtn.cxx
@@ -69,7 +69,7 @@ void MoreButton::ShowState()
}
MoreButton::MoreButton( vcl::Window* pParent, WinBits nStyle ) :
- PushButton( WINDOW_MOREBUTTON )
+ PushButton( WindowType::MOREBUTTON )
{
ImplInit( pParent, nStyle );
}
diff --git a/vcl/source/control/notebookbar.cxx b/vcl/source/control/notebookbar.cxx
index 770cf1ee41d1..6f4108d1e9e4 100644
--- a/vcl/source/control/notebookbar.cxx
+++ b/vcl/source/control/notebookbar.cxx
@@ -84,7 +84,7 @@ void NotebookBar::setPosSizePixel(long nX, long nY, long nWidth, long nHeight, P
bool bIsLayoutEnabled = isLayoutEnabled(this);
Window *pChild = GetWindow(GetWindowType::FirstChild);
- if (bIsLayoutEnabled && pChild->GetType() == WINDOW_SCROLLWINDOW)
+ if (bIsLayoutEnabled && pChild->GetType() == WindowType::SCROLLWINDOW)
{
WinBits nStyle = pChild->GetStyle();
if (nStyle & (WB_AUTOHSCROLL | WB_HSCROLL))
diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx
index 1237615b9de1..672cf6aeb30c 100644
--- a/vcl/source/control/scrbar.cxx
+++ b/vcl/source/control/scrbar.cxx
@@ -114,7 +114,7 @@ void ScrollBar::ImplInitStyle( WinBits nStyle )
}
ScrollBar::ScrollBar( vcl::Window* pParent, WinBits nStyle ) :
- Control( WINDOW_SCROLLBAR )
+ Control( WindowType::SCROLLBAR )
{
ImplInit( pParent, nStyle );
}
@@ -1450,7 +1450,7 @@ void ScrollBarBox::ImplInit(vcl::Window* pParent, WinBits nStyle)
}
ScrollBarBox::ScrollBarBox( vcl::Window* pParent, WinBits nStyle ) :
- Window( WINDOW_SCROLLBARBOX )
+ Window( WindowType::SCROLLBARBOX )
{
ImplInit( pParent, nStyle );
}
diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx
index 5a4947caa3d7..5c16e5a96dba 100644
--- a/vcl/source/control/slider.cxx
+++ b/vcl/source/control/slider.cxx
@@ -69,7 +69,7 @@ void Slider::ImplInit( vcl::Window* pParent, WinBits nStyle )
}
Slider::Slider( vcl::Window* pParent, WinBits nStyle ) :
- Control(WINDOW_SLIDER)
+ Control(WindowType::SLIDER)
{
ImplInit( pParent, nStyle );
}
diff --git a/vcl/source/control/spinbtn.cxx b/vcl/source/control/spinbtn.cxx
index 1cea3469f31a..6294549bc917 100644
--- a/vcl/source/control/spinbtn.cxx
+++ b/vcl/source/control/spinbtn.cxx
@@ -50,7 +50,7 @@ void SpinButton::ImplInit( vcl::Window* pParent, WinBits nStyle )
}
SpinButton::SpinButton( vcl::Window* pParent, WinBits nStyle )
- : Control(WINDOW_SPINBUTTON)
+ : Control(WindowType::SPINBUTTON)
, mbUpperIsFocused(false)
{
ImplInit(pParent, nStyle);
diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx
index c561cbbd26aa..c006140571a3 100644
--- a/vcl/source/control/spinfld.cxx
+++ b/vcl/source/control/spinfld.cxx
@@ -167,16 +167,16 @@ void ImplDrawSpinButton(vcl::RenderContext& rRenderContext, vcl::Window* pWindow
ControlType aControl = ControlType::SpinButtons;
switch (pWindow->GetType())
{
- case WINDOW_EDIT:
- case WINDOW_MULTILINEEDIT:
- case WINDOW_PATTERNFIELD:
- case WINDOW_METRICFIELD:
- case WINDOW_CURRENCYFIELD:
- case WINDOW_DATEFIELD:
- case WINDOW_TIMEFIELD:
- case WINDOW_LONGCURRENCYFIELD:
- case WINDOW_NUMERICFIELD:
- case WINDOW_SPINFIELD:
+ case WindowType::EDIT:
+ case WindowType::MULTILINEEDIT:
+ case WindowType::PATTERNFIELD:
+ case WindowType::METRICFIELD:
+ case WindowType::CURRENCYFIELD:
+ case WindowType::DATEFIELD:
+ case WindowType::TIMEFIELD:
+ case WindowType::LONGCURRENCYFIELD:
+ case WindowType::NUMERICFIELD:
+ case WindowType::SPINFIELD:
aControl = ControlType::Spinbox;
break;
default:
@@ -339,7 +339,7 @@ void SpinField::ImplInit(vcl::Window* pParent, WinBits nWinStyle)
}
SpinField::SpinField(vcl::Window* pParent, WinBits nWinStyle) :
- Edit(WINDOW_SPINFIELD)
+ Edit(WindowType::SPINFIELD)
{
ImplInitSpinFieldData();
ImplInit(pParent, nWinStyle);
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index f0369b5b6681..3540ab11dc65 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -175,7 +175,7 @@ void TabControl::ImplFreeLayoutData()
}
TabControl::TabControl( vcl::Window* pParent, WinBits nStyle ) :
- Control( WINDOW_TABCONTROL )
+ Control( WindowType::TABCONTROL )
{
ImplInit( pParent, nStyle );
SAL_INFO( "vcl", "*** TABCONTROL no notabs? " << (( GetStyle() & WB_NOBORDER ) ? "true" : "false") );
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index 40046b4f030c..0a3daac5794f 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -946,7 +946,7 @@ void TextWindow::LoseFocus()
VclMultiLineEdit::VclMultiLineEdit( vcl::Window* pParent, WinBits nWinStyle )
: Edit( pParent, nWinStyle )
{
- SetType( WINDOW_MULTILINEEDIT );
+ SetType( WindowType::MULTILINEEDIT );
pImpVclMEdit = new ImpVclMEdit( this, nWinStyle );
ImplInitSettings( true, true, true );
pUpdateDataTimer = nullptr;
diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index 10c67b0ff071..407289dfd8d2 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -75,14 +75,14 @@ bool isDialogWindow(vcl::Window* pWindow)
{
WindowType nType = pWindow->GetType();
// DIALOG to FONTDIALOG
- if (nType >= 0x13a && nType <= 0x143)
+ if (nType >= WindowType::DIALOG && nType <= WindowType::FONTDIALOG)
return true;
- // MESSBOX, INFOBOX, QUERYBOX, WARNINGBOX, ERRORBOX
- if (nType >= 0x130 && nType <= 0x134)
+ // MESSBOX, INFOBOX, WARNINGBOX, ERRORBOX, QUERYBOX
+ if (nType >= WindowType::MESSBOX && nType <= WindowType::QUERYBOX)
return true;
- if (nType == WINDOW_TABDIALOG)
+ if (nType == WindowType::TABDIALOG)
return true;
return false;
@@ -261,7 +261,7 @@ StringMap WindowUIObject::get_state()
aMap["Visible"] = OUString::boolean(mxWindow->IsVisible());
aMap["ReallyVisible"] = OUString::boolean(mxWindow->IsReallyVisible());
aMap["Enabled"] = OUString::boolean(mxWindow->IsEnabled());
- aMap["WindowType"] = OUString::number(mxWindow->GetType(), 16);
+ aMap["WindowType"] = OUString::number((sal_uInt16)mxWindow->GetType(), 16);
Point aPos = mxWindow->GetPosPixel();
aMap["RelPosition"] = to_string(aPos);
diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx
index 0d0b21b60d8e..2e683209e8c8 100644
--- a/vcl/source/window/accessibility.cxx
+++ b/vcl/source/window/accessibility.cxx
@@ -119,7 +119,7 @@ css::uno::Reference< css::accessibility::XAccessible > Window::GetAccessible( bo
{
// do not optimize hierarchy for the top level border win (ie, when there is no parent)
/* // do not optimize accessible hierarchy at all to better reflect real VCL hierarchy
- if ( GetParent() && ( GetType() == WINDOW_BORDERWINDOW ) && ( GetChildCount() == 1 ) )
+ if ( GetParent() && ( GetType() == WindowType::BORDERWINDOW ) && ( GetChildCount() == 1 ) )
//if( !ImplIsAccessibleCandidate() )
{
vcl::Window* pChild = GetAccessibleChildWindow( 0 );
@@ -178,7 +178,7 @@ vcl::Window* Window::GetAccessibleParentWindow() const
return nullptr;
vcl::Window* pParent = mpWindowImpl->mpParent;
- if( GetType() == WINDOW_MENUBARWINDOW )
+ if( GetType() == WindowType::MENUBARWINDOW )
{
// report the menubar as a child of THE workwindow
vcl::Window *pWorkWin = GetParent()->mpWindowImpl->mpFirstChild;
@@ -192,7 +192,7 @@ vcl::Window* Window::GetAccessibleParentWindow() const
// The logic here has to match that of AccessibleFactory::createAccessibleContext in
// accessibility/source/helper/acc_factory.cxx to avoid PopupMenuFloatingWindow
// becoming a11y parents of themselves
- else if( GetType() == WINDOW_FLOATINGWINDOW &&
+ else if( GetType() == WindowType::FLOATINGWINDOW &&
mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame &&
!PopupMenuFloatingWindow::isPopupMenu(this))
{
@@ -217,7 +217,7 @@ sal_uInt16 Window::GetAccessibleChildWindowCount()
}
// report the menubarwindow as a child of THE workwindow
- if( GetType() == WINDOW_BORDERWINDOW )
+ if( GetType() == WindowType::BORDERWINDOW )
{
ImplBorderWindow *pBorderWindow = static_cast<ImplBorderWindow*>(this);
if( pBorderWindow->mpMenuBarWindow &&
@@ -225,7 +225,7 @@ sal_uInt16 Window::GetAccessibleChildWindowCount()
)
--nChildren;
}
- else if( GetType() == WINDOW_WORKWINDOW )
+ else if( GetType() == WindowType::WORKWINDOW )
{
WorkWindow *pWorkWindow = static_cast<WorkWindow*>(this);
if( pWorkWindow->GetMenuBar() &&
@@ -241,7 +241,7 @@ sal_uInt16 Window::GetAccessibleChildWindowCount()
vcl::Window* Window::GetAccessibleChildWindow( sal_uInt16 n )
{
// report the menubarwindow as a the first child of THE workwindow
- if( GetType() == WINDOW_WORKWINDOW && static_cast<WorkWindow *>(this)->GetMenuBar() )
+ if( GetType() == WindowType::WORKWINDOW && static_cast<WorkWindow *>(this)->GetMenuBar() )
{
if( n == 0 )
{
@@ -267,13 +267,13 @@ vcl::Window* Window::GetAccessibleChildWindow( sal_uInt16 n )
pChild = pChild->mpWindowImpl->mpNext;
}
- if( GetType() == WINDOW_BORDERWINDOW && pChild && pChild->GetType() == WINDOW_MENUBARWINDOW )
+ if( GetType() == WindowType::BORDERWINDOW && pChild && pChild->GetType() == WindowType::MENUBARWINDOW )
{
do pChild = pChild->mpWindowImpl->mpNext; while( pChild && ! pChild->IsVisible() );
SAL_WARN_IF( !pChild, "vcl", "GetAccessibleChildWindow(): wrong index in border window");
}
- if ( pChild && ( pChild->GetType() == WINDOW_BORDERWINDOW ) && ( pChild->GetChildCount() == 1 ) )
+ if ( pChild && ( pChild->GetType() == WindowType::BORDERWINDOW ) && ( pChild->GetChildCount() == 1 ) )
{
pChild = pChild->GetChild( 0 );
}
@@ -294,115 +294,115 @@ sal_uInt16 Window::getDefaultAccessibleRole() const
sal_uInt16 nRole = 0xFFFF;
switch ( GetType() )
{
- case WINDOW_MESSBOX: // MT: Would be nice to have special roles!
- case WINDOW_INFOBOX:
- case WINDOW_WARNINGBOX:
- case WINDOW_ERRORBOX:
- case WINDOW_QUERYBOX: nRole = accessibility::AccessibleRole::ALERT; break;
-
- case WINDOW_MODELESSDIALOG:
- case WINDOW_MODALDIALOG:
- case WINDOW_SYSTEMDIALOG:
- case WINDOW_PRINTERSETUPDIALOG:
- case WINDOW_PRINTDIALOG:
- case WINDOW_TABDIALOG:
- case WINDOW_BUTTONDIALOG:
- case WINDOW_DIALOG: nRole = accessibility::AccessibleRole::DIALOG; break;
-
- case WINDOW_PUSHBUTTON:
- case WINDOW_OKBUTTON:
- case WINDOW_CANCELBUTTON:
- case WINDOW_HELPBUTTON:
- case WINDOW_IMAGEBUTTON:
- case WINDOW_MOREBUTTON:
- case WINDOW_SPINBUTTON:
- case WINDOW_BUTTON: nRole = accessibility::AccessibleRole::PUSH_BUTTON; break;
- case WINDOW_MENUBUTTON: nRole = accessibility::AccessibleRole::BUTTON_MENU; break;
-
- case WINDOW_PATHDIALOG: nRole = accessibility::AccessibleRole::DIRECTORY_PANE; break;
- case WINDOW_FILEDIALOG: nRole = accessibility::AccessibleRole::FILE_CHOOSER; break;
- case WINDOW_COLORDIALOG: nRole = accessibility::AccessibleRole::COLOR_CHOOSER; break;
- case WINDOW_FONTDIALOG: nRole = accessibility::AccessibleRole::FONT_CHOOSER; break;
-
- case WINDOW_RADIOBUTTON: nRole = accessibility::AccessibleRole::RADIO_BUTTON; break;
- case WINDOW_TRISTATEBOX:
- case WINDOW_CHECKBOX: nRole = accessibility::AccessibleRole::CHECK_BOX; break;
-
- case WINDOW_MULTILINEEDIT: nRole = accessibility::AccessibleRole::SCROLL_PANE; break;
-
- case WINDOW_PATTERNFIELD:
- case WINDOW_CALCINPUTLINE:
- case WINDOW_EDIT: nRole = ( GetStyle() & WB_PASSWORD ) ? (accessibility::AccessibleRole::PASSWORD_TEXT) : (accessibility::AccessibleRole::TEXT); break;
-
- case WINDOW_PATTERNBOX:
- case WINDOW_NUMERICBOX:
- case WINDOW_METRICBOX:
- case WINDOW_CURRENCYBOX:
- case WINDOW_LONGCURRENCYBOX:
- case WINDOW_COMBOBOX: nRole = accessibility::AccessibleRole::COMBO_BOX; break;
-
- case WINDOW_LISTBOX:
- case WINDOW_MULTILISTBOX: nRole = accessibility::AccessibleRole::LIST; break;
-
- case WINDOW_TREELISTBOX: nRole = accessibility::AccessibleRole::TREE; break;
-
- case WINDOW_FIXEDTEXT: nRole = accessibility::AccessibleRole::LABEL; break;
- case WINDOW_FIXEDLINE:
+ case WindowType::MESSBOX: // MT: Would be nice to have special roles!
+ case WindowType::INFOBOX:
+ case WindowType::WARNINGBOX:
+ case WindowType::ERRORBOX:
+ case WindowType::QUERYBOX: nRole = accessibility::AccessibleRole::ALERT; break;
+
+ case WindowType::MODELESSDIALOG:
+ case WindowType::MODALDIALOG:
+ case WindowType::SYSTEMDIALOG:
+ case WindowType::PRINTERSETUPDIALOG:
+ case WindowType::PRINTDIALOG:
+ case WindowType::TABDIALOG:
+ case WindowType::BUTTONDIALOG:
+ case WindowType::DIALOG: nRole = accessibility::AccessibleRole::DIALOG; break;
+
+ case WindowType::PUSHBUTTON:
+ case WindowType::OKBUTTON:
+ case WindowType::CANCELBUTTON:
+ case WindowType::HELPBUTTON:
+ case WindowType::IMAGEBUTTON:
+ case WindowType::MOREBUTTON:
+ case WindowType::SPINBUTTON:
+ case WindowType::BUTTON: nRole = accessibility::AccessibleRole::PUSH_BUTTON; 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::TRISTATEBOX:
+ case WindowType::CHECKBOX: nRole = accessibility::AccessibleRole::CHECK_BOX; break;
+
+ case WindowType::MULTILINEEDIT: nRole = accessibility::AccessibleRole::SCROLL_PANE; break;
+
+ case WindowType::PATTERNFIELD:
+ case WindowType::CALCINPUTLINE:
+ case WindowType::EDIT: nRole = ( GetStyle() & WB_PASSWORD ) ? (accessibility::AccessibleRole::PASSWORD_TEXT) : (accessibility::AccessibleRole::TEXT); break;
+
+ case WindowType::PATTERNBOX:
+ case WindowType::NUMERICBOX:
+ case WindowType::METRICBOX:
+ case WindowType::CURRENCYBOX:
+ case WindowType::LONGCURRENCYBOX:
+ case WindowType::COMBOBOX: nRole = accessibility::AccessibleRole::COMBO_BOX; break;
+
+ case WindowType::LISTBOX:
+ case WindowType::MULTILISTBOX: nRole = accessibility::AccessibleRole::LIST; break;
+
+ case WindowType::TREELISTBOX: nRole = accessibility::AccessibleRole::TREE; break;
+
+ case WindowType::FIXEDTEXT: nRole = accessibility::AccessibleRole::LABEL; break;
+ case WindowType::FIXEDLINE:
if( !GetText().isEmpty() )
nRole = accessibility::AccessibleRole::LABEL;
else
nRole = accessibility::AccessibleRole::SEPARATOR;
break;
- case WINDOW_FIXEDBITMAP:
- case WINDOW_FIXEDIMAGE: nRole = accessibility::AccessibleRole::ICON; break;
- case WINDOW_GROUPBOX: nRole = accessibility::AccessibleRole::GROUP_BOX; break;
- case WINDOW_SCROLLBAR: nRole = accessibility::AccessibleRole::SCROLL_BAR; break;
+ case WindowType::FIXEDBITMAP:
+ case WindowType::FIXEDIMAGE: nRole = accessibility::AccessibleRole::ICON; break;
+ case WindowType::GROUPBOX: nRole = accessibility::AccessibleRole::GROUP_BOX; break;
+ case WindowType::SCROLLBAR: nRole = accessibility::AccessibleRole::SCROLL_BAR; break;
- case WINDOW_SLIDER:
- case WINDOW_SPLITTER:
- case WINDOW_SPLITWINDOW: nRole = accessibility::AccessibleRole::SPLIT_PANE; break;
+ case WindowType::SLIDER:
+ case WindowType::SPLITTER:
+ case WindowType::SPLITWINDOW: nRole = accessibility::AccessibleRole::SPLIT_PANE; break;
- case WINDOW_DATEBOX:
- case WINDOW_TIMEBOX:
- case WINDOW_DATEFIELD:
- case WINDOW_TIMEFIELD: nRole = accessibility::AccessibleRole::DATE_EDITOR; break;
+ case WindowType::DATEBOX:
+ case WindowType::TIMEBOX:
+ case WindowType::DATEFIELD:
+ case WindowType::TIMEFIELD: nRole = accessibility::AccessibleRole::DATE_EDITOR; break;
- case WINDOW_NUMERICFIELD:
- case WINDOW_METRICFIELD:
- case WINDOW_CURRENCYFIELD:
- case WINDOW_LONGCURRENCYFIELD:
- case WINDOW_SPINFIELD: nRole = accessibility::AccessibleRole::SPIN_BOX; break;
+ case WindowType::NUMERICFIELD:
+ case WindowType::METRICFIELD:
+ case WindowType::CURRENCYFIELD:
+ case WindowType::LONGCURRENCYFIELD:
+ case WindowType::SPINFIELD: nRole = accessibility::AccessibleRole::SPIN_BOX; break;
- case WINDOW_TOOLBOX: nRole = accessibility::AccessibleRole::TOOL_BAR; break;
- case WINDOW_STATUSBAR: nRole = accessibility::AccessibleRole::STATUS_BAR; break;
+ case WindowType::TOOLBOX: nRole = accessibility::AccessibleRole::TOOL_BAR; break;
+ case WindowType::STATUSBAR: nRole = accessibility::AccessibleRole::STATUS_BAR; break;
- case WINDOW_TABPAGE: nRole = accessibility::AccessibleRole::PANEL; break;
- case WINDOW_TABCONTROL: nRole = accessibility::AccessibleRole::PAGE_TAB_LIST; break;
+ case WindowType::TABPAGE: nRole = accessibility::AccessibleRole::PANEL; break;
+ case WindowType::TABCONTROL: nRole = accessibility::AccessibleRole::PAGE_TAB_LIST; break;
- case WINDOW_DOCKINGWINDOW:
- case WINDOW_SYSWINDOW: nRole = (mpWindowImpl->mbFrame) ? accessibility::AccessibleRole::FRAME :
+ case WindowType::DOCKINGWINDOW:
+ case WindowType::SYSWINDOW: nRole = (mpWindowImpl->mbFrame) ? accessibility::AccessibleRole::FRAME :
accessibility::AccessibleRole::PANEL; break;
- case WINDOW_FLOATINGWINDOW: nRole = ( mpWindowImpl->mbFrame ||
+ case WindowType::FLOATINGWINDOW: nRole = ( mpWindowImpl->mbFrame ||
(mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) ||
(GetStyle() & WB_OWNERDRAWDECORATION) ) ? accessibility::AccessibleRole::FRAME :
accessibility::AccessibleRole::WINDOW; break;
- case WINDOW_WORKWINDOW: nRole = accessibility::AccessibleRole::ROOT_PANE; break;
+ case WindowType::WORKWINDOW: nRole = accessibility::AccessibleRole::ROOT_PANE; break;
- case WINDOW_SCROLLBARBOX: nRole = accessibility::AccessibleRole::FILLER; break;
+ case WindowType::SCROLLBARBOX: nRole = accessibility::AccessibleRole::FILLER; break;
- case WINDOW_HELPTEXTWINDOW: nRole = accessibility::AccessibleRole::TOOL_TIP; break;
+ case WindowType::HELPTEXTWINDOW: nRole = accessibility::AccessibleRole::TOOL_TIP; break;
- case WINDOW_RULER: nRole = accessibility::AccessibleRole::RULER; break;
+ case WindowType::RULER: nRole = accessibility::AccessibleRole::RULER; break;
- case WINDOW_SCROLLWINDOW: nRole = accessibility::AccessibleRole::SCROLL_PANE; break;
+ case WindowType::SCROLLWINDOW: nRole = accessibility::AccessibleRole::SCROLL_PANE; break;
- case WINDOW_WINDOW:
- case WINDOW_CONTROL:
- case WINDOW_BORDERWINDOW:
- case WINDOW_SYSTEMCHILDWINDOW:
+ case WindowType::WINDOW:
+ case WindowType::CONTROL:
+ case WindowType::BORDERWINDOW:
+ case WindowType::SYSTEMCHILDWINDOW:
default:
if (ImplIsAccessibleNativeFrame() )
nRole = accessibility::AccessibleRole::FRAME;
@@ -454,28 +454,28 @@ OUString Window::getDefaultAccessibleName() const
OUString aAccessibleName;
switch ( GetType() )
{
- case WINDOW_MULTILINEEDIT:
- case WINDOW_PATTERNFIELD:
- case WINDOW_NUMERICFIELD:
- case WINDOW_METRICFIELD:
- case WINDOW_CURRENCYFIELD:
- case WINDOW_LONGCURRENCYFIELD:
- case WINDOW_CALCINPUTLINE:
- case WINDOW_EDIT:
-
- case WINDOW_DATEBOX:
- case WINDOW_TIMEBOX:
- case WINDOW_CURRENCYBOX:
- case WINDOW_LONGCURRENCYBOX:
- case WINDOW_DATEFIELD:
- case WINDOW_TIMEFIELD:
- case WINDOW_SPINFIELD:
-
- case WINDOW_COMBOBOX:
- case WINDOW_LISTBOX:
- case WINDOW_MULTILISTBOX:
- case WINDOW_TREELISTBOX:
- case WINDOW_METRICBOX:
+ case WindowType::MULTILINEEDIT:
+ case WindowType::PATTERNFIELD:
+ case WindowType::NUMERICFIELD:
+ case WindowType::METRICFIELD:
+ case WindowType::CURRENCYFIELD:
+ case WindowType::LONGCURRENCYFIELD:
+ case WindowType::CALCINPUTLINE:
+ case WindowType::EDIT:
+
+ case WindowType::DATEBOX:
+ case WindowType::TIMEBOX:
+ case WindowType::CURRENCYBOX:
+ case WindowType::LONGCURRENCYBOX:
+ case WindowType::DATEFIELD:
+ case WindowType::TIMEFIELD:
+ case WindowType::SPINFIELD:
+
+ case WindowType::COMBOBOX:
+ case WindowType::LISTBOX:
+ case WindowType::MULTILISTBOX:
+ case WindowType::TREELISTBOX:
+ case WindowType::METRICBOX:
{
vcl::Window *pLabel = GetAccessibleRelationLabeledBy();
if ( pLabel && pLabel != this )
@@ -485,8 +485,8 @@ OUString Window::getDefaultAccessibleName() const
}
break;
- case WINDOW_IMAGEBUTTON:
- case WINDOW_PUSHBUTTON:
+ case WindowType::IMAGEBUTTON:
+ case WindowType::PUSHBUTTON:
aAccessibleName = GetText();
if (aAccessibleName.isEmpty())
{
@@ -496,11 +496,11 @@ OUString Window::getDefaultAccessibleName() const
}
break;
- case WINDOW_TOOLBOX:
+ case WindowType::TOOLBOX:
aAccessibleName = GetText();
break;
- case WINDOW_MOREBUTTON:
+ case WindowType::MOREBUTTON:
aAccessibleName = mpWindowImpl->maText;
break;
@@ -534,7 +534,7 @@ OUString Window::GetAccessibleDescription() const
// Special code for help text windows. ZT asks the border window for the
// description so we have to forward this request to our inner window.
const vcl::Window* pWin = const_cast<vcl::Window *>(this)->ImplGetWindow();
- if ( pWin->GetType() == WINDOW_HELPTEXTWINDOW )
+ if ( pWin->GetType() == WindowType::HELPTEXTWINDOW )
aAccessibleDescription = pWin->GetHelpText();
else
aAccessibleDescription = GetHelpText();
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index a3c90647b34e..6a174b89521f 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -445,34 +445,34 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei
{
switch( pCtrl->GetType() )
{
- case WINDOW_LISTBOX:
+ case WindowType::LISTBOX:
if( pCtrl->GetStyle() & WB_DROPDOWN )
{
aCtrlType = ControlType::Listbox;
mbNWFBorder = true;
}
break;
- case WINDOW_COMBOBOX:
+ case WindowType::COMBOBOX:
if( pCtrl->GetStyle() & WB_DROPDOWN )
{
aCtrlType = ControlType::Combobox;
mbNWFBorder = true;
}
break;
- case WINDOW_MULTILINEEDIT:
+ case WindowType::MULTILINEEDIT:
aCtrlType = ControlType::MultilineEditbox;
mbNWFBorder = true;
break;
- case WINDOW_EDIT:
- case WINDOW_PATTERNFIELD:
- case WINDOW_METRICFIELD:
- case WINDOW_CURRENCYFIELD:
- case WINDOW_DATEFIELD:
- case WINDOW_TIMEFIELD:
- case WINDOW_LONGCURRENCYFIELD:
- case WINDOW_NUMERICFIELD:
- case WINDOW_SPINFIELD:
- case WINDOW_CALCINPUTLINE:
+ case WindowType::EDIT:
+ case WindowType::PATTERNFIELD:
+ case WindowType::METRICFIELD:
+ case WindowType::CURRENCYFIELD:
+ case WindowType::DATEFIELD:
+ case WindowType::TIMEFIELD:
+ case WindowType::LONGCURRENCYFIELD:
+ case WindowType::NUMERICFIELD:
+ case WindowType::SPINFIELD:
+ case WindowType::CALCINPUTLINE:
mbNWFBorder = true;
if (pCtrl->GetStyle() & WB_SPIN)
aCtrlType = ControlType::Spinbox;
@@ -601,28 +601,28 @@ void ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, c
{
switch (pCtrl->GetType())
{
- case WINDOW_MULTILINEEDIT:
+ case WindowType::MULTILINEEDIT:
aCtrlType = ControlType::MultilineEditbox;
break;
- case WINDOW_EDIT:
- case WINDOW_PATTERNFIELD:
- case WINDOW_METRICFIELD:
- case WINDOW_CURRENCYFIELD:
- case WINDOW_DATEFIELD:
- case WINDOW_TIMEFIELD:
- case WINDOW_LONGCURRENCYFIELD:
- case WINDOW_NUMERICFIELD:
- case WINDOW_SPINFIELD:
- case WINDOW_CALCINPUTLINE:
+ case WindowType::EDIT:
+ case WindowType::PATTERNFIELD:
+ case WindowType::METRICFIELD:
+ case WindowType::CURRENCYFIELD:
+ case WindowType::DATEFIELD:
+ case WindowType::TIMEFIELD:
+ case WindowType::LONGCURRENCYFIELD:
+ case WindowType::NUMERICFIELD:
+ case WindowType::SPINFIELD:
+ case WindowType::CALCINPUTLINE:
if (pCtrl->GetStyle() & WB_SPIN)
aCtrlType = ControlType::Spinbox;
else
aCtrlType = ControlType::Editbox;
break;
- case WINDOW_LISTBOX:
- case WINDOW_MULTILISTBOX:
- case WINDOW_TREELISTBOX:
+ case WindowType::LISTBOX:
+ case WindowType::MULTILISTBOX:
+ case WindowType::TREELISTBOX:
aCtrlType = ControlType::Listbox;
if (pCtrl->GetStyle() & WB_DROPDOWN)
aCtrlPart = ControlPart::Entire;
@@ -630,19 +630,19 @@ void ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, c
aCtrlPart = ControlPart::ListboxWindow;
break;
- case WINDOW_LISTBOXWINDOW:
+ case WindowType::LISTBOXWINDOW:
aCtrlType = ControlType::Listbox;
aCtrlPart = ControlPart::ListboxWindow;
break;
- case WINDOW_COMBOBOX:
- case WINDOW_PATTERNBOX:
- case WINDOW_NUMERICBOX:
- case WINDOW_METRICBOX:
- case WINDOW_CURRENCYBOX:
- case WINDOW_DATEBOX:
- case WINDOW_TIMEBOX:
- case WINDOW_LONGCURRENCYBOX:
+ case WindowType::COMBOBOX:
+ case WindowType::PATTERNBOX:
+ case WindowType::NUMERICBOX:
+ case WindowType::METRICBOX:
+ case WindowType::CURRENCYBOX:
+ case WindowType::DATEBOX:
+ case WindowType::TIMEBOX:
+ case WindowType::LONGCURRENCYBOX:
if (pCtrl->GetStyle() & WB_DROPDOWN)
{
aCtrlType = ControlType::Combobox;
@@ -1648,14 +1648,14 @@ void ImplBorderWindow::ImplInit( vcl::Window* pParent,
ImplBorderWindow::ImplBorderWindow( vcl::Window* pParent,
SystemParentData* pSystemParentData,
WinBits nStyle, BorderWindowStyle nTypeStyle
- ) : Window( WINDOW_BORDERWINDOW )
+ ) : Window( WindowType::BORDERWINDOW )
{
ImplInit( pParent, nStyle, nTypeStyle, pSystemParentData );
}
ImplBorderWindow::ImplBorderWindow( vcl::Window* pParent, WinBits nStyle ,
BorderWindowStyle nTypeStyle ) :
- Window( WINDOW_BORDERWINDOW )
+ Window( WindowType::BORDERWINDOW )
{
ImplInit( pParent, nStyle, nTypeStyle, nullptr );
}
diff --git a/vcl/source/window/btndlg.cxx b/vcl/source/window/btndlg.cxx
index aafb1c828e1e..5ff1f358baa1 100644
--- a/vcl/source/window/btndlg.cxx
+++ b/vcl/source/window/btndlg.cxx
@@ -50,7 +50,7 @@ ButtonDialog::ButtonDialog( WindowType nType ) :
}
ButtonDialog::ButtonDialog( vcl::Window* pParent, WinBits nStyle ) :
- Dialog( WINDOW_BUTTONDIALOG )
+ Dialog( WindowType::BUTTONDIALOG )
{
ImplInitButtonDialogData();
ImplInit( pParent, nStyle );
@@ -300,9 +300,9 @@ void ButtonDialog::AddButton( StandardButtonType eType, sal_uInt16 nId,
pItem->mpPushButton = ImplCreatePushButton( nBtnFlags );
// Standard-Buttons have the right text already
- if ( !((eType == StandardButtonType::OK && pItem->mpPushButton->GetType() == WINDOW_OKBUTTON) ||
- (eType == StandardButtonType::Cancel && pItem->mpPushButton->GetType() == WINDOW_CANCELBUTTON) ||
- (eType == StandardButtonType::Help && pItem->mpPushButton->GetType() == WINDOW_HELPBUTTON)) )
+ if ( !((eType == StandardButtonType::OK && pItem->mpPushButton->GetType() == WindowType::OKBUTTON) ||
+ (eType == StandardButtonType::Cancel && pItem->mpPushButton->GetType() == WindowType::CANCELBUTTON) ||
+ (eType == StandardButtonType::Help && pItem->mpPushButton->GetType() == WindowType::HELPBUTTON)) )
{
pItem->mpPushButton->SetText( Button::GetStandardText( eType ) );
}
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index c627cf1a9726..ac2d86947345 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -161,14 +161,14 @@ namespace
{
bool isButtonType(WindowType nType)
{
- return nType == WINDOW_PUSHBUTTON ||
- nType == WINDOW_OKBUTTON ||
- nType == WINDOW_CANCELBUTTON ||
- nType == WINDOW_HELPBUTTON ||
- nType == WINDOW_IMAGEBUTTON ||
- nType == WINDOW_MENUBUTTON ||
- nType == WINDOW_MOREBUTTON ||
- nType == WINDOW_SPINBUTTON;
+ return nType == WindowType::PUSHBUTTON ||
+ nType == WindowType::OKBUTTON ||
+ nType == WindowType::CANCELBUTTON ||
+ nType == WindowType::HELPBUTTON ||
+ nType == WindowType::IMAGEBUTTON ||
+ nType == WindowType::MENUBUTTON ||
+ nType == WindowType::MOREBUTTON ||
+ nType == WindowType::SPINBUTTON;
}
}
#endif
@@ -476,7 +476,7 @@ VclBuilder::VclBuilder(vcl::Window *pParent, const OUString& sUIDir, const OUStr
{
vcl::Window *pChild = pOne->get_child();
vcl::Window* pLabel = pOne->GetWindow(GetWindowType::LastChild);
- if (pLabel && pLabel != pChild && pLabel->GetType() == WINDOW_FIXEDTEXT)
+ if (pLabel && pLabel != pChild && pLabel->GetType() == WindowType::FIXEDTEXT)
{
FixedText *pLabelWidget = static_cast<FixedText*>(pLabel);
pOne->set_label(pLabelWidget->GetText());
@@ -1248,7 +1248,7 @@ vcl::Window* VclBuilder::prepareWidgetOwnScrolling(vcl::Window *pParent, WinBits
//For Widgets that manage their own scrolling, if one appears as a child of
//a scrolling window shoehorn that scrolling settings to this widget and
//return the real parent to use
- if (pParent && pParent->GetType() == WINDOW_SCROLLWINDOW)
+ if (pParent && pParent->GetType() == WindowType::SCROLLWINDOW)
{
WinBits nScrollBits = pParent->GetStyle();
nScrollBits &= (WB_AUTOHSCROLL|WB_HSCROLL|WB_AUTOVSCROLL|WB_VSCROLL);
@@ -1280,7 +1280,7 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString &
bool bIsPlaceHolder = name.isEmpty();
bool bVertical = false;
- if (pParent && pParent->GetType() == WINDOW_TABCONTROL)
+ if (pParent && pParent->GetType() == WindowType::TABCONTROL)
{
//We have to add a page
@@ -1788,9 +1788,9 @@ VclPtr<vcl::Window> VclBuilder::makeObject(vcl::Window *pParent, const OString &
{
VclPtr<vcl::Window> xParent(pParent);
pFunction(xWindow, xParent, rMap);
- if (xWindow->GetType() == WINDOW_PUSHBUTTON)
+ if (xWindow->GetType() == WindowType::PUSHBUTTON)
setupFromActionName(static_cast<Button*>(xWindow.get()), rMap, m_xFrame);
- else if (xWindow->GetType() == WINDOW_MENUBUTTON)
+ else if (xWindow->GetType() == WindowType::MENUBUTTON)
{
OString sMenu = extractCustomProperty(rMap);
if (!sMenu.isEmpty())
@@ -1821,7 +1821,7 @@ namespace
//represented in the .ui format, i.e. only their children exist.
bool isConsideredGtkPseudo(vcl::Window *pWindow)
{
- return pWindow->GetType() == WINDOW_TABPAGE;
+ return pWindow->GetType() == WindowType::TABPAGE;
}
}
@@ -2127,7 +2127,7 @@ void VclBuilder::handleChild(vcl::Window *pParent, xmlreader::XmlReader &reader)
pCurrentChild->Show();
//Select the first page if it's a notebook
- if (pCurrentChild->GetType() == WINDOW_TABCONTROL)
+ if (pCurrentChild->GetType() == WindowType::TABCONTROL)
{
TabControl *pTabControl = static_cast<TabControl*>(pCurrentChild);
pTabControl->SetCurPageId(pTabControl->GetPageId(0));
@@ -2994,7 +2994,7 @@ void VclBuilder::applyPackingProperty(vcl::Window *pCurrent,
xmlreader::Span name;
int nsId;
- if (pCurrent->GetType() == WINDOW_SCROLLWINDOW)
+ if (pCurrent->GetType() == WindowType::SCROLLWINDOW)
{
auto aFind = m_pParserState->m_aRedundantParentWidgets.find(VclPtr<vcl::Window>(pCurrent));
if (aFind != m_pParserState->m_aRedundantParentWidgets.end())
diff --git a/vcl/source/window/debug.cxx b/vcl/source/window/debug.cxx
index baa370027022..960fe82400de 100644
--- a/vcl/source/window/debug.cxx
+++ b/vcl/source/window/debug.cxx
@@ -29,7 +29,7 @@ const char* ImplDbgCheckWindow( const void* pObj )
const vcl::Window* pWindow = static_cast<vcl::Window const *>(pObj);
- if ( (pWindow->GetType() < WINDOW_FIRST) || (pWindow->GetType() > WINDOW_LAST) )
+ if ( (pWindow->GetType() < WindowType::FIRST) || (pWindow->GetType() > WindowType::LAST) )
return "Window data overwrite";
// check window-chain
diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx
index e40d3b56cbae..46b8d78adbb6 100644
--- a/vcl/source/window/decoview.cxx
+++ b/vcl/source/window/decoview.cxx
@@ -635,7 +635,7 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
// no flat borders for standard VCL controls (ie formcontrols that keep their classic look)
// will not affect frame windows (like dropdowns)
- if( bFlatBorders && pWin && pWin->GetType() == WINDOW_BORDERWINDOW && (pWin != pWin->ImplGetFrameWindow()) )
+ if( bFlatBorders && pWin && pWin->GetType() == WindowType::BORDERWINDOW && (pWin != pWin->ImplGetFrameWindow()) )
{
// check for formcontrol, i.e., a control without NWF enabled
Control *const pControl = dynamic_cast< Control* >( pWin->GetWindow( GetWindowType::Client ) );
@@ -655,7 +655,7 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect,
{
long nControlFlags = static_cast<long>(nStyle);
nControlFlags |= static_cast<long>(nFlags);
- nControlFlags |= static_cast<long>(pWin->GetType()==WINDOW_BORDERWINDOW ?
+ nControlFlags |= static_cast<long>(pWin->GetType() == WindowType::BORDERWINDOW ?
DrawFrameFlags::BorderWindowBorder : DrawFrameFlags::NONE);
ImplControlValue aControlValue( nControlFlags );
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 4e0fd974d161..15a31bc1c40d 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -83,13 +83,13 @@ static bool ImplIsMnemonicCtrl( vcl::Window* pWindow )
if( ! pWindow->GetSettings().GetStyleSettings().GetAutoMnemonic() )
return false;
- if ( (pWindow->GetType() == WINDOW_RADIOBUTTON) ||
- (pWindow->GetType() == WINDOW_CHECKBOX) ||
- (pWindow->GetType() == WINDOW_TRISTATEBOX) ||
- (pWindow->GetType() == WINDOW_PUSHBUTTON) )
+ if ( (pWindow->GetType() == WindowType::RADIOBUTTON) ||
+ (pWindow->GetType() == WindowType::CHECKBOX) ||
+ (pWindow->GetType() == WindowType::TRISTATEBOX) ||
+ (pWindow->GetType() == WindowType::PUSHBUTTON) )
return true;
- if ( pWindow->GetType() == WINDOW_FIXEDTEXT )
+ if ( pWindow->GetType() == WindowType::FIXEDTEXT )
{
FixedText *pText = static_cast<FixedText*>(pWindow);
if (pText->get_mnemonic_widget())
@@ -103,12 +103,12 @@ static bool ImplIsMnemonicCtrl( vcl::Window* pWindow )
return false;
pNextWindow = pNextWindow->GetWindow( GetWindowType::Client );
if ( !(pNextWindow->GetStyle() & WB_TABSTOP) ||
- (pNextWindow->GetType() == WINDOW_FIXEDTEXT) ||
- (pNextWindow->GetType() == WINDOW_GROUPBOX) ||
- (pNextWindow->GetType() == WINDOW_RADIOBUTTON) ||
- (pNextWindow->GetType() == WINDOW_CHECKBOX) ||
- (pNextWindow->GetType() == WINDOW_TRISTATEBOX) ||
- (pNextWindow->GetType() == WINDOW_PUSHBUTTON) )
+ (pNextWindow->GetType() == WindowType::FIXEDTEXT) ||
+ (pNextWindow->GetType() == WindowType::GROUPBOX) ||
+ (pNextWindow->GetType() == WindowType::RADIOBUTTON) ||
+ (pNextWindow->GetType() == WindowType::CHECKBOX) ||
+ (pNextWindow->GetType() == WindowType::TRISTATEBOX) ||
+ (pNextWindow->GetType() == WindowType::PUSHBUTTON) )
return false;
return true;
@@ -205,10 +205,10 @@ void Accelerator::GenerateAutoMnemonicsOnHierarchy(vcl::Window* pWindow)
}
// take the Controls of the dialog into account for TabPages
- if ( pWindow->GetType() == WINDOW_TABPAGE )
+ if ( pWindow->GetType() == WindowType::TABPAGE )
{
vcl::Window* pParent = pWindow->GetParent();
- if ( pParent->GetType() == WINDOW_TABCONTROL )
+ if ( pParent->GetType() == WindowType::TABCONTROL )
pParent = pParent->GetParent();
if ( (pParent->GetStyle() & (WB_DIALOGCONTROL | WB_NODIALOGCONTROL)) == WB_DIALOGCONTROL )
@@ -289,7 +289,7 @@ static PushButton* ImplGetOKButton( Dialog* pDialog )
vcl::Window* pChild = getActionAreaButtonList(pDialog);
while ( pChild )
{
- if ( pChild->GetType() == WINDOW_OKBUTTON )
+ if ( pChild->GetType() == WindowType::OKBUTTON )
return static_cast<PushButton*>(pChild);
pChild = pChild->GetWindow( GetWindowType::Next );
@@ -304,7 +304,7 @@ static PushButton* ImplGetCancelButton( Dialog* pDialog )
while ( pChild )
{
- if ( pChild->GetType() == WINDOW_CANCELBUTTON )
+ if ( pChild->GetType() == WindowType::CANCELBUTTON )
return static_cast<PushButton*>(pChild);
pChild = pChild->GetWindow( GetWindowType::Next );
@@ -519,7 +519,7 @@ void Dialog::doDeferredInit(WinBits nBits)
}
Dialog::Dialog(vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription)
- : SystemWindow(WINDOW_DIALOG)
+ : SystemWindow(WindowType::DIALOG)
, mnInitFlag(InitFlag::Default)
{
ImplInitDialogData();
@@ -535,7 +535,7 @@ Dialog::Dialog(vcl::Window* pParent, const OUString& rID, const OUString& rUIXML
}
Dialog::Dialog(vcl::Window* pParent, WinBits nStyle, InitFlag eFlag)
- : SystemWindow(WINDOW_DIALOG)
+ : SystemWindow(WindowType::DIALOG)
, mnInitFlag(eFlag)
{
ImplInitDialogData();
@@ -1205,18 +1205,18 @@ VclBuilderContainer::~VclBuilderContainer()
}
ModelessDialog::ModelessDialog(vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription, InitFlag eFlag)
- : Dialog(pParent, rID, rUIXMLDescription, WINDOW_MODELESSDIALOG, eFlag)
+ : Dialog(pParent, rID, rUIXMLDescription, WindowType::MODELESSDIALOG, eFlag)
{
}
ModalDialog::ModalDialog( vcl::Window* pParent, WinBits nStyle ) :
- Dialog( WINDOW_MODALDIALOG )
+ Dialog( WindowType::MODALDIALOG )
{
ImplInit( pParent, nStyle );
}
ModalDialog::ModalDialog( vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription ) :
- Dialog(pParent, rID, rUIXMLDescription, WINDOW_MODALDIALOG)
+ Dialog(pParent, rID, rUIXMLDescription, WindowType::MODALDIALOG)
{
}
diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx
index 3cb40abf84db..e1e4495ca60c 100644
--- a/vcl/source/window/dlgctrl.cxx
+++ b/vcl/source/window/dlgctrl.cxx
@@ -93,7 +93,7 @@ static vcl::Window* ImplGetSubChildWindow( vcl::Window* pParent, sal_uInt16 n, s
pFoundWindow = pWindow;
// for a TabControl, remember the current TabPage for later use
- if ( pWindow->GetType() == WINDOW_TABCONTROL )
+ if ( pWindow->GetType() == WindowType::TABCONTROL )
{
TabControl* pTabControl = static_cast<TabControl*>(pWindow);
// Check if the TabPage is a Child of the TabControl and still exists (by
@@ -264,7 +264,7 @@ vcl::Window* Window::ImplGetDlgWindow( sal_uInt16 nIndex, GetDlgWindowType nType
{
if ( pWindow )
{
- if ( pWindow->GetType() == WINDOW_TABCONTROL )
+ if ( pWindow->GetType() == WindowType::TABCONTROL )
{
vcl::Window* pNextWindow = ImplGetDlgWindow( i, GetDlgWindowType::Next );
if ( pNextWindow )
@@ -413,7 +413,7 @@ vcl::Window* ImplFindAccelWindow( vcl::Window* pParent, sal_uInt16& rIndex, sal_
cCompareChar = xCharClass->toUpper( OUString(cCompareChar), 0, 1, rLocale )[0];
if ( cCompareChar == cCharCode )
{
- if (pWindow->GetType() == WINDOW_FIXEDTEXT)
+ if (pWindow->GetType() == WindowType::FIXEDTEXT)
{
FixedText *pFixedText = static_cast<FixedText*>(pWindow);
vcl::Window *pMnemonicWidget = pFixedText->get_mnemonic_widget();
@@ -424,9 +424,9 @@ vcl::Window* ImplFindAccelWindow( vcl::Window* pParent, sal_uInt16& rIndex, sal_
}
// skip Static-Controls
- if ( (pWindow->GetType() == WINDOW_FIXEDTEXT) ||
- (pWindow->GetType() == WINDOW_FIXEDLINE) ||
- (pWindow->GetType() == WINDOW_GROUPBOX) )
+ if ( (pWindow->GetType() == WindowType::FIXEDTEXT) ||
+ (pWindow->GetType() == WindowType::FIXEDLINE) ||
+ (pWindow->GetType() == WindowType::GROUPBOX) )
pWindow = pParent->ImplGetDlgWindow( i, GetDlgWindowType::Next );
rIndex = i;
return pWindow;
@@ -476,7 +476,7 @@ void Window::ImplControlFocus( GetFocusFlags nFlags )
{
if ( nFlags & GetFocusFlags::Mnemonic )
{
- if ( GetType() == WINDOW_RADIOBUTTON )
+ if ( GetType() == WindowType::RADIOBUTTON )
{
if ( !static_cast<RadioButton*>(this)->IsChecked() )
static_cast<RadioButton*>(this)->ImplCallClick( true, nFlags );
@@ -488,7 +488,7 @@ void Window::ImplControlFocus( GetFocusFlags nFlags )
ImplGrabFocus( nFlags );
if ( nFlags & GetFocusFlags::UniqueMnemonic )
{
- if ( GetType() == WINDOW_CHECKBOX )
+ if ( GetType() == WindowType::CHECKBOX )
static_cast<CheckBox*>(this)->ImplCheck();
else if ( mpWindowImpl->mbPushButton )
{
@@ -501,7 +501,7 @@ void Window::ImplControlFocus( GetFocusFlags nFlags )
}
else
{
- if ( GetType() == WINDOW_RADIOBUTTON )
+ if ( GetType() == WindowType::RADIOBUTTON )
{
if ( !static_cast<RadioButton*>(this)->IsChecked() )
static_cast<RadioButton*>(this)->ImplCallClick( true, nFlags );
@@ -523,8 +523,8 @@ namespace
isEnabledInLayout(pWindow) && pWindow->IsInputEnabled() &&
//Pure window shouldn't get window after controls such as
//buttons.
- (pWindow->GetType() != WINDOW_WINDOW && pWindow->GetType() != WINDOW_SYSWINDOW &&
- pWindow->GetType() != WINDOW_WORKWINDOW && pWindow->GetType() != WINDOW_CONTROL)
+ (pWindow->GetType() != WindowType::WINDOW && pWindow->GetType() != WindowType::SYSWINDOW &&
+ pWindow->GetType() != WindowType::WORKWINDOW && pWindow->GetType() != WindowType::CONTROL)
);
}
@@ -704,7 +704,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput )
iButtonStart = iButton;
while ( pButtonWindow )
{
- if ( pButtonWindow->GetType() == WINDOW_CANCELBUTTON )
+ if ( pButtonWindow->GetType() == WindowType::CANCELBUTTON )
break;
pButtonWindow = ImplGetNextWindow( this, iButton, iButton, true );
@@ -848,7 +848,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput )
}
else if ( (nKeyCode == KEY_LEFT) || (nKeyCode == KEY_UP) )
{
- if (pSWindow->GetType() == WINDOW_RADIOBUTTON)
+ if (pSWindow->GetType() == WindowType::RADIOBUTTON)
return nextInGroup(static_cast<RadioButton*>(pSWindow), true);
else
{
@@ -879,7 +879,7 @@ bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput )
}
else if ( (nKeyCode == KEY_RIGHT) || (nKeyCode == KEY_DOWN) )
{
- if (pSWindow->GetType() == WINDOW_RADIOBUTTON)
+ if (pSWindow->GetType() == WindowType::RADIOBUTTON)
return nextInGroup(static_cast<RadioButton*>(pSWindow), false);
else
{
diff --git a/vcl/source/window/dockingarea.cxx b/vcl/source/window/dockingarea.cxx
index f735949ecab8..f23fc4da10b6 100644
--- a/vcl/source/window/dockingarea.cxx
+++ b/vcl/source/window/dockingarea.cxx
@@ -40,7 +40,7 @@ DockingAreaWindow::ImplData::ImplData()
}
DockingAreaWindow::DockingAreaWindow( vcl::Window* pParent ) :
- Window( WINDOW_DOCKINGAREA )
+ Window( WindowType::DOCKINGAREA )
{
ImplInit( pParent, WB_CLIPCHILDREN|WB_3DLOOK, nullptr );
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index ba168bd75ca1..7871b539e207 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -970,7 +970,7 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, FloatWin
mpOldBorderWin = nullptr; // no border window found
bool bAllowTearOff = bool( nFlags & FloatWinPopupFlags::AllowTearOff );
- bool bUseStdPopup = bAllowTearOff && GetWindow()->GetType() != WINDOW_TOOLBOX;
+ bool bUseStdPopup = bAllowTearOff && GetWindow()->GetType() != WindowType::TOOLBOX;
// the new parent for popup mode
VclPtr<FloatingWindow> pWin;
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index a74d659aa68f..ced4ec955b36 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -351,7 +351,7 @@ DockingWindow::DockingWindow( WindowType nType ) :
}
DockingWindow::DockingWindow( vcl::Window* pParent, WinBits nStyle ) :
- Window( WINDOW_DOCKINGWINDOW )
+ Window( WindowType::DOCKINGWINDOW )
{
ImplInitDockingWindowData();
ImplInit( pParent, nStyle );
@@ -376,7 +376,7 @@ void DockingWindow::loadUI(vcl::Window* pParent, const OString& rID, const OUStr
DockingWindow::DockingWindow(vcl::Window* pParent, const OString& rID,
const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame> &rFrame)
- : Window(WINDOW_DOCKINGWINDOW)
+ : Window(WindowType::DOCKINGWINDOW)
{
ImplInitDockingWindowData();
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index e8bb662355ed..da6fc79a7c28 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -580,17 +580,17 @@ void Window::ImplCallFocusChangeActivate( vcl::Window* pNewOverlapWindow,
pOldRealWindow = pOldOverlapWindow->ImplGetWindow();
pNewRealWindow = pNewOverlapWindow->ImplGetWindow();
- if ( (pOldRealWindow->GetType() != WINDOW_FLOATINGWINDOW) ||
+ if ( (pOldRealWindow->GetType() != WindowType::FLOATINGWINDOW) ||
pOldRealWindow->GetActivateMode() != ActivateModeFlags::NONE )
{
- if ( (pNewRealWindow->GetType() == WINDOW_FLOATINGWINDOW) &&
+ if ( (pNewRealWindow->GetType() == WindowType::FLOATINGWINDOW) &&
pNewRealWindow->GetActivateMode() == ActivateModeFlags::NONE)
{
pSVData->maWinData.mpLastDeacWin = pOldOverlapWindow;
bCallDeactivate = false;
}
}
- else if ( (pNewRealWindow->GetType() != WINDOW_FLOATINGWINDOW) ||
+ else if ( (pNewRealWindow->GetType() != WindowType::FLOATINGWINDOW) ||
pNewRealWindow->GetActivateMode() != ActivateModeFlags::NONE )
{
if ( pSVData->maWinData.mpLastDeacWin )
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 41e12ea67aea..4337969fc07f 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -146,13 +146,13 @@ void FloatingWindow::ImplInitSettings()
}
FloatingWindow::FloatingWindow(vcl::Window* pParent, WinBits nStyle) :
- SystemWindow(WINDOW_FLOATINGWINDOW)
+ SystemWindow(WindowType::FLOATINGWINDOW)
{
ImplInit(pParent, nStyle);
}
FloatingWindow::FloatingWindow(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame> &rFrame)
- : SystemWindow(WINDOW_FLOATINGWINDOW)
+ : SystemWindow(WindowType::FLOATINGWINDOW)
, mpNextFloat(nullptr)
, mpFirstPopupModeWin(nullptr)
, mpImplData(nullptr)
diff --git a/vcl/source/window/introwin.cxx b/vcl/source/window/introwin.cxx
index 50c871203e90..d33a36c5bb14 100644
--- a/vcl/source/window/introwin.cxx
+++ b/vcl/source/window/introwin.cxx
@@ -32,7 +32,7 @@ void IntroWindow::ImplInitIntroWindowData()
}
IntroWindow::IntroWindow( ) :
- WorkWindow( WINDOW_INTROWINDOW )
+ WorkWindow( WindowType::INTROWINDOW )
{
ImplInitIntroWindowData();
WorkWindow::ImplInit( nullptr, WB_INTROWIN );
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 77dbf1990dc4..785ec06f13bb 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -25,7 +25,7 @@
#include <svids.hrc>
VclContainer::VclContainer(vcl::Window *pParent, WinBits nStyle)
- : Window(WINDOW_CONTAINER)
+ : Window(WindowType::CONTAINER)
, IPrioritable()
, m_bLayoutDirty(true)
{
@@ -1825,7 +1825,7 @@ VclScrolledWindow::VclScrolledWindow(vcl::Window *pParent)
, m_pHScroll(VclPtr<ScrollBar>::Create(this, WB_HIDE | WB_HORZ))
, m_aScrollBarBox(VclPtr<ScrollBarBox>::Create(this, WB_HIDE))
{
- SetType(WINDOW_SCROLLWINDOW);
+ SetType(WindowType::SCROLLWINDOW);
Link<ScrollBar*,void> aLink( LINK( this, VclScrolledWindow, ScrollBarHdl ) );
m_pVScroll->SetScrollHdl(aLink);
@@ -2185,7 +2185,7 @@ MessageDialog::MessageDialog(vcl::Window* pParent, WinBits nStyle)
, m_pPrimaryMessage(nullptr)
, m_pSecondaryMessage(nullptr)
{
- SetType(WINDOW_MESSBOX);
+ SetType(WindowType::MESSBOX);
}
MessageDialog::MessageDialog(vcl::Window* pParent,
@@ -2201,12 +2201,12 @@ MessageDialog::MessageDialog(vcl::Window* pParent,
, m_pSecondaryMessage(nullptr)
, m_sPrimaryString(rMessage)
{
- SetType(WINDOW_MESSBOX);
+ SetType(WindowType::MESSBOX);
create_owned_areas();
}
MessageDialog::MessageDialog(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription)
- : Dialog(pParent, OStringToOUString(rID, RTL_TEXTENCODING_UTF8), rUIXMLDescription, WINDOW_MESSBOX)
+ : Dialog(pParent, OStringToOUString(rID, RTL_TEXTENCODING_UTF8), rUIXMLDescription, WindowType::MESSBOX)
, m_eButtonsType(VclButtonsType::NONE)
, m_eMessageType(VclMessageType::Info)
, m_pOwnedContentArea(nullptr)
@@ -2267,7 +2267,7 @@ void MessageDialog::setButtonHandlers(VclButtonBox *pButtonBox)
{
switch (pChild->GetType())
{
- case WINDOW_PUSHBUTTON:
+ case WindowType::PUSHBUTTON:
{
PushButton* pButton = static_cast<PushButton*>(pChild);
pButton->SetClickHdl(LINK(this, MessageDialog, ButtonHdl));
@@ -2275,13 +2275,13 @@ void MessageDialog::setButtonHandlers(VclButtonBox *pButtonBox)
}
//insist that the response ids match the default actions for those
//widgets, and leave their default handlers in place
- case WINDOW_OKBUTTON:
+ case WindowType::OKBUTTON:
assert(get_response(pChild) == RET_OK);
break;
- case WINDOW_CANCELBUTTON:
+ case WindowType::CANCELBUTTON:
assert(get_response(pChild) == RET_CANCEL);
break;
- case WINDOW_HELPBUTTON:
+ case WindowType::HELPBUTTON:
assert(get_response(pChild) == RET_HELP);
break;
default:
diff --git a/vcl/source/window/legacyaccessibility.cxx b/vcl/source/window/legacyaccessibility.cxx
index 1cddcab06201..f476712e1833 100644
--- a/vcl/source/window/legacyaccessibility.cxx
+++ b/vcl/source/window/legacyaccessibility.cxx
@@ -42,13 +42,13 @@ static vcl::Window* ImplGetLabelFor( vcl::Window* pFrameWindow, WindowType nMyTy
{
vcl::Window* pWindow = nullptr;
- if( nMyType == WINDOW_FIXEDTEXT ||
- nMyType == WINDOW_FIXEDLINE ||
- nMyType == WINDOW_GROUPBOX )
+ if( nMyType == WindowType::FIXEDTEXT ||
+ nMyType == WindowType::FIXEDLINE ||
+ nMyType == WindowType::GROUPBOX )
{
// #i100833# MT 2010/02: Group box and fixed lines can also label a fixed text.
// See tools/options/print for example.
- bool bThisIsAGroupControl = (nMyType == WINDOW_GROUPBOX) || (nMyType == WINDOW_FIXEDLINE);
+ bool bThisIsAGroupControl = (nMyType == WindowType::GROUPBOX) || (nMyType == WindowType::FIXEDLINE);
// get index, form start and form end
sal_uInt16 nIndex=0, nFormStart=0, nFormEnd=0;
::ImplFindDlgCtrlWindow( pFrameWindow,
@@ -80,13 +80,13 @@ static vcl::Window* ImplGetLabelFor( vcl::Window* pFrameWindow, WindowType nMyTy
if( pSWindow && isVisibleInLayout(pSWindow) && ! (pSWindow->GetStyle() & WB_NOLABEL) )
{
WindowType nType = pSWindow->GetType();
- if( nType != WINDOW_FIXEDTEXT &&
- nType != WINDOW_FIXEDLINE &&
- nType != WINDOW_GROUPBOX )
+ if( nType != WindowType::FIXEDTEXT &&
+ nType != WindowType::FIXEDLINE &&
+ nType != WindowType::GROUPBOX )
{
pWindow = pSWindow;
}
- else if( bThisIsAGroupControl && ( nType == WINDOW_FIXEDTEXT ) )
+ else if( bThisIsAGroupControl && ( nType == WindowType::FIXEDTEXT ) )
{
pWindow = pSWindow;
}
@@ -129,7 +129,7 @@ Window* Window::getLegacyNonLayoutAccessibleRelationLabelFor() const
static Window* ImplGetLabeledBy( Window* pFrameWindow, WindowType nMyType, Window* pLabeled )
{
Window* pWindow = nullptr;
- if ( (nMyType != WINDOW_GROUPBOX) && (nMyType != WINDOW_FIXEDLINE) )
+ if ( (nMyType != WindowType::GROUPBOX) && (nMyType != WindowType::FIXEDLINE) )
{
// search for a control that labels this window
// a label is considered the last fixed text, fixed line or group box
@@ -146,10 +146,10 @@ static Window* ImplGetLabeledBy( Window* pFrameWindow, WindowType nMyType, Windo
nFormEnd );
if( pSWindow && nIndex != nFormStart )
{
- if( nMyType == WINDOW_PUSHBUTTON ||
- nMyType == WINDOW_HELPBUTTON ||
- nMyType == WINDOW_OKBUTTON ||
- nMyType == WINDOW_CANCELBUTTON )
+ if( nMyType == WindowType::PUSHBUTTON ||
+ nMyType == WindowType::HELPBUTTON ||
+ nMyType == WindowType::OKBUTTON ||
+ nMyType == WindowType::CANCELBUTTON )
{
nFormStart = nIndex-1;
}
@@ -163,12 +163,12 @@ static Window* ImplGetLabeledBy( Window* pFrameWindow, WindowType nMyType, Windo
if( pSWindow && isVisibleInLayout(pSWindow) && !(pSWindow->GetStyle() & WB_NOLABEL) )
{
WindowType nType = pSWindow->GetType();
- if ( ( nType == WINDOW_FIXEDTEXT ||
- nType == WINDOW_FIXEDLINE ||
- nType == WINDOW_GROUPBOX ) )
+ if ( ( nType == WindowType::FIXEDTEXT ||
+ nType == WindowType::FIXEDLINE ||
+ nType == WindowType::GROUPBOX ) )
{
// a fixed text can't be labeld by a fixed text.
- if ( ( nMyType != WINDOW_FIXEDTEXT ) || ( nType != WINDOW_FIXEDTEXT ) )
+ if ( ( nMyType != WindowType::FIXEDTEXT ) || ( nType != WindowType::FIXEDTEXT ) )
pWindow = pSWindow;
break;
}
@@ -195,12 +195,12 @@ Window* Window::getLegacyNonLayoutAccessibleRelationLabeledBy() const
}
// #i62723#, #104191# checkboxes and radiobuttons are not supposed to have labels
- if( GetType() == WINDOW_CHECKBOX || GetType() == WINDOW_RADIOBUTTON )
+ if( GetType() == WindowType::CHECKBOX || GetType() == WindowType::RADIOBUTTON )
return nullptr;
-// if( ! ( GetType() == WINDOW_FIXEDTEXT ||
-// GetType() == WINDOW_FIXEDLINE ||
-// GetType() == WINDOW_GROUPBOX ) )
+// if( ! ( GetType() == WindowType::FIXEDTEXT ||
+// GetType() == WindowType::FIXEDLINE ||
+// GetType() == WindowType::GROUPBOX ) )
// #i100833# MT 2010/02: Group box and fixed lines can also label a fixed text.
// See tools/options/print for example.
@@ -219,9 +219,9 @@ Window* Window::getLegacyNonLayoutAccessibleRelationMemberOf() const
{
pFrameWindow = ImplGetFrameWindow();
}
- // if( ! ( GetType() == WINDOW_FIXEDTEXT ||
- if( !( GetType() == WINDOW_FIXEDLINE ||
- GetType() == WINDOW_GROUPBOX ) )
+ // if( ! ( GetType() == WindowType::FIXEDTEXT ||
+ if( !( GetType() == WindowType::FIXEDLINE ||
+ GetType() == WindowType::GROUPBOX ) )
{
// search for a control that makes member of this window
// it is considered the last fixed line or group box
@@ -237,10 +237,10 @@ Window* Window::getLegacyNonLayoutAccessibleRelationMemberOf() const
nFormEnd );
if( pSWindow && nIndex != nFormStart )
{
- if( GetType() == WINDOW_PUSHBUTTON ||
- GetType() == WINDOW_HELPBUTTON ||
- GetType() == WINDOW_OKBUTTON ||
- GetType() == WINDOW_CANCELBUTTON )
+ if( GetType() == WindowType::PUSHBUTTON ||
+ GetType() == WindowType::HELPBUTTON ||
+ GetType() == WindowType::OKBUTTON ||
+ GetType() == WindowType::CANCELBUTTON )
{
nFormStart = nIndex-1;
}
@@ -252,8 +252,8 @@ Window* Window::getLegacyNonLayoutAccessibleRelationMemberOf() const
nFoundIndex,
false );
if( pSWindow && pSWindow->IsVisible() &&
- ( pSWindow->GetType() == WINDOW_FIXEDLINE ||
- pSWindow->GetType() == WINDOW_GROUPBOX ) )
+ ( pSWindow->GetType() == WindowType::FIXEDLINE ||
+ pSWindow->GetType() == WindowType::GROUPBOX ) )
{
pWindow = pSWindow;
break;
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index be3ab27845aa..a2ad3a96172f 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -118,7 +118,7 @@ MenuBarWindow::MenuBarWindow( vcl::Window* pParent ) :
aFloatBtn(VclPtr<PushButton>::Create(this, WB_NOPOINTERFOCUS | WB_SMALLSTYLE | WB_RECTSTYLE)),
aHideBtn(VclPtr<PushButton>::Create(this, WB_NOPOINTERFOCUS | WB_SMALLSTYLE | WB_RECTSTYLE))
{
- SetType(WINDOW_MENUBARWINDOW);
+ SetType(WindowType::MENUBARWINDOW);
pMenu = nullptr;
pActivePopup = nullptr;
nHighlightedItem = ITEMPOS_INVALID;
@@ -536,7 +536,7 @@ static int ImplGetTopDockingAreaHeight( vcl::Window *pWindow )
while( pChildWin )
{
DockingAreaWindow *pDockingArea = nullptr;
- if ( pChildWin->GetType() == WINDOW_DOCKINGAREA )
+ if ( pChildWin->GetType() == WindowType::DOCKINGAREA )
pDockingArea = static_cast< DockingAreaWindow* >( pChildWin );
if( pDockingArea && pDockingArea->GetAlign() == WindowAlign::Top &&
diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx
index 240fb2698330..81862e62aa4f 100644
--- a/vcl/source/window/msgbox.cxx
+++ b/vcl/source/window/msgbox.cxx
@@ -130,7 +130,7 @@ void MessBox::ImplInitButtons()
MessBox::MessBox( vcl::Window* pParent, WinBits nStyle,
const OUString& rTitle, const OUString& rMessage ) :
- ButtonDialog( WINDOW_MESSBOX ),
+ ButtonDialog( WindowType::MESSBOX ),
mbHelpBtn( false ),
mbCheck( false ),
maMessText( rMessage )
diff --git a/vcl/source/window/settings.cxx b/vcl/source/window/settings.cxx
index 6bb516eb956e..759f1ff12da1 100644
--- a/vcl/source/window/settings.cxx
+++ b/vcl/source/window/settings.cxx
@@ -50,7 +50,7 @@ void Window::SetSettings( const AllSettings& rSettings, bool bChild )
if ( mpWindowImpl->mpBorderWindow )
{
mpWindowImpl->mpBorderWindow->SetSettings( rSettings, false );
- if ( (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) &&
+ if ( (mpWindowImpl->mpBorderWindow->GetType() == WindowType::BORDERWINDOW) &&
static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->mpMenuBarWindow )
static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->mpMenuBarWindow->SetSettings( rSettings, true );
}
@@ -85,7 +85,7 @@ void Window::UpdateSettings( const AllSettings& rSettings, bool bChild )
if ( mpWindowImpl->mpBorderWindow )
{
mpWindowImpl->mpBorderWindow->UpdateSettings( rSettings );
- if ( (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) &&
+ if ( (mpWindowImpl->mpBorderWindow->GetType() == WindowType::BORDERWINDOW) &&
static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->mpMenuBarWindow )
static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->mpMenuBarWindow->UpdateSettings( rSettings, true );
}
diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx
index eb6da6e758fa..8d607d6f9858 100644
--- a/vcl/source/window/split.cxx
+++ b/vcl/source/window/split.cxx
@@ -127,7 +127,7 @@ void Splitter::ImplDrawSplitter()
}
Splitter::Splitter( vcl::Window* pParent, WinBits nStyle ) :
- Window( WINDOW_SPLITTER ),
+ Window( WindowType::SPLITTER ),
mpRefWin( nullptr ),
mnSplitPos( 0 ),
mnLastSplitPos( 0 ),
diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx
index 64b0ffe08e69..b53386344832 100644
--- a/vcl/source/window/splitwin.cxx
+++ b/vcl/source/window/splitwin.cxx
@@ -1375,7 +1375,7 @@ void SplitWindow::ImplInitSettings()
}
SplitWindow::SplitWindow( vcl::Window* pParent, WinBits nStyle ) :
- DockingWindow( WINDOW_SPLITWINDOW )
+ DockingWindow( WindowType::SPLITWINDOW )
{
ImplInit( pParent, nStyle );
DockingWindow::SetIdleDebugName( "vcl::SplitWindow maLayoutIdle" );
diff --git a/vcl/source/window/stacking.cxx b/vcl/source/window/stacking.cxx
index 2c5bebc62ce2..ce70ebaf2428 100644
--- a/vcl/source/window/stacking.cxx
+++ b/vcl/source/window/stacking.cxx
@@ -973,8 +973,8 @@ void Window::SetParent( vcl::Window* pNewParent )
// also convert Activate-Status
if ( bNewFrame )
{
- if ( (GetType() == WINDOW_BORDERWINDOW) &&
- (ImplGetWindow()->GetType() == WINDOW_FLOATINGWINDOW) )
+ if ( (GetType() == WindowType::BORDERWINDOW) &&
+ (ImplGetWindow()->GetType() == WindowType::FLOATINGWINDOW) )
static_cast<ImplBorderWindow*>(this)->SetDisplayActive( mpWindowImpl->mpFrameData->mbHasFocus );
}
diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx
index c4f541572cfa..3960437063cb 100644
--- a/vcl/source/window/status.cxx
+++ b/vcl/source/window/status.cxx
@@ -140,7 +140,7 @@ void StatusBar::ImplInit( vcl::Window* pParent, WinBits nStyle )
}
StatusBar::StatusBar( vcl::Window* pParent, WinBits nStyle ) :
- Window( WINDOW_STATUSBAR )
+ Window( WindowType::STATUSBAR )
{
ImplInit( pParent, nStyle );
}
diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx
index d6595038991b..3b8c90a390b4 100644
--- a/vcl/source/window/syschild.cxx
+++ b/vcl/source/window/syschild.cxx
@@ -121,13 +121,13 @@ void SystemChildWindow::ImplInitSysChild( vcl::Window* pParent, WinBits nStyle,
}
SystemChildWindow::SystemChildWindow( vcl::Window* pParent, WinBits nStyle ) :
- Window( WINDOW_SYSTEMCHILDWINDOW )
+ Window( WindowType::SYSTEMCHILDWINDOW )
{
ImplInitSysChild( pParent, nStyle, nullptr );
}
SystemChildWindow::SystemChildWindow( vcl::Window* pParent, WinBits nStyle, SystemWindowData *pData, bool bShow ) :
- Window( WINDOW_SYSTEMCHILDWINDOW )
+ Window( WindowType::SYSTEMCHILDWINDOW )
{
ImplInitSysChild( pParent, nStyle, pData, bShow );
}
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index a8ed067a5b4e..192b85e4c8a8 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -131,14 +131,14 @@ namespace
vcl::Window* pChild = firstLogicalChildOfParent(pParent);
while (pChild)
{
- if (pChild->GetType() == WINDOW_TABCONTROL)
+ if (pChild->GetType() == WindowType::TABCONTROL)
{
// find currently shown tab page
TabControl* pTabControl = static_cast<TabControl*>(pChild);
TabPage* pTabPage = pTabControl->GetTabPage( pTabControl->GetCurPageId() );
processChildren(pTabPage, bShowAccel);
}
- else if (pChild->GetType() == WINDOW_TABPAGE)
+ else if (pChild->GetType() == WindowType::TABPAGE)
{
// bare tabpage without tabcontrol parent (options dialog)
processChildren(pChild, bShowAccel);
@@ -179,7 +179,7 @@ bool SystemWindow::EventNotify( NotifyEvent& rNEvt )
rNEvt.GetType() == MouseNotifyEvent::COMMAND)
{
MenuBar* pMBar = mpMenuBar;
- if ( !pMBar && ( GetType() == WINDOW_FLOATINGWINDOW ) )
+ if ( !pMBar && ( GetType() == WindowType::FLOATINGWINDOW ) )
{
vcl::Window* pWin = ImplGetFrameWindow()->ImplGetWindow();
if( pWin && pWin->IsSystemWindow() )
@@ -216,7 +216,7 @@ bool SystemWindow::PreNotify( NotifyEvent& rNEvt )
else
{
TaskPaneList *pTList = mpImplData->mpTaskPaneList.get();
- if( !pTList && ( GetType() == WINDOW_FLOATINGWINDOW ) )
+ if( !pTList && ( GetType() == WindowType::FLOATINGWINDOW ) )
{
vcl::Window* pWin = ImplGetFrameWindow()->ImplGetWindow();
if( pWin && pWin->IsSystemWindow() )
@@ -252,7 +252,7 @@ TaskPaneList* SystemWindow::GetTaskPaneList()
{
mpImplData->mpTaskPaneList.reset( new TaskPaneList );
MenuBar* pMBar = mpMenuBar;
- if ( !pMBar && ( GetType() == WINDOW_FLOATINGWINDOW ) )
+ if ( !pMBar && ( GetType() == WindowType::FLOATINGWINDOW ) )
{
vcl::Window* pWin = ImplGetFrameWindow()->ImplGetWindow();
if ( pWin && pWin->IsSystemWindow() )
@@ -913,7 +913,7 @@ void SystemWindow::SetMenuBar(MenuBar* pMenuBar)
VclPtr<vcl::Window> pNewWindow;
mpMenuBar = pMenuBar;
- if ( mpWindowImpl->mpBorderWindow && (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) )
+ if ( mpWindowImpl->mpBorderWindow && (mpWindowImpl->mpBorderWindow->GetType() == WindowType::BORDERWINDOW) )
{
if ( pOldMenuBar )
pOldWindow = pOldMenuBar->ImplGetWindow();
@@ -996,7 +996,7 @@ void SystemWindow::SetMenuBarMode( MenuBarMode nMode )
if ( mnMenuBarMode != nMode )
{
mnMenuBarMode = nMode;
- if ( mpWindowImpl->mpBorderWindow && (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) )
+ if ( mpWindowImpl->mpBorderWindow && (mpWindowImpl->mpBorderWindow->GetType() == WindowType::BORDERWINDOW) )
{
if ( nMode == MenuBarMode::Hide )
static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->SetMenuBarMode( true );
diff --git a/vcl/source/window/tabdlg.cxx b/vcl/source/window/tabdlg.cxx
index 6c97b1f29c1e..4b4cb46b9f57 100644
--- a/vcl/source/window/tabdlg.cxx
+++ b/vcl/source/window/tabdlg.cxx
@@ -47,7 +47,7 @@ void TabDialog::ImplPosControls()
{
if ( pChild->IsVisible() && (pChild != mpViewWindow) )
{
- if (pChild->GetType() == WINDOW_TABCONTROL || isContainerWindow(*pChild))
+ if (pChild->GetType() == WindowType::TABCONTROL || isContainerWindow(*pChild))
pTabControl = pChild;
else if ( pTabControl )
{
@@ -208,14 +208,14 @@ void TabDialog::ImplPosControls()
}
TabDialog::TabDialog( vcl::Window* pParent, WinBits nStyle ) :
- Dialog( WINDOW_TABDIALOG )
+ Dialog( WindowType::TABDIALOG )
{
ImplInitTabDialogData();
ImplInit( pParent, nStyle );
}
TabDialog::TabDialog( vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription ) :
- Dialog(pParent, rID, rUIXMLDescription, WINDOW_TABDIALOG)
+ Dialog(pParent, rID, rUIXMLDescription, WindowType::TABDIALOG)
{
ImplInitTabDialogData();
}
@@ -250,7 +250,7 @@ vcl::Window* findTabControl(vcl::Window* pCurrent)
return nullptr;
}
- if (pCurrent->GetType() == WINDOW_TABCONTROL)
+ if (pCurrent->GetType() == WindowType::TABCONTROL)
{
return pCurrent;
}
diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx
index cda47e0ad401..a929a333830d 100644
--- a/vcl/source/window/tabpage.cxx
+++ b/vcl/source/window/tabpage.cxx
@@ -42,7 +42,7 @@ void TabPage::ImplInit( vcl::Window* pParent, WinBits nStyle )
// if the tabpage is drawn (ie filled) by a native widget, make sure all controls will have transparent background
// otherwise they will paint with a wrong background
- if( IsNativeControlSupported(ControlType::TabBody, ControlPart::Entire) && GetParent() && (GetParent()->GetType() == WINDOW_TABCONTROL) )
+ if( IsNativeControlSupported(ControlType::TabBody, ControlPart::Entire) && GetParent() && (GetParent()->GetType() == WindowType::TABCONTROL) )
EnableChildTransparentMode();
}
@@ -70,14 +70,14 @@ void TabPage::ImplInitSettings()
}
TabPage::TabPage( vcl::Window* pParent, WinBits nStyle ) :
- Window( WINDOW_TABPAGE )
+ Window( WindowType::TABPAGE )
, IContext()
{
ImplInit( pParent, nStyle );
}
TabPage::TabPage(vcl::Window *pParent, const OString& rID, const OUString& rUIXMLDescription)
- : Window(WINDOW_TABPAGE)
+ : Window(WindowType::TABPAGE)
, IContext()
{
ImplInit(pParent, 0);
@@ -131,7 +131,7 @@ void TabPage::DataChanged( const DataChangedEvent& rDCEvt )
void TabPage::Paint( vcl::RenderContext& rRenderContext, const Rectangle& )
{
// draw native tabpage only inside tabcontrols, standalone tabpages look ugly (due to bad dialog design)
- if( IsNativeControlSupported(ControlType::TabBody, ControlPart::Entire) && GetParent() && (GetParent()->GetType() == WINDOW_TABCONTROL) )
+ if( IsNativeControlSupported(ControlType::TabBody, ControlPart::Entire) && GetParent() && (GetParent()->GetType() == WindowType::TABCONTROL) )
{
const ImplControlValue aControlValue;
diff --git a/vcl/source/window/taskpanelist.cxx b/vcl/source/window/taskpanelist.cxx
index 0cd840779a5a..7b6f67a41f17 100644
--- a/vcl/source/window/taskpanelist.cxx
+++ b/vcl/source/window/taskpanelist.cxx
@@ -289,7 +289,7 @@ vcl::Window* TaskPaneList::FindNextFloat( vcl::Window *pWindow, bool bForward )
/* #i83908# do not use the menubar if it is native and invisible
*/
if( (*p)->IsReallyVisible() && !(*p)->ImplIsSplitter() &&
- ( (*p)->GetType() != WINDOW_MENUBARWINDOW || static_cast<MenuBarWindow*>(p->get())->CanGetFocus() ) )
+ ( (*p)->GetType() != WindowType::MENUBARWINDOW || static_cast<MenuBarWindow*>(p->get())->CanGetFocus() ) )
{
pWindow = (*p).get();
break;
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index a6e3d5640e6f..9d8a1ba7cccd 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -646,9 +646,9 @@ void ToolBox::ImplDrawBorder(vcl::RenderContext& rRenderContext)
static bool ImplIsFixedControl( const ImplToolItem *pItem )
{
return ( pItem->mpWindow &&
- (pItem->mpWindow->GetType() == WINDOW_FIXEDTEXT ||
- pItem->mpWindow->GetType() == WINDOW_FIXEDLINE ||
- pItem->mpWindow->GetType() == WINDOW_GROUPBOX) );
+ (pItem->mpWindow->GetType() == WindowType::FIXEDTEXT ||
+ pItem->mpWindow->GetType() == WindowType::FIXEDLINE ||
+ pItem->mpWindow->GetType() == WindowType::GROUPBOX) );
}
const ImplToolItem *ToolBox::ImplGetFirstClippedItem( const ToolBox* pThis )
@@ -1556,7 +1556,7 @@ void ToolBox::doDeferredInit(WinBits nBits)
}
ToolBox::ToolBox( vcl::Window* pParent, WinBits nStyle ) :
- DockingWindow( WINDOW_TOOLBOX )
+ DockingWindow( WindowType::TOOLBOX )
{
ImplInitToolBoxData();
ImplInit( pParent, nStyle );
@@ -1564,7 +1564,7 @@ ToolBox::ToolBox( vcl::Window* pParent, WinBits nStyle ) :
ToolBox::ToolBox(vcl::Window* pParent, const OString& rID,
const OUString& rUIXMLDescription, const css::uno::Reference<css::frame::XFrame> &rFrame)
- : DockingWindow(WINDOW_TOOLBOX)
+ : DockingWindow(WindowType::TOOLBOX)
{
ImplInitToolBoxData();
@@ -2543,7 +2543,7 @@ void ToolBox::ImplFormat( bool bResize )
// equal to the LineSize when multibar has a single
// line size )
if ( it->maRect.Top() ||
- (it->mpWindow && it->mpWindow->GetType() == WINDOW_CALCINPUTLINE) ) // tdf#83099
+ (it->mpWindow && it->mpWindow->GetType() == WindowType::CALCINPUTLINE) ) // tdf#83099
{
it->maCalcRect.Top() = it->maRect.Top();
}
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 39df6c7aa496..14d0e935c60d 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -93,7 +93,7 @@ Window::Window( WindowType nType ) :
}
Window::Window( vcl::Window* pParent, WinBits nStyle ) :
- mpWindowImpl(new WindowImpl( WINDOW_WINDOW ))
+ mpWindowImpl(new WindowImpl( WindowType::WINDOW ))
{
meOutDevType = OUTDEV_WINDOW;
@@ -111,7 +111,7 @@ namespace
// skip border windows, they do not carry information that
// would help with diagnosing the problem
const vcl::Window* pTempWin( pWindow );
- while ( pTempWin && pTempWin->GetType() == WINDOW_BORDERWINDOW ) {
+ while ( pTempWin && pTempWin->GetType() == WindowType::BORDERWINDOW ) {
pTempWin = pTempWin->GetWindow( GetWindowType::FirstChild );
}
// check if pTempWin is not null, otherwise use the
@@ -952,7 +952,7 @@ static sal_Int32 CountDPIScaleFactor(sal_Int32 nDPI)
void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData )
{
- SAL_WARN_IF( !mpWindowImpl->mbFrame && !pParent && GetType() != WINDOW_FIXEDIMAGE, "vcl.window",
+ SAL_WARN_IF( !mpWindowImpl->mbFrame && !pParent && GetType() != WindowType::FIXEDIMAGE, "vcl.window",
"Window::Window(): pParent == NULL" );
ImplSVData* pSVData = ImplGetSVData();
@@ -1012,9 +1012,9 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
// check for undecorated floating window
if( // 1. floating windows that are not moveable/sizeable (only closeable allowed)
( !(nFrameStyle & ~SalFrameStyleFlags::CLOSEABLE) &&
- ( mpWindowImpl->mbFloatWin || ((GetType() == WINDOW_BORDERWINDOW) && static_cast<ImplBorderWindow*>(this)->mbFloatWindow) || (nStyle & WB_SYSTEMFLOATWIN) ) ) ||
+ ( mpWindowImpl->mbFloatWin || ((GetType() == WindowType::BORDERWINDOW) && static_cast<ImplBorderWindow*>(this)->mbFloatWindow) || (nStyle & WB_SYSTEMFLOATWIN) ) ) ||
// 2. borderwindows of floaters with ownerdraw decoration
- ( ((GetType() == WINDOW_BORDERWINDOW) && static_cast<ImplBorderWindow*>(this)->mbFloatWindow && (nStyle & WB_OWNERDRAWDECORATION) ) ) )
+ ( ((GetType() == WindowType::BORDERWINDOW) && static_cast<ImplBorderWindow*>(this)->mbFloatWindow && (nStyle & WB_OWNERDRAWDECORATION) ) ) )
{
nFrameStyle = SalFrameStyleFlags::FLOAT;
if( nStyle & WB_OWNERDRAWDECORATION )
@@ -1036,15 +1036,15 @@ void Window::ImplInit( vcl::Window* pParent, WinBits nStyle, SystemParentData* p
switch (mpWindowImpl->mnType)
{
- case WINDOW_DIALOG:
- case WINDOW_TABDIALOG:
- case WINDOW_MODALDIALOG:
- case WINDOW_MODELESSDIALOG:
- case WINDOW_MESSBOX:
- case WINDOW_INFOBOX:
- case WINDOW_WARNINGBOX:
- case WINDOW_ERRORBOX:
- case WINDOW_QUERYBOX:
+ case WindowType::DIALOG:
+ case WindowType::TABDIALOG:
+ case WindowType::MODALDIALOG:
+ case WindowType::MODELESSDIALOG:
+ case WindowType::MESSBOX:
+ case WindowType::INFOBOX:
+ case WindowType::WARNINGBOX:
+ case WindowType::ERRORBOX:
+ case WindowType::QUERYBOX:
nFrameStyle |= SalFrameStyleFlags::DIALOG;
break;
default:
@@ -2038,7 +2038,7 @@ void Window::SetBorderStyle( WindowBorderStyle nBorderStyle )
}
else
{
- if ( mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW )
+ if ( mpWindowImpl->mpBorderWindow->GetType() == WindowType::BORDERWINDOW )
static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->SetBorderStyle( nBorderStyle );
else
mpWindowImpl->mpBorderWindow->SetBorderStyle( nBorderStyle );
@@ -2051,7 +2051,7 @@ WindowBorderStyle Window::GetBorderStyle() const
if ( mpWindowImpl->mpBorderWindow )
{
- if ( mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW )
+ if ( mpWindowImpl->mpBorderWindow->GetType() == WindowType::BORDERWINDOW )
return static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->GetBorderStyle();
else
return mpWindowImpl->mpBorderWindow->GetBorderStyle();
@@ -2065,7 +2065,7 @@ long Window::CalcTitleWidth() const
if ( mpWindowImpl->mpBorderWindow )
{
- if ( mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW )
+ if ( mpWindowImpl->mpBorderWindow->GetType() == WindowType::BORDERWINDOW )
return static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->CalcTitleWidth();
else
return mpWindowImpl->mpBorderWindow->CalcTitleWidth();
@@ -2448,7 +2448,7 @@ void Window::Enable( bool bEnable, bool bChild )
if ( mpWindowImpl->mpBorderWindow )
{
mpWindowImpl->mpBorderWindow->Enable( bEnable, false );
- if ( (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) &&
+ if ( (mpWindowImpl->mpBorderWindow->GetType() == WindowType::BORDERWINDOW) &&
static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->mpMenuBarWindow )
static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->mpMenuBarWindow->Enable( bEnable );
}
@@ -2510,7 +2510,7 @@ void Window::EnableInput( bool bEnable, bool bChild )
if ( mpWindowImpl->mpBorderWindow )
{
mpWindowImpl->mpBorderWindow->EnableInput( bEnable, false );
- if ( (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) &&
+ if ( (mpWindowImpl->mpBorderWindow->GetType() == WindowType::BORDERWINDOW) &&
static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->mpMenuBarWindow )
static_cast<ImplBorderWindow*>(mpWindowImpl->mpBorderWindow.get())->mpMenuBarWindow->EnableInput( bEnable );
}
@@ -2697,7 +2697,7 @@ void Window::SetActivateMode( ActivateModeFlags nMode )
// possibly trigger Decativate/Activate
if ( mpWindowImpl->mnActivateMode != ActivateModeFlags::NONE )
{
- if ( (mpWindowImpl->mbActive || (GetType() == WINDOW_BORDERWINDOW)) &&
+ if ( (mpWindowImpl->mbActive || (GetType() == WindowType::BORDERWINDOW)) &&
!HasChildPathFocus( true ) )
{
mpWindowImpl->mbActive = false;
@@ -2706,7 +2706,7 @@ void Window::SetActivateMode( ActivateModeFlags nMode )
}
else
{
- if ( !mpWindowImpl->mbActive || (GetType() == WINDOW_BORDERWINDOW) )
+ if ( !mpWindowImpl->mbActive || (GetType() == WindowType::BORDERWINDOW) )
{
mpWindowImpl->mbActive = true;
Activate();
@@ -2962,7 +2962,7 @@ Rectangle Window::ImplGetWindowExtentsRelative( vcl::Window *pRelativeWindow, bo
aPos.Y() += g.nY;
Size aSize ( pWin->GetSizePixel() );
// #104088# do not add decoration to the workwindow to be compatible to java accessibility api
- if( !bClientOnly && (mpWindowImpl->mbFrame || (mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame && GetType() != WINDOW_WORKWINDOW)) )
+ if( !bClientOnly && (mpWindowImpl->mbFrame || (mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame && GetType() != WindowType::WORKWINDOW)) )
{
aPos.X() -= g.nLeftDecoration;
aPos.Y() -= g.nTopDecoration;
@@ -3125,7 +3125,7 @@ const OUString& Window::GetHelpText() const
if ( !mpWindowImpl->maHelpText.getLength() && bStrHelpId )
{
- if ( !IsDialog() && (mpWindowImpl->mnType != WINDOW_TABPAGE) && (mpWindowImpl->mnType != WINDOW_FLOATINGWINDOW) )
+ if ( !IsDialog() && (mpWindowImpl->mnType != WindowType::TABPAGE) && (mpWindowImpl->mnType != WindowType::FLOATINGWINDOW) )
{
Help* pHelp = Application::GetHelp();
if ( pHelp )
@@ -3422,7 +3422,7 @@ bool Window::IsScrollable() const
VclPtr< vcl::Window > pChild = mpWindowImpl->mpFirstChild;
while( pChild )
{
- if( pChild->GetType() == WINDOW_SCROLLBAR )
+ if( pChild->GetType() == WindowType::SCROLLBAR )
return true;
else
pChild = pChild->mpWindowImpl->mpNext;
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index ed43771a8c0d..9882ce3e3e77 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1029,7 +1029,7 @@ WindowType Window::GetType() const
if (mpWindowImpl)
return mpWindowImpl->mnType;
else
- return 0;
+ return WindowType::NONE;
}
Dialog* Window::GetParentDialog() const
@@ -1341,7 +1341,7 @@ namespace
{
bSomeoneCares = true;
}
- else if (pWindow->GetType() == WINDOW_TABCONTROL)
+ else if (pWindow->GetType() == WindowType::TABCONTROL)
{
bSomeoneCares = true;
}
diff --git a/vcl/source/window/window3.cxx b/vcl/source/window/window3.cxx
index aa5c1f9d3ab9..283aee05918e 100644
--- a/vcl/source/window/window3.cxx
+++ b/vcl/source/window/window3.cxx
@@ -38,10 +38,10 @@ void Window::ImplAdjustNWFSizes()
{
switch( GetType() )
{
- case WINDOW_CHECKBOX:
+ case WindowType::CHECKBOX:
static_cast<CheckBox*>(this)->ImplSetMinimumNWFSize();
break;
- case WINDOW_RADIOBUTTON:
+ case WindowType::RADIOBUTTON:
static_cast<RadioButton*>(this)->ImplSetMinimumNWFSize();
break;
default:
diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index 8faf66faba0b..55efefd60e63 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -1713,8 +1713,8 @@ static void ImplActivateFloatingWindows( vcl::Window* pWindow, bool bActive )
{
if ( pTempWindow->GetActivateMode() == ActivateModeFlags::NONE )
{
- if ( (pTempWindow->GetType() == WINDOW_BORDERWINDOW) &&
- (pTempWindow->ImplGetWindow()->GetType() == WINDOW_FLOATINGWINDOW) )
+ if ( (pTempWindow->GetType() == WindowType::BORDERWINDOW) &&
+ (pTempWindow->ImplGetWindow()->GetType() == WindowType::FLOATINGWINDOW) )
static_cast<ImplBorderWindow*>(pTempWindow)->SetDisplayActive( bActive );
}
@@ -2178,7 +2178,7 @@ static bool ImplHandleShowDialog( vcl::Window* pWindow, ShowDialogId nDialogId )
if( ! pWindow )
return false;
- if( pWindow->GetType() == WINDOW_BORDERWINDOW )
+ if( pWindow->GetType() == WindowType::BORDERWINDOW )
{
vcl::Window* pWrkWin = pWindow->GetWindow( GetWindowType::Client );
if( pWrkWin )
diff --git a/vcl/source/window/wrkwin.cxx b/vcl/source/window/wrkwin.cxx
index 9c51ba1a913b..ff7bd64cce91 100644
--- a/vcl/source/window/wrkwin.cxx
+++ b/vcl/source/window/wrkwin.cxx
@@ -91,14 +91,14 @@ WorkWindow::WorkWindow( WindowType nType ) :
}
WorkWindow::WorkWindow( vcl::Window* pParent, WinBits nStyle ) :
- SystemWindow( WINDOW_WORKWINDOW )
+ SystemWindow( WindowType::WORKWINDOW )
{
ImplInitWorkWindowData();
ImplInit( pParent, nStyle );
}
WorkWindow::WorkWindow( vcl::Window* pParent, const css::uno::Any& aSystemWorkWindowToken, WinBits nStyle ) :
- SystemWindow( WINDOW_WORKWINDOW )
+ SystemWindow( WindowType::WORKWINDOW )
{
ImplInitWorkWindowData();
mbSysChild = true;
@@ -106,7 +106,7 @@ WorkWindow::WorkWindow( vcl::Window* pParent, const css::uno::Any& aSystemWorkWi
}
WorkWindow::WorkWindow( SystemParentData* pParent ) :
- SystemWindow( WINDOW_WORKWINDOW )
+ SystemWindow( WindowType::WORKWINDOW )
{
ImplInitWorkWindowData();
mbSysChild = true;
diff --git a/vcl/unx/gtk/a11y/atkfactory.cxx b/vcl/unx/gtk/a11y/atkfactory.cxx
index 2f51f14b3af2..8ddfe056d3b6 100644
--- a/vcl/unx/gtk/a11y/atkfactory.cxx
+++ b/vcl/unx/gtk/a11y/atkfactory.cxx
@@ -134,7 +134,7 @@ wrapper_factory_create_accessible( GObject *obj )
vcl::Window* pWindow = pFrameWindow;
// skip accessible objects already exposed by the frame objects
- if( WINDOW_BORDERWINDOW == pWindow->GetType() )
+ if( WindowType::BORDERWINDOW == pWindow->GetType() )
pWindow = pFrameWindow->GetAccessibleChildWindow(0);
if( pWindow )
diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx
index 22b7e602cbff..42f635ec966e 100644
--- a/vcl/unx/gtk/a11y/atkutil.cxx
+++ b/vcl/unx/gtk/a11y/atkutil.cxx
@@ -524,14 +524,14 @@ static void handle_get_focus(::VclWindowEvent const * pEvent)
vcl::Window *pWindow = pEvent->GetWindow();
// The menu bar is handled through VclEventId::MenuHighlightED
- if( ! pWindow || !pWindow->IsReallyVisible() || pWindow->GetType() == WINDOW_MENUBARWINDOW )
+ if( ! pWindow || !pWindow->IsReallyVisible() || pWindow->GetType() == WindowType::MENUBARWINDOW )
return;
// ToolBoxes are handled through VclEventId::ToolboxHighlight
- if( pWindow->GetType() == WINDOW_TOOLBOX )
+ if( pWindow->GetType() == WindowType::TOOLBOX )
return;
- if( pWindow->GetType() == WINDOW_TABCONTROL )
+ if( pWindow->GetType() == WindowType::TABCONTROL )
{
handle_tabpage_activated( pWindow );
return;
@@ -559,7 +559,7 @@ static void handle_get_focus(::VclWindowEvent const * pEvent)
* need to add listeners to the children instead of re-using the tabpage stuff
*/
if( xStateSet->contains(accessibility::AccessibleStateType::FOCUSED) &&
- ( pWindow->GetType() != WINDOW_TREELISTBOX ) )
+ ( pWindow->GetType() != WindowType::TREELISTBOX ) )
{
atk_wrapper_focus_tracker_notify_when_idle( xAccessible );
}
diff --git a/vcl/unx/gtk/a11y/atkwindow.cxx b/vcl/unx/gtk/a11y/atkwindow.cxx
index af677fa03ea7..24b464299de2 100644
--- a/vcl/unx/gtk/a11y/atkwindow.cxx
+++ b/vcl/unx/gtk/a11y/atkwindow.cxx
@@ -72,7 +72,7 @@ init_from_window( AtkObject *accessible, vcl::Window *pWindow )
*/
case AccessibleRole::WINDOW:
{
- sal_uInt16 type = WINDOW_WINDOW;
+ WindowType type = WindowType::WINDOW;
bool parentIsMenuFloatingWindow = false;
vcl::Window *pParent = pWindow->GetParent();
@@ -81,8 +81,8 @@ init_from_window( AtkObject *accessible, vcl::Window *pWindow )
parentIsMenuFloatingWindow = pParent->IsMenuFloatingWindow();
}
- if( (WINDOW_LISTBOX != type) && (WINDOW_COMBOBOX != type) &&
- (WINDOW_MENUBARWINDOW != type) && ! parentIsMenuFloatingWindow )
+ if( (WindowType::LISTBOX != type) && (WindowType::COMBOBOX != type) &&
+ (WindowType::MENUBARWINDOW != type) && ! parentIsMenuFloatingWindow )
{
role = ATK_ROLE_WINDOW;
}
@@ -94,13 +94,13 @@ init_from_window( AtkObject *accessible, vcl::Window *pWindow )
vcl::Window *pChild = pWindow->GetWindow(GetWindowType::FirstChild);
if( pChild )
{
- if( WINDOW_HELPTEXTWINDOW == pChild->GetType() )
+ if( WindowType::HELPTEXTWINDOW == pChild->GetType() )
{
role = ATK_ROLE_TOOL_TIP;
pChild->SetAccessibleRole( AccessibleRole::LABEL );
accessible->name = g_strdup( OUStringToOString( pChild->GetText(), RTL_TEXTENCODING_UTF8 ).getStr() );
}
- else if ( pWindow->GetType() == WINDOW_BORDERWINDOW && pChild->GetType() == WINDOW_FLOATINGWINDOW )
+ else if ( pWindow->GetType() == WindowType::BORDERWINDOW && pChild->GetType() == WindowType::FLOATINGWINDOW )
{
PopupMenuFloatingWindow* p = dynamic_cast<PopupMenuFloatingWindow*>(pChild);
if (p && p->IsPopupMenu() && p->GetMenuStackLevel() == 0)
@@ -165,7 +165,7 @@ isChildPopupMenu(vcl::Window* pWindow)
if (!pChild)
return false;
- if (WINDOW_FLOATINGWINDOW != pChild->GetType())
+ if (WindowType::FLOATINGWINDOW != pChild->GetType())
return false;
PopupMenuFloatingWindow* p = dynamic_cast<PopupMenuFloatingWindow*>(pChild);
@@ -194,7 +194,7 @@ ooo_window_wrapper_real_initialize(AtkObject *obj, gpointer data)
* in the wrapper registry when atk traverses the hierarchy up on
* focus events
*/
- if( WINDOW_BORDERWINDOW == pWindow->GetType() )
+ if( WindowType::BORDERWINDOW == pWindow->GetType() )
{
if ( isChildPopupMenu(pWindow) )
{
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index c4b6d926ea83..291f3eeb3a1c 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -199,7 +199,7 @@ void ImplSalGetWorkArea( HWND hWnd, RECT *pRect, const RECT *pParentRect )
vcl::Window *pWin = pFrame->GetWindow();
while( pWin )
{
- WorkWindow *pWorkWin = (pWin->GetType() == WINDOW_WORKWINDOW) ? static_cast<WorkWindow *>(pWin) : nullptr;
+ WorkWindow *pWorkWin = (pWin->GetType() == WindowType::WORKWINDOW) ? static_cast<WorkWindow *>(pWin) : nullptr;
if( pWorkWin && pWorkWin->ImplGetWindowImpl()->mbReallyVisible && pWorkWin->IsFullScreenMode() )
{
bIgnoreTaskbar = true;
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index a41337a3c1b5..a24139dcc3fb 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -1964,7 +1964,7 @@ class DemoPopup : public FloatingWindow
public:
DemoPopup() : FloatingWindow( nullptr, WB_SYSTEMWINDOW|WB_TOOLTIPWIN)
{
- SetType( WINDOW_HELPTEXTWINDOW );
+ SetType( WindowType::HELPTEXTWINDOW );
SetOutputSizePixel( Size( 300, 30 ) );
SetBackground(Wallpaper(COL_YELLOW));