Convert WindowType to scoped enum

Change-Id: I85cfe02f28729e13f2c0dd3d91cd89e6f3e3b6a9
Reviewed-on: https://gerrit.libreoffice.org/34219
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin 2017-02-13 19:08:14 +02:00
parent 5815ca4ef1
commit 8c00536d87
107 changed files with 970 additions and 971 deletions

View File

@ -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?

View File

@ -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 ));
}

View File

@ -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 );
}

View File

@ -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 )
{

View File

@ -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 )

View File

@ -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() );

View File

@ -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);

View File

@ -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() ) );

View File

@ -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( );

View File

@ -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;

View File

@ -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;

View File

@ -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());

View File

@ -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();

View File

@ -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() );

View File

@ -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);
}

View File

@ -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;

View File

@ -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());

View File

@ -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 );
}

View File

@ -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() )

View File

@ -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 ) );

View File

@ -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 );
}

View File

@ -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

View File

@ -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)

View File

@ -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 );
}
}

View File

@ -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);
}

View File

@ -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();

View File

@ -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 ) );

View File

@ -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);

View File

@ -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()));

View File

@ -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();

View File

@ -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 ) :

View File

@ -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);

View File

@ -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();

View File

@ -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 );
}
}

View File

@ -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++)

View File

@ -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();

View File

@ -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))

View File

@ -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();
}

View File

@ -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 );

View File

@ -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();

View File

@ -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");

View File

@ -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())

View File

@ -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 )
{

View File

@ -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" ) )
{

View File

@ -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;
WinBits nStyle = pWindow->GetStyle();
nStyle &= ~(WB_HORZ|WB_VERT);
if ( nOrientation == 0 )
nStyle |= WB_HORZ;
else
nStyle |= WB_VERT;
pWindow->SetStyle( nStyle );
}
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();

View File

@ -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";

View File

@ -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 );
}

View File

@ -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 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 WINDOW_SYSWINDOW:
case WINDOW_WORKWINDOW:
case WINDOW_DOCKINGWINDOW:
case WINDOW_FLOATINGWINDOW:
case WINDOW_HELPTEXTWINDOW: return new VCLXTopWindow;
case WindowType::SYSWINDOW:
case WindowType::WORKWINDOW:
case WindowType::DOCKINGWINDOW:
case WindowType::FLOATINGWINDOW:
case WindowType::HELPTEXTWINDOW: return new VCLXTopWindow;
case WINDOW_WINDOW:
case WINDOW_TABPAGE: return new VCLXContainer;
case WindowType::WINDOW:
case WindowType::TABPAGE: return new VCLXContainer;
case WINDOW_TOOLBOX: return new VCLXToolBox;
case WINDOW_TABCONTROL: return new VCLXMultiPage;
case WindowType::TOOLBOX: return new VCLXToolBox;
case WindowType::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::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 );
}
}

View File

@ -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 );
}

View File

@ -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;

View File

@ -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 );

View File

@ -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();

View File

@ -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 );

View File

@ -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 );
}
}

View File

@ -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 );
}

View File

@ -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 );
}

View File

@ -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 );

View File

@ -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 );

View File

@ -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)

View File

@ -69,7 +69,7 @@ void MoreButton::ShowState()
}
MoreButton::MoreButton( vcl::Window* pParent, WinBits nStyle ) :
PushButton( WINDOW_MOREBUTTON )
PushButton( WindowType::MOREBUTTON )
{
ImplInit( pParent, nStyle );
}

View File

@ -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))

View File

@ -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 );
}

View File

@ -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 );
}

View File

@ -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);

View File

@ -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);

View File

@ -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") );

View File

@ -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;

View File

@ -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);

View File

@ -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 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 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 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 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 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 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 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 WINDOW_RADIOBUTTON: nRole = accessibility::AccessibleRole::RADIO_BUTTON; break;
case WINDOW_TRISTATEBOX:
case WINDOW_CHECKBOX: nRole = accessibility::AccessibleRole::CHECK_BOX; break;
case WindowType::RADIOBUTTON: nRole = accessibility::AccessibleRole::RADIO_BUTTON; break;
case WindowType::TRISTATEBOX:
case WindowType::CHECKBOX: nRole = accessibility::AccessibleRole::CHECK_BOX; break;
case WINDOW_MULTILINEEDIT: nRole = accessibility::AccessibleRole::SCROLL_PANE; break;
case WindowType::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 WindowType::PATTERNFIELD:
case WindowType::CALCINPUTLINE:
case WindowType::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 WindowType::PATTERNBOX:
case WindowType::NUMERICBOX:
case WindowType::METRICBOX:
case WindowType::CURRENCYBOX:
case WindowType::LONGCURRENCYBOX:
case WindowType::COMBOBOX: nRole = accessibility::AccessibleRole::COMBO_BOX; break;
case WINDOW_LISTBOX:
case WINDOW_MULTILISTBOX: nRole = accessibility::AccessibleRole::LIST; break;
case WindowType::LISTBOX:
case WindowType::MULTILISTBOX: nRole = accessibility::AccessibleRole::LIST; break;
case WINDOW_TREELISTBOX: nRole = accessibility::AccessibleRole::TREE; break;
case WindowType::TREELISTBOX: nRole = accessibility::AccessibleRole::TREE; break;
case WINDOW_FIXEDTEXT: nRole = accessibility::AccessibleRole::LABEL; break;
case WINDOW_FIXEDLINE:
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 WindowType::MULTILINEEDIT:
case WindowType::PATTERNFIELD:
case WindowType::NUMERICFIELD:
case WindowType::METRICFIELD:
case WindowType::CURRENCYFIELD:
case WindowType::LONGCURRENCYFIELD:
case WindowType::CALCINPUTLINE:
case WindowType::EDIT:
case WINDOW_DATEBOX:
case WINDOW_TIMEBOX:
case WINDOW_CURRENCYBOX:
case WINDOW_LONGCURRENCYBOX:
case WINDOW_DATEFIELD:
case WINDOW_TIMEFIELD:
case WINDOW_SPINFIELD:
case WindowType::DATEBOX:
case WindowType::TIMEBOX:
case WindowType::CURRENCYBOX:
case WindowType::LONGCURRENCYBOX:
case WindowType::DATEFIELD:
case WindowType::TIMEFIELD:
case WindowType::SPINFIELD:
case WINDOW_COMBOBOX:
case WINDOW_LISTBOX:
case WINDOW_MULTILISTBOX:
case WINDOW_TREELISTBOX:
case WINDOW_METRICBOX:
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();

View File

@ -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 );
}

View File

@ -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 ) );
}

View File

@ -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())

View File

@ -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

View File

@ -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 );

View File

@ -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)
{
}

View File

@ -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
{

View File

@ -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 );

View File

@ -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;

View File

@ -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();

View File

@ -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 )

View File

@ -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)

View File

@ -32,7 +32,7 @@ void IntroWindow::ImplInitIntroWindowData()
}
IntroWindow::IntroWindow( ) :
WorkWindow( WINDOW_INTROWINDOW )
WorkWindow( WindowType::INTROWINDOW )
{
ImplInitIntroWindowData();
WorkWindow::ImplInit( nullptr, WB_INTROWIN );

View File

@ -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:

View File

@ -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;

View File

@ -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 &&

View File

@ -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 )

View File

@ -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 );
}

View File

@ -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 ),

View File

@ -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" );

View File

@ -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 );
}

View File

@ -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 );
}

View File

@ -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 );
}

View File

@ -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 );

View File

@ -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;
}

View File

@ -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;

View File

@ -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;

View File

@ -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();
}

View File

@ -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;

View File

@ -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;
}

View File

@ -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:

Some files were not shown because too many files have changed in this diff Show More