diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-21 15:52:27 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-05-29 20:16:52 +0200 |
commit | a5e58e66d82a63d99ced4ed8a42c38ed6179aa6c (patch) | |
tree | 234325db56cadde360176607258cdf98d2db7826 | |
parent | cfd5cbae2871e45c60d3df24e954708d2f0d4b94 (diff) |
convert WINDOW constants for GetWindow() methods to scoped enum
Change-Id: I0c7c6d095732704eb4ab48f1277a0592b1c7fa33
Signed-off-by: Jan Holesovsky <kendy@collabora.com>
57 files changed, 233 insertions, 230 deletions
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx index cf6021e63106..6146c5db89b8 100644 --- a/cui/source/options/treeopt.cxx +++ b/cui/source/options/treeopt.cxx @@ -1147,7 +1147,7 @@ void OfaTreeOptionsDialog::SelectHdl_Impl() OString sHelpId(HID_OFADLG_TREELISTBOX); if (::isLayoutEnabled(pNewPage)) { - vcl::Window *pFirstChild = pNewPage->GetWindow(WINDOW_FIRSTCHILD); + vcl::Window *pFirstChild = pNewPage->GetWindow(GetWindowType::FirstChild); assert(pFirstChild); sHelpId = pFirstChild->GetHelpId(); } diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx index a103e81718e1..8b43ab4cfe7b 100644 --- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx @@ -138,13 +138,13 @@ namespace dbaui vcl::Window* pControl = pThisSection; while ( ( pControl != pNextSection ) && pControl ) { - vcl::Window* pRealWindow = pControl->GetWindow( WINDOW_CLIENT ); + vcl::Window* pRealWindow = pControl->GetWindow( GetWindowType::Client ); #if OSL_DEBUG_LEVEL > 0 OUString sWindowText( pRealWindow->GetText() ); (void)sWindowText; #endif pRealWindow->Hide(); - pControl = pControl->GetWindow( WINDOW_NEXT ); + pControl = pControl->GetWindow( GetWindowType::Next ); } } diff --git a/include/vcl/layout.hxx b/include/vcl/layout.hxx index e73399c1abf1..813999a794b0 100644 --- a/include/vcl/layout.hxx +++ b/include/vcl/layout.hxx @@ -760,21 +760,21 @@ VCL_DLLPUBLIC Size bestmaxFrameSizeForScreenSize(const Size &rScreenSize); //Get first window of a pTopLevel window as //if any intermediate layout widgets didn't exist -//i.e. acts like pChild = pChild->GetWindow(WINDOW_FIRSTCHILD); +//i.e. acts like pChild = pChild->GetWindow(GetWindowType::FirstChild); //in a flat hierarchy where dialogs only have one layer //of children VCL_DLLPUBLIC vcl::Window* firstLogicalChildOfParent(vcl::Window *pTopLevel); //Get next window after pChild of a pTopLevel window as //if any intermediate layout widgets didn't exist -//i.e. acts like pChild = pChild->GetWindow(WINDOW_NEXT); +//i.e. acts like pChild = pChild->GetWindow(GetWindowType::Next); //in a flat hierarchy where dialogs only have one layer //of children VCL_DLLPUBLIC vcl::Window* nextLogicalChildOfParent(vcl::Window *pTopLevel, vcl::Window *pChild); //Get previous window before pChild of a pTopLevel window as //if any intermediate layout widgets didn't exist -//i.e. acts like pChild = pChild->GetWindow(WINDOW_PREV); +//i.e. acts like pChild = pChild->GetWindow(GetWindowType::Prev); //in a flat hierarchy where dialogs only have one layer //of children VCL_DLLPUBLIC vcl::Window* prevLogicalChildOfParent(vcl::Window *pTopLevel, vcl::Window *pChild); diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 4b167a313363..3078b4260ae5 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -127,23 +127,26 @@ namespace o3tl // Type fuer GetWindow() -#define WINDOW_PARENT ((sal_uInt16)0) -#define WINDOW_FIRSTCHILD ((sal_uInt16)1) -#define WINDOW_LASTCHILD ((sal_uInt16)2) -#define WINDOW_PREV ((sal_uInt16)3) -#define WINDOW_NEXT ((sal_uInt16)4) -#define WINDOW_FIRSTOVERLAP ((sal_uInt16)5) -#define WINDOW_LASTOVERLAP ((sal_uInt16)6) -#define WINDOW_OVERLAP ((sal_uInt16)7) -#define WINDOW_PARENTOVERLAP ((sal_uInt16)8) -#define WINDOW_CLIENT ((sal_uInt16)9) -#define WINDOW_REALPARENT ((sal_uInt16)10) -#define WINDOW_FRAME ((sal_uInt16)11) -#define WINDOW_BORDER ((sal_uInt16)12) -#define WINDOW_FIRSTTOPWINDOWCHILD ((sal_uInt16)13) -#define WINDOW_LASTTOPWINDOWCHILD ((sal_uInt16)14) -#define WINDOW_PREVTOPWINDOWSIBLING ((sal_uInt16)15) -#define WINDOW_NEXTTOPWINDOWSIBLING ((sal_uInt16)16) +enum class GetWindowType +{ + Parent = 0, + FirstChild = 1, + LastChild = 2, + Prev = 3, + Next = 4, + FirstOverlap = 5, + LastOverlap = 6, + Overlap = 7, + ParentOverlap = 8, + Client = 9, + RealParent = 10, + Frame = 11, + Border = 12, + FirstTopWindowChild = 13, + LastTopWindowChild = 14, + PrevTopWindowSibling = 15, + NextTopWindowSibling = 16, +}; // Flags for setPosSizePixel() #define WINDOW_POSSIZE_X ((sal_uInt16)0x0001) @@ -1119,7 +1122,7 @@ public: sal_uInt16 GetChildCount() const; vcl::Window* GetChild( sal_uInt16 nChild ) const; - vcl::Window* GetWindow( sal_uInt16 nType ) const; + vcl::Window* GetWindow( GetWindowType nType ) const; bool IsChild( const vcl::Window* pWindow, bool bSystemWindow = false ) const; bool IsWindowOrChild( const vcl::Window* pWindow, bool bSystemWindow = false ) const; @@ -1249,8 +1252,8 @@ private: SAL_DLLPRIVATE bool ImplIsAccessibleCandidate() const; SAL_DLLPRIVATE bool ImplIsAccessibleNativeFrame() const; - SAL_DLLPRIVATE sal_uInt16 ImplGetAccessibleCandidateChildWindowCount( sal_uInt16 nFirstWindowType ) const; - SAL_DLLPRIVATE vcl::Window* ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uInt16& rChildCount, sal_uInt16 nFirstWindowType, bool bTopLevel = true ) const; + SAL_DLLPRIVATE sal_uInt16 ImplGetAccessibleCandidateChildWindowCount( GetWindowType nFirstWindowType ) const; + SAL_DLLPRIVATE vcl::Window* ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uInt16& rChildCount, GetWindowType nFirstWindowType, bool bTopLevel = true ) const; SAL_DLLPRIVATE bool ImplRegisterAccessibleNativeFrame(); SAL_DLLPRIVATE void ImplRevokeAccessibleNativeFrame(); ///@} diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx index 34ecb427fab9..aab5194546b7 100644 --- a/sc/source/ui/miscdlgs/anyrefdg.cxx +++ b/sc/source/ui/miscdlgs/anyrefdg.cxx @@ -421,8 +421,8 @@ namespace void hideUnless(vcl::Window *pTop, const winset& rVisibleWidgets, std::vector<VclPtr<vcl::Window> > &rWasVisibleWidgets) { - for (vcl::Window* pChild = pTop->GetWindow(WINDOW_FIRSTCHILD); pChild; - pChild = pChild->GetWindow(WINDOW_NEXT)) + for (vcl::Window* pChild = pTop->GetWindow(GetWindowType::FirstChild); pChild; + pChild = pChild->GetWindow(GetWindowType::Next)) { if (!pChild->IsVisible()) continue; @@ -489,10 +489,10 @@ void ScFormulaReferenceHelper::RefInputStart( formula::RefEdit* pEdit, formula:: if (!mbOldDlgLayoutEnabled) { - for (vcl::Window* pChild = m_pWindow->GetWindow(WINDOW_FIRSTCHILD); pChild; - pChild = pChild->GetWindow(WINDOW_NEXT)) + for (vcl::Window* pChild = m_pWindow->GetWindow(GetWindowType::FirstChild); pChild; + pChild = pChild->GetWindow(GetWindowType::Next)) { - vcl::Window *pWin = pChild->GetWindow(WINDOW_CLIENT); + vcl::Window *pWin = pChild->GetWindow(GetWindowType::Client); if (pWin == (vcl::Window*)pRefEdit || pWin == (vcl::Window*)pRefBtn) continue; // do nothing else if (pWin->IsVisible()) @@ -512,7 +512,7 @@ void ScFormulaReferenceHelper::RefInputStart( formula::RefEdit* pEdit, formula:: vcl::Window *pContentArea = pResizeDialog->get_content_area(); for (vcl::Window *pCandidate = pRefEdit; pCandidate && (pCandidate != pContentArea && pCandidate->IsVisible()); - pCandidate = pCandidate->GetWindow(WINDOW_REALPARENT)) + pCandidate = pCandidate->GetWindow(GetWindowType::RealParent)) { m_aVisibleWidgets.insert(pCandidate); } @@ -520,7 +520,7 @@ void ScFormulaReferenceHelper::RefInputStart( formula::RefEdit* pEdit, formula:: //shared parent in the existing widgets for (vcl::Window *pCandidate = pRefBtn; pCandidate && (pCandidate != pContentArea && pCandidate->IsVisible()); - pCandidate = pCandidate->GetWindow(WINDOW_REALPARENT)) + pCandidate = pCandidate->GetWindow(GetWindowType::RealParent)) { if (m_aVisibleWidgets.insert(pCandidate).second) break; diff --git a/sc/source/ui/miscdlgs/retypepassdlg.cxx b/sc/source/ui/miscdlgs/retypepassdlg.cxx index ce482a3a2156..ba02adcacfb8 100644 --- a/sc/source/ui/miscdlgs/retypepassdlg.cxx +++ b/sc/source/ui/miscdlgs/retypepassdlg.cxx @@ -72,11 +72,11 @@ void ScRetypePassDlg::DeleteSheets() for(auto it = maSheets.begin(); it != maSheets.end(); ++it) { VclPtr<vcl::Window> pWindow = (*it); - vcl::Window *pChild = pWindow->GetWindow(WINDOW_FIRSTCHILD); + vcl::Window *pChild = pWindow->GetWindow(GetWindowType::FirstChild); while (pChild) { VclPtr<vcl::Window> pOldChild = pChild; - pChild = pChild->GetWindow(WINDOW_NEXT); + pChild = pChild->GetWindow(GetWindowType::Next); pOldChild.disposeAndClear(); } pWindow.disposeAndClear(); diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 32b091ca3bfc..c31d2466b228 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -370,7 +370,7 @@ void ScFilterFloatingWindow::dispose() vcl::Window* ScFilterFloatingWindow::GetPreferredKeyInputWindow() { // redirect keyinput in the child window - return GetWindow(WINDOW_FIRSTCHILD) ? GetWindow(WINDOW_FIRSTCHILD)->GetPreferredKeyInputWindow() : NULL; // will be the FilterBox + return GetWindow(GetWindowType::FirstChild) ? GetWindow(GetWindowType::FirstChild)->GetPreferredKeyInputWindow() : NULL; // will be the FilterBox } static bool lcl_IsEditableMatrix( ScDocument* pDoc, const ScRange& rRange ) diff --git a/sd/source/ui/annotations/annotationtag.cxx b/sd/source/ui/annotations/annotationtag.cxx index 606bddbdaf07..530102903100 100644 --- a/sd/source/ui/annotations/annotationtag.cxx +++ b/sd/source/ui/annotations/annotationtag.cxx @@ -577,7 +577,7 @@ void AnnotationTag::OpenPopup( bool bEdit ) Rectangle aRect( aPos, maSize ); - mpAnnotationWindow.reset( VclPtr<AnnotationWindow>::Create( mrManager, mrView.GetDocSh(), pWindow->GetWindow(WINDOW_FRAME) ) ); + mpAnnotationWindow.reset( VclPtr<AnnotationWindow>::Create( mrManager, mrView.GetDocSh(), pWindow->GetWindow(GetWindowType::Frame) ) ); mpAnnotationWindow->InitControls(); mpAnnotationWindow->setAnnotation(mxAnnotation); diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index e6c3b2b19856..70d287e7a7d8 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -1643,7 +1643,7 @@ IMPL_LINK_NOARG(SfxHelpIndexWindow_Impl, KeywordHdl) void SfxHelpIndexWindow_Impl::Resize() { - vcl::Window *pChild = GetWindow(WINDOW_FIRSTCHILD); + vcl::Window *pChild = GetWindow(GetWindowType::FirstChild); if (!pChild) return; VclContainer::setLayoutAllocation(*pChild, Point(0,0), GetSizePixel()); @@ -1651,7 +1651,7 @@ void SfxHelpIndexWindow_Impl::Resize() Size SfxHelpIndexWindow_Impl::GetOptimalSize() const { - const vcl::Window *pChild = GetWindow(WINDOW_FIRSTCHILD); + const vcl::Window *pChild = GetWindow(GetWindowType::FirstChild); if (!pChild) return Window::GetOptimalSize(); return VclContainer::getLayoutRequisition(*pChild); diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index 21e56b4c1920..3aa700332458 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -589,7 +589,7 @@ bool SfxHelp::Start_Impl(const OUString& rURL, const vcl::Window* pWindow, const Dialog *pDialog = static_cast<Dialog*>(pParent); TabControl *pCtrl = pDialog->hasBuilder() ? pDialog->get<TabControl>("tabcontrol") : NULL; TabPage* pTabPage = pCtrl ? pCtrl->GetTabPage(pCtrl->GetCurPageId()) : NULL; - vcl::Window *pTabChild = pTabPage ? pTabPage->GetWindow(WINDOW_FIRSTCHILD) : NULL; + vcl::Window *pTabChild = pTabPage ? pTabPage->GetWindow(GetWindowType::FirstChild) : NULL; if (pTabChild) pParent = pTabChild; } diff --git a/sfx2/source/dialog/backingcomp.cxx b/sfx2/source/dialog/backingcomp.cxx index f11d9ffac79d..5c0b6ff6d0d6 100644 --- a/sfx2/source/dialog/backingcomp.cxx +++ b/sfx2/source/dialog/backingcomp.cxx @@ -439,7 +439,7 @@ void SAL_CALL BackingComp::attachFrame( /*IN*/ const css::uno::Reference< css::f if( pParent && pBack ) { long nMenuHeight = 0; - vcl::Window* pMenu = pParent->GetWindow(WINDOW_NEXT); + vcl::Window* pMenu = pParent->GetWindow(GetWindowType::Next); if( pMenu ) nMenuHeight = pMenu->GetSizePixel().Height(); diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index ba15fd4e7deb..d58f8562baa8 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -507,7 +507,7 @@ void BackingWindow::Resize() maStartCentButtons = Rectangle( Point(0, 0), GetOutputSizePixel() ); if (isLayoutEnabled(this)) - VclContainer::setLayoutAllocation(*GetWindow(WINDOW_FIRSTCHILD), + VclContainer::setLayoutAllocation(*GetWindow(GetWindowType::FirstChild), maStartCentButtons.TopLeft(), maStartCentButtons.GetSize()); if (!IsInPaint()) @@ -758,7 +758,7 @@ void BackingWindow::dispatchURL( const OUString& i_rURL, Size BackingWindow::GetOptimalSize() const { if (isLayoutEnabled(this)) - return VclContainer::getLayoutRequisition(*GetWindow(WINDOW_FIRSTCHILD)); + return VclContainer::getLayoutRequisition(*GetWindow(GetWindowType::FirstChild)); return Window::GetOptimalSize(); } diff --git a/sfx2/source/dialog/dialoghelper.cxx b/sfx2/source/dialog/dialoghelper.cxx index e7c0af10a454..e60edb12ba31 100644 --- a/sfx2/source/dialog/dialoghelper.cxx +++ b/sfx2/source/dialog/dialoghelper.cxx @@ -27,8 +27,8 @@ void setPreviewsToSamePlace(vcl::Window *pParent, VclBuilderContainer *pPage) std::vector<vcl::Window*> aGrids; aGrids.push_back(pOurGrid); - for (vcl::Window* pChild = pParent->GetWindow(WINDOW_FIRSTCHILD); pChild; - pChild = pChild->GetWindow(WINDOW_NEXT)) + for (vcl::Window* pChild = pParent->GetWindow(GetWindowType::FirstChild); pChild; + pChild = pChild->GetWindow(GetWindowType::Next)) { VclBuilderContainer *pPeer = dynamic_cast<VclBuilderContainer*>(pChild); if (!pPeer || pPeer == pPage || !pPeer->hasBuilder()) diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index 4957b3b35710..56155ddce018 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -580,9 +580,9 @@ namespace svt vcl::Window *pWin = &aController->GetWindow(); if (!pWin->IsTracking()) { - for (pWin = pWin->GetWindow(WINDOW_FIRSTCHILD); + for (pWin = pWin->GetWindow(GetWindowType::FirstChild); pWin && !pWin->IsTracking(); - pWin = pWin->GetWindow(WINDOW_NEXT)) + pWin = pWin->GetWindow(GetWindowType::Next)) { } } diff --git a/svtools/source/dialogs/wizardmachine.cxx b/svtools/source/dialogs/wizardmachine.cxx index 156159c160ac..ffb47bb6255b 100644 --- a/svtools/source/dialogs/wizardmachine.cxx +++ b/svtools/source/dialogs/wizardmachine.cxx @@ -323,7 +323,7 @@ namespace svt void OWizardMachine::implResetDefault(vcl::Window* _pWindow) { - vcl::Window* pChildLoop = _pWindow->GetWindow(WINDOW_FIRSTCHILD); + vcl::Window* pChildLoop = _pWindow->GetWindow(GetWindowType::FirstChild); while (pChildLoop) { // does the window participate in the tabbing order? @@ -346,7 +346,7 @@ namespace svt } // the next one ... - pChildLoop = pChildLoop->GetWindow(WINDOW_NEXT); + pChildLoop = pChildLoop->GetWindow(GetWindowType::Next); } } diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 2e70850ffa6b..ca3acd9f2a9e 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -2066,7 +2066,7 @@ namespace svxform void DataNavigatorWindow::Resize() { - vcl::Window *pChild = GetWindow(WINDOW_FIRSTCHILD); + vcl::Window *pChild = GetWindow(GetWindowType::FirstChild); if (!pChild) return; VclContainer::setLayoutAllocation(*pChild, Point(0,0), GetSizePixel()); @@ -2074,7 +2074,7 @@ namespace svxform Size DataNavigatorWindow::GetOptimalSize() const { - const vcl::Window *pChild = GetWindow(WINDOW_FIRSTCHILD); + const vcl::Window *pChild = GetWindow(GetWindowType::FirstChild); if (!pChild) return Window::GetOptimalSize(); return VclContainer::getLayoutRequisition(*pChild); diff --git a/svx/source/sidebar/PanelLayout.cxx b/svx/source/sidebar/PanelLayout.cxx index 2535f9b3f00a..1b5173d31e99 100644 --- a/svx/source/sidebar/PanelLayout.cxx +++ b/svx/source/sidebar/PanelLayout.cxx @@ -40,7 +40,7 @@ void PanelLayout::dispose() Size PanelLayout::GetOptimalSize() const { if (isLayoutEnabled(this)) - return VclContainer::getLayoutRequisition(*GetWindow(WINDOW_FIRSTCHILD)); + return VclContainer::getLayoutRequisition(*GetWindow(GetWindowType::FirstChild)); return Control::GetOptimalSize(); } @@ -64,7 +64,7 @@ void PanelLayout::queue_resize(StateChangedType /*eReason*/) IMPL_LINK_NOARG_TYPED( PanelLayout, ImplHandlePanelLayoutTimerHdl, Idle*, void ) { - vcl::Window *pChild = GetWindow(WINDOW_FIRSTCHILD); + vcl::Window *pChild = GetWindow(GetWindowType::FirstChild); assert(pChild); VclContainer::setLayoutAllocation(*pChild, Point(0, 0), GetSizePixel()); } @@ -75,7 +75,7 @@ void PanelLayout::setPosSizePixel(long nX, long nY, long nWidth, long nHeight, s bool bCanHandleSmallerHeight = false; bool bIsLayoutEnabled = isLayoutEnabled(this); - vcl::Window *pChild = GetWindow(WINDOW_FIRSTCHILD); + vcl::Window *pChild = GetWindow(GetWindowType::FirstChild); if (bIsLayoutEnabled && pChild->GetType() == WINDOW_SCROLLWINDOW) { diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx index b31308d62d25..e75acd8655ea 100644 --- a/svx/source/svdraw/sdrpaintwindow.cxx +++ b/svx/source/svdraw/sdrpaintwindow.cxx @@ -78,7 +78,7 @@ void PaintTransparentChildren(vcl::Window & rWindow, Rectangle const& rPixelRect void CandidateMgr::PaintTransparentChildren(vcl::Window & rWindow, Rectangle const& rPixelRect) { - vcl::Window * pCandidate = rWindow.GetWindow( WINDOW_FIRSTCHILD ); + vcl::Window * pCandidate = rWindow.GetWindow( GetWindowType::FirstChild ); while (pCandidate) { if (pCandidate->IsPaintTransparent()) @@ -93,7 +93,7 @@ void CandidateMgr::PaintTransparentChildren(vcl::Window & rWindow, Rectangle con pCandidate->AddEventListener(LINK(this, CandidateMgr, WindowEventListener)); } } - pCandidate = pCandidate->GetWindow( WINDOW_NEXT ); + pCandidate = pCandidate->GetWindow( GetWindowType::Next ); } for (auto aI = m_aCandidates.begin(); aI != m_aCandidates.end(); ++aI) diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx index 1dcb9b88f3d7..9031492fbf2a 100644 --- a/toolkit/source/awt/vclxaccessiblecomponent.cxx +++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx @@ -447,11 +447,11 @@ void VCLXAccessibleComponent::FillAccessibleStateSet( utl::AccessibleStateSetHel rStateSet.AddState( accessibility::AccessibleStateType::EDITABLE ); } - VclPtr<vcl::Window> pChild = pWindow->GetWindow( WINDOW_FIRSTCHILD ); + VclPtr<vcl::Window> pChild = pWindow->GetWindow( GetWindowType::FirstChild ); while( pWindow && pChild ) { - VclPtr<vcl::Window> pWinTemp = pChild->GetWindow( WINDOW_FIRSTCHILD ); + VclPtr<vcl::Window> pWinTemp = pChild->GetWindow( GetWindowType::FirstChild ); if( pWinTemp && pWinTemp->GetType() == WINDOW_EDIT ) { if( !( pWinTemp->GetStyle() & WB_READONLY) || @@ -466,7 +466,7 @@ void VCLXAccessibleComponent::FillAccessibleStateSet( utl::AccessibleStateSetHel rStateSet.AddState( accessibility::AccessibleStateType::EDITABLE ); break; } - pChild = pChild->GetWindow( WINDOW_NEXT ); + pChild = pChild->GetWindow( GetWindowType::Next ); } } else diff --git a/toolkit/source/awt/vclxcontainer.cxx b/toolkit/source/awt/vclxcontainer.cxx index 496a3f7020b6..aff962396d16 100644 --- a/toolkit/source/awt/vclxcontainer.cxx +++ b/toolkit/source/awt/vclxcontainer.cxx @@ -210,7 +210,7 @@ void VCLXContainer::setGroup( const ::com::sun::star::uno::Sequence< ::com::sun: // Add WB_GROUP after the last group if ( n == ( nCount - 1 ) ) { - vcl::Window* pBehindLast = pWin->GetWindow( WINDOW_NEXT ); + vcl::Window* pBehindLast = pWin->GetWindow( GetWindowType::Next ); if ( pBehindLast ) { WinBits nLastStyle = pBehindLast->GetStyle(); diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index 937e48a84e6d..2476e1f1151c 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -2318,13 +2318,13 @@ sal_Int16 VCLXDialog::execute() throw(::com::sun::star::uno::RuntimeException, s if ( GetWindow() ) { VclPtr< Dialog > pDlg = GetAs< Dialog >(); - vcl::Window* pParent = pDlg->GetWindow( WINDOW_PARENTOVERLAP ); + vcl::Window* pParent = pDlg->GetWindow( GetWindowType::ParentOverlap ); vcl::Window* pOldParent = NULL; vcl::Window* pSetParent = NULL; if ( pParent && !pParent->IsReallyVisible() ) { pOldParent = pDlg->GetParent(); - vcl::Window* pFrame = pDlg->GetWindow( WINDOW_FRAME ); + vcl::Window* pFrame = pDlg->GetWindow( GetWindowType::Frame ); if( pFrame != pDlg ) { pDlg->SetParent( pFrame ); diff --git a/toolkit/source/helper/unowrapper.cxx b/toolkit/source/helper/unowrapper.cxx index 56b620c62a77..eafa53906d8f 100644 --- a/toolkit/source/helper/unowrapper.cxx +++ b/toolkit/source/helper/unowrapper.cxx @@ -219,12 +219,12 @@ void UnoWrapper::WindowDestroyed( vcl::Window* pWindow ) { // their still might be some children created with ::com::sun::star::loader::Java // that would otherwise not be destroyed until the garbage collector cleans up - VclPtr< vcl::Window > pChild = pWindow->GetWindow( WINDOW_FIRSTCHILD ); + VclPtr< vcl::Window > pChild = pWindow->GetWindow( GetWindowType::FirstChild ); while ( pChild ) { - VclPtr< vcl::Window > pNextChild = pChild->GetWindow( WINDOW_NEXT ); + VclPtr< vcl::Window > pNextChild = pChild->GetWindow( GetWindowType::Next ); - VclPtr< vcl::Window > pClient = pChild->GetWindow( WINDOW_CLIENT ); + VclPtr< vcl::Window > pClient = pChild->GetWindow( GetWindowType::Client ); if ( pClient && pClient->GetWindowPeer() ) { ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > xComp( pClient->GetComponentInterface( false ), ::com::sun::star::uno::UNO_QUERY ); @@ -235,14 +235,14 @@ void UnoWrapper::WindowDestroyed( vcl::Window* pWindow ) } // System-Windows suchen... - VclPtr< vcl::Window > pOverlap = pWindow->GetWindow( WINDOW_OVERLAP ); + VclPtr< vcl::Window > pOverlap = pWindow->GetWindow( GetWindowType::Overlap ); if ( pOverlap ) { - pOverlap = pOverlap->GetWindow( WINDOW_FIRSTOVERLAP ); + pOverlap = pOverlap->GetWindow( GetWindowType::FirstOverlap ); while ( pOverlap ) { - VclPtr< vcl::Window > pNextOverlap = pOverlap->GetWindow( WINDOW_NEXT ); - VclPtr< vcl::Window > pClient = pOverlap->GetWindow( WINDOW_CLIENT ); + VclPtr< vcl::Window > pNextOverlap = pOverlap->GetWindow( GetWindowType::Next ); + VclPtr< vcl::Window > pClient = pOverlap->GetWindow( GetWindowType::Client ); if ( pClient && pClient->GetWindowPeer() && lcl_ImplIsParent( pWindow, pClient ) ) { @@ -278,13 +278,13 @@ void UnoWrapper::WindowDestroyed( vcl::Window* pWindow ) // #i42462#/#116855# no, don't loop: Instead, just ensure that all our top-window-children // are disposed, too (which should also be a valid fix for #102132#, but doesn't have the extreme // performance penalties) - VclPtr< vcl::Window > pTopWindowChild = pWindow->GetWindow( WINDOW_FIRSTTOPWINDOWCHILD ); + VclPtr< vcl::Window > pTopWindowChild = pWindow->GetWindow( GetWindowType::FirstTopWindowChild ); while ( pTopWindowChild ) { OSL_ENSURE( pTopWindowChild->GetParent() == pWindow, "UnoWrapper::WindowDestroyed: inconsistency in the SystemWindow relationship!" ); - VclPtr< vcl::Window > pNextTopChild = pTopWindowChild->GetWindow( WINDOW_NEXTTOPWINDOWSIBLING ); + VclPtr< vcl::Window > pNextTopChild = pTopWindowChild->GetWindow( GetWindowType::NextTopWindowSibling ); //the window still could be on the stack, so we have to // use lazy delete ( it will automatically diff --git a/vcl/qa/cppunit/lifecycle.cxx b/vcl/qa/cppunit/lifecycle.cxx index 4d6e1cb6aaab..2a63e79dfefe 100644 --- a/vcl/qa/cppunit/lifecycle.cxx +++ b/vcl/qa/cppunit/lifecycle.cxx @@ -76,7 +76,7 @@ void LifecycleTest::testMultiDispose() xWin->disposeOnce(); xWin->disposeOnce(); xWin->disposeOnce(); - CPPUNIT_ASSERT(xWin->GetWindow(0) == NULL); + CPPUNIT_ASSERT(xWin->GetWindow(GetWindowType::Parent) == NULL); CPPUNIT_ASSERT(xWin->GetChild(0) == NULL); CPPUNIT_ASSERT(xWin->GetChildCount() == 0); } @@ -143,7 +143,7 @@ void LifecycleTest::testPostDispose() CPPUNIT_ASSERT(!xWin->IsEnabled()); CPPUNIT_ASSERT(!xWin->IsInputEnabled()); CPPUNIT_ASSERT(!xWin->GetChild(0)); - CPPUNIT_ASSERT(!xWin->GetWindow(0)); + CPPUNIT_ASSERT(!xWin->GetWindow(GetWindowType::Parent)); } class FocusCrashPostDispose : public TabControl diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx index b4a67f130dd4..d3ef95a5525c 100644 --- a/vcl/source/app/dbggui.cxx +++ b/vcl/source/app/dbggui.cxx @@ -477,7 +477,7 @@ void DbgDialogTest( vcl::Window* pWindow ) { bool aAccelBuf[65536] = {false}; sal_uInt16 nChildCount = pWindow->GetChildCount(); - vcl::Window* pGetChild = pWindow->GetWindow( WINDOW_FIRSTCHILD ); + vcl::Window* pGetChild = pWindow->GetWindow( GetWindowType::FirstChild ); vcl::Window* pChild; Point aTabPos; @@ -492,7 +492,7 @@ void DbgDialogTest( vcl::Window* pWindow ) bool bOKCancelButton = false; bool bDefPushButton = false; bool bButton = false; - pGetChild = pWindow->GetWindow( WINDOW_FIRSTCHILD ); + pGetChild = pWindow->GetWindow( GetWindowType::FirstChild ); while ( pGetChild ) { pChild = pGetChild->ImplGetWindow(); @@ -506,7 +506,7 @@ void DbgDialogTest( vcl::Window* pWindow ) bDefPushButton = true; } - pGetChild = pGetChild->GetWindow( WINDOW_NEXT ); + pGetChild = pGetChild->GetWindow( GetWindowType::Next ); } if ( bButton ) @@ -521,7 +521,7 @@ void DbgDialogTest( vcl::Window* pWindow ) } sal_uInt16 i = 0; - pGetChild = pWindow->GetWindow( WINDOW_FIRSTCHILD ); + pGetChild = pWindow->GetWindow( GetWindowType::FirstChild ); while ( pGetChild ) { pChild = pGetChild->ImplGetWindow(); @@ -637,7 +637,7 @@ void DbgDialogTest( vcl::Window* pWindow ) if ( (i+1 < nChildCount) && !aText.isEmpty() ) { - vcl::Window* pTempChild = pGetChild->GetWindow( WINDOW_NEXT )->ImplGetWindow(); + vcl::Window* pTempChild = pGetChild->GetWindow( GetWindowType::Next )->ImplGetWindow(); if ( (pTempChild->GetType() == WINDOW_EDIT) || (pTempChild->GetType() == WINDOW_MULTILINEEDIT) || (pTempChild->GetType() == WINDOW_SPINFIELD) || @@ -807,7 +807,7 @@ void DbgDialogTest( vcl::Window* pWindow ) } } - pGetChild = pGetChild->GetWindow( WINDOW_NEXT ); + pGetChild = pGetChild->GetWindow( GetWindowType::Next ); i++; } } diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 3d034966ac69..863ef182a674 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -636,7 +636,7 @@ namespace { vcl::Window* getPreviousSibling(vcl::Window *pParent) { - return pParent ? pParent->GetWindow(WINDOW_LASTCHILD) : NULL; + return pParent ? pParent->GetWindow(GetWindowType::LastChild) : NULL; } } @@ -1427,7 +1427,7 @@ void PushButton::StateChanged( StateChangedType nType ) } else if ( nType == StateChangedType::Style ) { - SetStyle( ImplInitStyle( GetWindow( WINDOW_PREV ), GetStyle() ) ); + SetStyle( ImplInitStyle( GetWindow( GetWindowType::Prev ), GetStyle() ) ); bool bIsDefButton = ( GetStyle() & WB_DEFBUTTON ) != 0; bool bWasDefButton = ( GetPrevStyle() & WB_DEFBUTTON ) != 0; @@ -1512,7 +1512,7 @@ bool PushButton::PreNotify( NotifyEvent& rNEvt ) if( bDropDown && GetParent()->IsNativeControlSupported( aCtrlType, PART_ENTIRE_CONTROL) && !GetParent()->IsNativeControlSupported( aCtrlType, PART_BUTTON_DOWN) ) { - vcl::Window *pBorder = GetParent()->GetWindow( WINDOW_BORDER ); + vcl::Window *pBorder = GetParent()->GetWindow( GetWindowType::Border ); if(aCtrlType == CTRL_COMBOBOX) { // only paint the button part to avoid flickering of the combobox text @@ -2220,7 +2220,7 @@ std::vector< VclPtr<RadioButton> > RadioButton::GetRadioButtonGroup(bool bInclud vcl::Window* pFirst = const_cast<RadioButton*>(this); while( ( pFirst->GetStyle() & WB_GROUP ) == 0 ) { - vcl::Window* pWindow = pFirst->GetWindow( WINDOW_PREV ); + vcl::Window* pWindow = pFirst->GetWindow( GetWindowType::Prev ); if( pWindow ) pFirst = pWindow; else @@ -2235,7 +2235,7 @@ std::vector< VclPtr<RadioButton> > RadioButton::GetRadioButtonGroup(bool bInclud if( pFirst != this || bIncludeThis ) aGroup.push_back( static_cast<RadioButton*>(pFirst) ); } - pFirst = pFirst->GetWindow( WINDOW_NEXT ); + pFirst = pFirst->GetWindow( GetWindowType::Next ); } while( pFirst && ( ( pFirst->GetStyle() & WB_GROUP ) == 0 ) ); return aGroup; @@ -2564,7 +2564,7 @@ void RadioButton::StateChanged( StateChangedType nType ) } else if ( nType == StateChangedType::Style ) { - SetStyle( ImplInitStyle( GetWindow( WINDOW_PREV ), GetStyle() ) ); + SetStyle( ImplInitStyle( GetWindow( GetWindowType::Prev ), GetStyle() ) ); if ( (GetPrevStyle() & RADIOBUTTON_VIEW_STYLE) != (GetStyle() & RADIOBUTTON_VIEW_STYLE) ) @@ -3519,7 +3519,7 @@ void CheckBox::StateChanged( StateChangedType nType ) } else if ( nType == StateChangedType::Style ) { - SetStyle( ImplInitStyle( GetWindow( WINDOW_PREV ), GetStyle() ) ); + SetStyle( ImplInitStyle( GetWindow( GetWindowType::Prev ), GetStyle() ) ); if ( (GetPrevStyle() & CHECKBOX_VIEW_STYLE) != (GetStyle() & CHECKBOX_VIEW_STYLE) ) diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index b9073a74d10b..d113ec6b0c04 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -565,7 +565,7 @@ void ComboBox::Resize() if( IsDropDownBox() ) { ComboBoxBounds aBounds(calcComboBoxDropDownComponentBounds(aOutSz, - GetWindow(WINDOW_BORDER)->GetOutputSizePixel())); + GetWindow(GetWindowType::Border)->GetOutputSizePixel())); mpSubEdit->SetPosSizePixel(aBounds.aSubEditPos, aBounds.aSubEditSize); mpBtn->SetPosSizePixel(aBounds.aButtonPos, aBounds.aButtonSize); } @@ -991,7 +991,7 @@ long ComboBox::getMaxWidthScrollBarAndDownButton() const { long nButtonDownWidth = 0; - vcl::Window *pBorder = GetWindow( WINDOW_BORDER ); + vcl::Window *pBorder = GetWindow( GetWindowType::Border ); ImplControlValue aControlValue; Point aPoint; Rectangle aContent, aBound; @@ -1424,7 +1424,7 @@ ComboBox::ComboBoxBounds ComboBox::calcComboBoxDropDownComponentBounds(const Siz long nTop = 0; long nBottom = rOutSz.Height(); - vcl::Window *pBorder = GetWindow( WINDOW_BORDER ); + vcl::Window *pBorder = GetWindow( GetWindowType::Border ); ImplControlValue aControlValue; Point aPoint; Rectangle aContent, aBound; diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 81d5316c991b..681f3c29f8b9 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -979,7 +979,7 @@ int Edit::ImplGetNativeControlType() const break; case WINDOW_MULTILINEEDIT: - if ( GetWindow( WINDOW_BORDER ) != this ) + if ( GetWindow( GetWindowType::Border ) != this ) nCtrl = CTRL_MULTILINE_EDITBOX; else nCtrl = CTRL_EDITBOX_NOBORDER; @@ -998,7 +998,7 @@ int Edit::ImplGetNativeControlType() const nCtrl = CTRL_SPINBOX; else { - if (GetWindow(WINDOW_BORDER) != this) + if (GetWindow(GetWindowType::Border) != this) nCtrl = CTRL_EDITBOX; else nCtrl = CTRL_EDITBOX_NOBORDER; @@ -1035,12 +1035,12 @@ void Edit::ImplPaintBorder(vcl::RenderContext& rRenderContext, long nXStart, lon if (ImplUseNativeBorder(rRenderContext, GetStyle()) || IsPaintTransparent()) { // draw the inner part by painting the whole control using its border window - vcl::Window* pBorder = GetWindow(WINDOW_BORDER); + vcl::Window* pBorder = GetWindow(GetWindowType::Border); if (pBorder == this) { // we have no border, use parent vcl::Window* pControl = mbIsSubEdit ? GetParent() : this; - pBorder = pControl->GetWindow(WINDOW_BORDER); + pBorder = pControl->GetWindow(GetWindowType::Border); if (pBorder == this) pBorder = GetParent(); } @@ -1878,7 +1878,7 @@ void Edit::ImplInvalidateOutermostBorder( vcl::Window* pWin ) { // allow control to show focused state vcl::Window *pInvalWin = pWin, *pBorder = pWin; - while( ( pBorder = pInvalWin->GetWindow( WINDOW_BORDER ) ) != pInvalWin && pBorder && + while( ( pBorder = pInvalWin->GetWindow( GetWindowType::Border ) ) != pInvalWin && pBorder && pInvalWin->ImplGetFrame() == pBorder->ImplGetFrame() ) { pInvalWin = pBorder; diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx index 48ac8cc5bf89..388c27602a08 100644 --- a/vcl/source/control/ilstbox.cxx +++ b/vcl/source/control/ilstbox.cxx @@ -2639,8 +2639,8 @@ bool ImplWin::PreNotify( NotifyEvent& rNEvt ) if ( IsNativeControlSupported(CTRL_LISTBOX, PART_ENTIRE_CONTROL) && ! IsNativeControlSupported(CTRL_LISTBOX, PART_BUTTON_DOWN) ) { - GetParent()->GetWindow( WINDOW_BORDER )->Invalidate( INVALIDATE_NOERASE ); - GetParent()->GetWindow( WINDOW_BORDER )->Update(); + GetParent()->GetWindow( GetWindowType::Border )->Invalidate( INVALIDATE_NOERASE ); + GetParent()->GetWindow( GetWindowType::Border )->Update(); } } } @@ -2682,9 +2682,9 @@ void ImplWin::ImplDraw(vcl::RenderContext& rRenderContext, bool bLayout) bool bMouseOver = false; if( GetParent() ) { - vcl::Window *pChild = GetParent()->GetWindow( WINDOW_FIRSTCHILD ); + vcl::Window *pChild = GetParent()->GetWindow( GetWindowType::FirstChild ); while( pChild && !(bMouseOver = pChild->IsMouseOver()) ) - pChild = pChild->GetWindow( WINDOW_NEXT ); + pChild = pChild->GetWindow( GetWindowType::Next ); } if( bMouseOver ) @@ -2869,7 +2869,7 @@ void ImplWin::GetFocus() IsNativeWidgetEnabled() && IsNativeControlSupported( CTRL_LISTBOX, PART_ENTIRE_CONTROL ) ) { - vcl::Window* pWin = GetParent()->GetWindow( WINDOW_BORDER ); + vcl::Window* pWin = GetParent()->GetWindow( GetWindowType::Border ); if( ! pWin ) pWin = GetParent(); pWin->Invalidate(); @@ -2886,7 +2886,7 @@ void ImplWin::LoseFocus() IsNativeWidgetEnabled() && IsNativeControlSupported( CTRL_LISTBOX, PART_ENTIRE_CONTROL ) ) { - vcl::Window* pWin = GetParent()->GetWindow( WINDOW_BORDER ); + vcl::Window* pWin = GetParent()->GetWindow( GetWindowType::Border ); if( ! pWin ) pWin = GetParent(); pWin->Invalidate(); diff --git a/vcl/source/control/imgctrl.cxx b/vcl/source/control/imgctrl.cxx index 6da20c0cde53..8d9a5cbddff1 100644 --- a/vcl/source/control/imgctrl.cxx +++ b/vcl/source/control/imgctrl.cxx @@ -137,7 +137,7 @@ void ImageControl::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /* if (HasFocus()) { - vcl::Window* pBorderWindow = GetWindow(WINDOW_BORDER); + vcl::Window* pBorderWindow = GetWindow(GetWindowType::Border); bool bFlat = (GetBorderStyle() == WindowBorderStyle::MONO); Rectangle aRect(Point(0,0), pBorderWindow->GetOutputSizePixel()); @@ -180,13 +180,13 @@ void ImageControl::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSiz void ImageControl::GetFocus() { FixedImage::GetFocus(); - GetWindow( WINDOW_BORDER )->Invalidate(); + GetWindow( GetWindowType::Border )->Invalidate(); } void ImageControl::LoseFocus() { FixedImage::GetFocus(); - GetWindow( WINDOW_BORDER )->Invalidate(); + GetWindow( GetWindowType::Border )->Invalidate(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index 45894fd4697b..eb5a92bbb9ba 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -637,7 +637,7 @@ void ListBox::Resize() long nBottom = aOutSz.Height(); // Note: in case of no border, pBorder will actually be this - vcl::Window *pBorder = GetWindow( WINDOW_BORDER ); + vcl::Window *pBorder = GetWindow( GetWindowType::Border ); ImplControlValue aControlValue; Point aPoint; Rectangle aContent, aBound; @@ -797,7 +797,7 @@ void ListBox::StateChanged( StateChangedType nType ) if ( IsNativeControlSupported(CTRL_LISTBOX, PART_ENTIRE_CONTROL) && ! IsNativeControlSupported(CTRL_LISTBOX, PART_BUTTON_DOWN) ) { - GetWindow( WINDOW_BORDER )->Invalidate( INVALIDATE_NOERASE ); + GetWindow( GetWindowType::Border )->Invalidate( INVALIDATE_NOERASE ); } else mpImplWin->Invalidate(); diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx index 6cf255832b03..f64c5a7fe626 100644 --- a/vcl/source/control/spinfld.cxx +++ b/vcl/source/control/spinfld.cxx @@ -87,7 +87,7 @@ bool ImplDrawNativeSpinfield(vcl::RenderContext& rRenderContext, vcl::Window* pW else { // paint the spinbox as a whole, use borderwindow to have proper clipping - vcl::Window* pBorder = pWin->GetWindow(WINDOW_BORDER); + vcl::Window* pBorder = pWin->GetWindow(GetWindowType::Border); // to not overwrite everything, set the button region as clipregion to the border window Rectangle aClipRect(rSpinbuttonValue.maLowerRect); @@ -666,7 +666,7 @@ void SpinField::ImplCalcButtonAreas(OutputDevice* pDev, const Size& rOutSz, Rect IsNativeControlSupported(CTRL_SPINBOX, PART_ENTIRE_CONTROL)) { vcl::Window *pWin = static_cast<vcl::Window*>(pDev); - vcl::Window *pBorder = pWin->GetWindow( WINDOW_BORDER ); + vcl::Window *pBorder = pWin->GetWindow( GetWindowType::Border ); // get the system's spin button size ImplControlValue aControlValue; @@ -728,7 +728,7 @@ void SpinField::Resize() Rectangle aContent, aBound; // use the full extent of the control - vcl::Window *pBorder = GetWindow( WINDOW_BORDER ); + vcl::Window *pBorder = GetWindow( GetWindowType::Border ); Rectangle aArea( aPoint, pBorder->GetOutputSizePixel() ); // adjust position and size of the edit field diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx index 07abf759c92d..39befdabf728 100644 --- a/vcl/source/window/accessibility.cxx +++ b/vcl/source/window/accessibility.cxx @@ -180,7 +180,7 @@ bool Window::ImplIsAccessibleNativeFrame() const return false; } -sal_uInt16 Window::ImplGetAccessibleCandidateChildWindowCount( sal_uInt16 nFirstWindowType ) const +sal_uInt16 Window::ImplGetAccessibleCandidateChildWindowCount( GetWindowType nFirstWindowType ) const { sal_uInt16 nChildren = 0; vcl::Window* pChild = GetWindow( nFirstWindowType ); @@ -189,13 +189,13 @@ sal_uInt16 Window::ImplGetAccessibleCandidateChildWindowCount( sal_uInt16 nFirst if( pChild->ImplIsAccessibleCandidate() ) nChildren++; else - nChildren = sal::static_int_cast<sal_uInt16>(nChildren + pChild->ImplGetAccessibleCandidateChildWindowCount( WINDOW_FIRSTCHILD )); + nChildren = sal::static_int_cast<sal_uInt16>(nChildren + pChild->ImplGetAccessibleCandidateChildWindowCount( GetWindowType::FirstChild )); pChild = pChild->mpWindowImpl->mpNext; } return nChildren; } -vcl::Window* Window::ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uInt16& rChildCount, sal_uInt16 nFirstWindowType, bool bTopLevel ) const +vcl::Window* Window::ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uInt16& rChildCount, GetWindowType nFirstWindowType, bool bTopLevel ) const { if( bTopLevel ) @@ -207,7 +207,7 @@ vcl::Window* Window::ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uIn vcl::Window *pTmpChild = pChild; if( !pChild->ImplIsAccessibleCandidate() ) - pTmpChild = pChild->ImplGetAccessibleCandidateChild( nChild, rChildCount, WINDOW_FIRSTCHILD, false ); + pTmpChild = pChild->ImplGetAccessibleCandidateChild( nChild, rChildCount, GetWindowType::FirstChild, false ); if ( nChild == rChildCount ) return pTmpChild; diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index 25caed82bbb3..06fb92130230 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -1016,7 +1016,7 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei pWin = static_cast<vcl::Window*>(mpOutDev.get()); if (pWin) - pCtrl = mpBorderWindow->GetWindow(WINDOW_CLIENT); + pCtrl = mpBorderWindow->GetWindow(GetWindowType::Client); long nOrigLeftBorder = mnLeftBorder; long nOrigTopBorder = mnTopBorder; @@ -1199,7 +1199,7 @@ void ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, s ControlType aCtrlType = 0; ControlPart aCtrlPart = PART_ENTIRE_CONTROL; - if (pWin && (pCtrl = mpBorderWindow->GetWindow(WINDOW_CLIENT)) != NULL) + if (pWin && (pCtrl = mpBorderWindow->GetWindow(GetWindowType::Client)) != NULL) { switch (pCtrl->GetType()) { @@ -1282,10 +1282,10 @@ void ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, s } bool bMouseOver = false; - vcl::Window *pCtrlChild = pCtrl->GetWindow(WINDOW_FIRSTCHILD); + vcl::Window *pCtrlChild = pCtrl->GetWindow(GetWindowType::FirstChild); while(pCtrlChild && !(bMouseOver = pCtrlChild->IsMouseOver())) { - pCtrlChild = pCtrlChild->GetWindow(WINDOW_NEXT); + pCtrlChild = pCtrlChild->GetWindow(GetWindowType::Next); } if (bMouseOver) @@ -1577,7 +1577,7 @@ void ImplStdBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, sal // for popups, don't draw part of the frame if (pData->mnTitleType == BORDERWINDOW_TITLE_POPUP) { - FloatingWindow* pWin = dynamic_cast<FloatingWindow*>(pData->mpBorderWindow->GetWindow(WINDOW_CLIENT)); + FloatingWindow* pWin = dynamic_cast<FloatingWindow*>(pData->mpBorderWindow->GetWindow(GetWindowType::Client)); if (pWin) { vcl::Region aClipRgn(aInRect); diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 645338674715..64d08c4f2559 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -484,7 +484,7 @@ VclBuilder::VclBuilder(vcl::Window *pParent, const OUString& sUIDir, const OUStr VclExpander *pOne = *aI; vcl::Window *pChild = pOne->get_child(); - vcl::Window* pLabel = pOne->GetWindow(WINDOW_LASTCHILD); + vcl::Window* pLabel = pOne->GetWindow(GetWindowType::LastChild); if (pLabel && pLabel != pChild && pLabel->GetType() == WINDOW_FIXEDTEXT) { FixedText *pLabelWidget = static_cast<FixedText*>(pLabel); @@ -2110,8 +2110,8 @@ void VclBuilder::handleChild(vcl::Window *pParent, xmlreader::XmlReader &reader) //To-Do make reorder a virtual in Window, move this foo //there and see above std::vector<vcl::Window*> aChilds; - for (vcl::Window* pChild = pCurrentChild->GetWindow(WINDOW_FIRSTCHILD); pChild; - pChild = pChild->GetWindow(WINDOW_NEXT)) + for (vcl::Window* pChild = pCurrentChild->GetWindow(GetWindowType::FirstChild); pChild; + pChild = pChild->GetWindow(GetWindowType::Next)) { aChilds.push_back(pChild); } diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx index d0f42755a893..3ef2bc95bf40 100644 --- a/vcl/source/window/decoview.cxx +++ b/vcl/source/window/decoview.cxx @@ -638,7 +638,7 @@ void ImplDrawFrame( OutputDevice *const pDev, Rectangle& rRect, if( bFlatBorders && pWin && pWin->GetType() == WINDOW_BORDERWINDOW && (pWin != pWin->ImplGetFrameWindow()) ) { // check for formcontrol, i.e., a control without NWF enabled - Control *const pControl = dynamic_cast< Control* >( pWin->GetWindow( WINDOW_CLIENT ) ); + Control *const pControl = dynamic_cast< Control* >( pWin->GetWindow( GetWindowType::Client ) ); if( !pControl || !pControl->IsNativeWidgetEnabled() ) bFlatBorders = false; } diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index e4aa836ffc18..72652ae48577 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -93,10 +93,10 @@ static bool ImplIsMnemonicCtrl( vcl::Window* pWindow ) //until we can be sure we can remove it if ( pWindow->GetStyle() & (WB_INFO | WB_NOLABEL) ) return false; - vcl::Window* pNextWindow = pWindow->GetWindow( WINDOW_NEXT ); + vcl::Window* pNextWindow = pWindow->GetWindow( GetWindowType::Next ); if ( !pNextWindow ) return false; - pNextWindow = pNextWindow->GetWindow( WINDOW_CLIENT ); + pNextWindow = pNextWindow->GetWindow( GetWindowType::Client ); if ( !(pNextWindow->GetStyle() & WB_TABSTOP) || (pNextWindow->GetType() == WINDOW_FIXEDTEXT) || (pNextWindow->GetType() == WINDOW_GROUPBOX) || @@ -127,9 +127,9 @@ vcl::Window * nextLogicalChildOfParent(vcl::Window *pTopLevel, vcl::Window *pChi vcl::Window *pLastChild = pChild; if (isContainerWindow(*pChild)) - pChild = pChild->GetWindow(WINDOW_FIRSTCHILD); + pChild = pChild->GetWindow(GetWindowType::FirstChild); else - pChild = pChild->GetWindow(WINDOW_NEXT); + pChild = pChild->GetWindow(GetWindowType::Next); while (!pChild) { @@ -139,7 +139,7 @@ vcl::Window * nextLogicalChildOfParent(vcl::Window *pTopLevel, vcl::Window *pChi if (pParent == pTopLevel) return NULL; pLastChild = pParent; - pChild = pParent->GetWindow(WINDOW_NEXT); + pChild = pParent->GetWindow(GetWindowType::Next); } if (pChild && isContainerWindow(*pChild)) @@ -153,9 +153,9 @@ vcl::Window * prevLogicalChildOfParent(vcl::Window *pTopLevel, vcl::Window *pChi vcl::Window *pLastChild = pChild; if (isContainerWindow(*pChild)) - pChild = pChild->GetWindow(WINDOW_LASTCHILD); + pChild = pChild->GetWindow(GetWindowType::LastChild); else - pChild = pChild->GetWindow(WINDOW_PREV); + pChild = pChild->GetWindow(GetWindowType::Prev); while (!pChild) { @@ -165,7 +165,7 @@ vcl::Window * prevLogicalChildOfParent(vcl::Window *pTopLevel, vcl::Window *pChi if (pParent == pTopLevel) return NULL; pLastChild = pParent; - pChild = pParent->GetWindow(WINDOW_PREV); + pChild = pParent->GetWindow(GetWindowType::Prev); } if (pChild && isContainerWindow(*pChild)) @@ -178,7 +178,7 @@ vcl::Window * prevLogicalChildOfParent(vcl::Window *pTopLevel, vcl::Window *pChi //if any intermediate layout widgets didn't exist vcl::Window * firstLogicalChildOfParent(vcl::Window *pTopLevel) { - vcl::Window *pChild = pTopLevel->GetWindow(WINDOW_FIRSTCHILD); + vcl::Window *pChild = pTopLevel->GetWindow(GetWindowType::FirstChild); if (pChild && isContainerWindow(*pChild)) pChild = nextLogicalChildOfParent(pTopLevel, pChild); return pChild; @@ -191,7 +191,7 @@ void ImplWindowAutoMnemonic( vcl::Window* pWindow ) vcl::Window* pChild; // register the assigned mnemonics - pGetChild = pWindow->GetWindow( WINDOW_FIRSTCHILD ); + pGetChild = pWindow->GetWindow( GetWindowType::FirstChild ); while ( pGetChild ) { pChild = pGetChild->ImplGetWindow(); @@ -208,7 +208,7 @@ void ImplWindowAutoMnemonic( vcl::Window* pWindow ) if ( (pParent->GetStyle() & (WB_DIALOGCONTROL | WB_NODIALOGCONTROL)) == WB_DIALOGCONTROL ) { - pGetChild = pParent->GetWindow( WINDOW_FIRSTCHILD ); + pGetChild = pParent->GetWindow( GetWindowType::FirstChild ); while ( pGetChild ) { pChild = pGetChild->ImplGetWindow(); @@ -219,7 +219,7 @@ void ImplWindowAutoMnemonic( vcl::Window* pWindow ) } // assign mnemonics to Controls which have none - pGetChild = pWindow->GetWindow( WINDOW_FIRSTCHILD ); + pGetChild = pWindow->GetWindow( GetWindowType::FirstChild ); while ( pGetChild ) { pChild = pGetChild->ImplGetWindow(); @@ -240,14 +240,14 @@ static VclButtonBox* getActionArea(Dialog *pDialog) VclButtonBox *pButtonBox = NULL; if (pDialog->isLayoutEnabled()) { - vcl::Window *pBox = pDialog->GetWindow(WINDOW_FIRSTCHILD); - vcl::Window *pChild = pBox->GetWindow(WINDOW_LASTCHILD); + vcl::Window *pBox = pDialog->GetWindow(GetWindowType::FirstChild); + vcl::Window *pChild = pBox->GetWindow(GetWindowType::LastChild); while (pChild) { pButtonBox = dynamic_cast<VclButtonBox*>(pChild); if (pButtonBox) break; - pChild = pChild->GetWindow(WINDOW_PREV); + pChild = pChild->GetWindow(GetWindowType::Prev); } } return pButtonBox; @@ -257,8 +257,8 @@ static vcl::Window* getActionAreaButtonList(Dialog *pDialog) { VclButtonBox* pButtonBox = getActionArea(pDialog); if (pButtonBox) - return pButtonBox->GetWindow(WINDOW_FIRSTCHILD); - return pDialog->GetWindow(WINDOW_FIRSTCHILD); + return pButtonBox->GetWindow(GetWindowType::FirstChild); + return pDialog->GetWindow(GetWindowType::FirstChild); } static PushButton* ImplGetDefaultButton( Dialog* pDialog ) @@ -273,7 +273,7 @@ static PushButton* ImplGetDefaultButton( Dialog* pDialog ) return pPushButton; } - pChild = pChild->GetWindow( WINDOW_NEXT ); + pChild = pChild->GetWindow( GetWindowType::Next ); } return NULL; @@ -287,7 +287,7 @@ static PushButton* ImplGetOKButton( Dialog* pDialog ) if ( pChild->GetType() == WINDOW_OKBUTTON ) return static_cast<PushButton*>(pChild); - pChild = pChild->GetWindow( WINDOW_NEXT ); + pChild = pChild->GetWindow( GetWindowType::Next ); } return NULL; @@ -302,7 +302,7 @@ static PushButton* ImplGetCancelButton( Dialog* pDialog ) if ( pChild->GetType() == WINDOW_CANCELBUTTON ) return static_cast<PushButton*>(pChild); - pChild = pChild->GetWindow( WINDOW_NEXT ); + pChild = pChild->GetWindow( GetWindowType::Next ); } return NULL; diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx index e927590c4da9..ef47cd059059 100644 --- a/vcl/source/window/dlgctrl.cxx +++ b/vcl/source/window/dlgctrl.cxx @@ -102,7 +102,7 @@ static vcl::Window* ImplGetSubChildWindow( vcl::Window* pParent, sal_uInt16 n, s TabPage* pTempTabPage = pTabControl->GetTabPage( pTabControl->GetCurPageId() ); if ( pTempTabPage ) { - vcl::Window* pTempWindow = pTabControl->GetWindow( WINDOW_FIRSTCHILD ); + vcl::Window* pTempWindow = pTabControl->GetWindow( GetWindowType::FirstChild ); while ( pTempWindow ) { if ( pTempWindow->ImplGetWindow() == pTempTabPage ) diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index b9bfd03b3f84..38111425583e 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -166,7 +166,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl) // we allow docking only when the window was moved // by dragging its caption // and ignore move request due to resizing - vcl::Window *pBorder = GetWindow( WINDOW_BORDER ); + vcl::Window *pBorder = GetWindow( GetWindowType::Border ); if( pBorder != this ) { Point aPt; @@ -249,7 +249,7 @@ void ImplDockFloatWin2::Move() void ImplDockFloatWin2::Resize() { // forwarding of resize only required if we have no borderwindow ( GetWindow() then returns 'this' ) - if( GetWindow( WINDOW_BORDER ) == this ) + if( GetWindow( GetWindowType::Border ) == this ) { FloatingWindow::Resize(); Size aSize( GetSizePixel() ); @@ -761,7 +761,7 @@ void ImplPopupFloatWin::MouseButtonDown( const MouseEvent& rMEvt ) PointerState aState = GetParent()->GetPointerState(); if (HasMirroredGraphics() && IsRTLEnabled()) ImplMirrorFramePos(aState.maPos); - maTearOffPosition = GetWindow( WINDOW_BORDER )->GetPosPixel(); + maTearOffPosition = GetWindow( GetWindowType::Border )->GetPosPixel(); maDelta = aState.maPos - maTearOffPosition; mbTrackingEnabled = true; } @@ -788,7 +788,7 @@ void ImplPopupFloatWin::Tracking( const TrackingEvent& rTEvt ) if (pOutDev->HasMirroredGraphics() && IsRTLEnabled()) ImplMirrorFramePos(aState.maPos); maTearOffPosition = aState.maPos - maDelta; - GetWindow( WINDOW_BORDER )->SetPosPixel( maTearOffPosition ); + GetWindow( GetWindowType::Border )->SetPosPixel( maTearOffPosition ); } } } @@ -1107,8 +1107,8 @@ void ImplDockingWindowWrapper::StartPopupMode( ToolBox *pParentToolBox, FloatWin GetWindow()->Show( false, SHOW_NOFOCUSCHANGE ); // prepare reparenting - vcl::Window* pRealParent = GetWindow()->GetWindow( WINDOW_PARENT ); - mpOldBorderWin = GetWindow()->GetWindow( WINDOW_BORDER ); + vcl::Window* pRealParent = GetWindow()->GetWindow( GetWindowType::Parent ); + mpOldBorderWin = GetWindow()->GetWindow( GetWindowType::Border ); if( mpOldBorderWin.get() == GetWindow() ) mpOldBorderWin = NULL; // no border window found @@ -1168,7 +1168,7 @@ IMPL_LINK_NOARG(ImplDockingWindowWrapper, PopupModeEnd) EndPopupModeData aData( pPopupFloatWin->GetTearOffPosition(), mpFloatWin->IsPopupModeTearOff() ); // before deleting change parent back, so we can delete the floating window alone - vcl::Window* pRealParent = GetWindow()->GetWindow( WINDOW_PARENT ); + vcl::Window* pRealParent = GetWindow()->GetWindow( GetWindowType::Parent ); GetWindow()->mpWindowImpl->mpBorderWindow = NULL; if ( mpOldBorderWin ) { @@ -1216,8 +1216,8 @@ void ImplDockingWindowWrapper::SetFloatingMode( bool bFloatMode ) maDockPos = GetWindow()->GetPosPixel(); - vcl::Window* pRealParent = GetWindow()->GetWindow( WINDOW_PARENT ); - mpOldBorderWin = GetWindow()->GetWindow( WINDOW_BORDER ); + vcl::Window* pRealParent = GetWindow()->GetWindow( GetWindowType::Parent ); + mpOldBorderWin = GetWindow()->GetWindow( GetWindowType::Border ); if( mpOldBorderWin == mpDockingWindow ) mpOldBorderWin = NULL; // no border window found @@ -1283,7 +1283,7 @@ void ImplDockingWindowWrapper::SetFloatingMode( bool bFloatMode ) maMinOutSize = mpFloatWin->GetMinOutputSizePixel(); maMaxOutSize = mpFloatWin->GetMaxOutputSizePixel(); - vcl::Window* pRealParent = GetWindow()->GetWindow( WINDOW_PARENT ); //mpWindowImpl->mpRealParent; + vcl::Window* pRealParent = GetWindow()->GetWindow( GetWindowType::Parent ); //mpWindowImpl->mpRealParent; GetWindow()->mpWindowImpl->mpBorderWindow = NULL; if ( mpOldBorderWin ) { diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index b8068c1c5e94..2c4704d8b6fb 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -940,7 +940,7 @@ void DockingWindow::setPosSizePixel( long nX, long nY, aSize.Height() -= 2 * nBorderWidth; Point aPos(nBorderWidth, nBorderWidth); - Window *pBox = GetWindow(WINDOW_FIRSTCHILD); + Window *pBox = GetWindow(GetWindowType::FirstChild); assert(pBox); VclContainer::setLayoutAllocation(*pBox, aPos, aSize); } @@ -1085,7 +1085,7 @@ void DockingWindow::setOptimalLayoutSize() maLayoutIdle.Stop(); //resize DockingWindow to fit requisition on initial show - Window *pBox = GetWindow(WINDOW_FIRSTCHILD); + Window *pBox = GetWindow(GetWindowType::FirstChild); Size aSize = get_preferred_size(); @@ -1115,7 +1115,7 @@ Size DockingWindow::GetOptimalSize() const if (!isLayoutEnabled()) return Window::GetOptimalSize(); - Size aSize = VclContainer::getLayoutRequisition(*GetWindow(WINDOW_FIRSTCHILD)); + Size aSize = VclContainer::getLayoutRequisition(*GetWindow(GetWindowType::FirstChild)); sal_Int32 nBorderWidth = get_border_width(); @@ -1145,7 +1145,7 @@ IMPL_LINK_NOARG_TYPED(DockingWindow, ImplHandleLayoutTimerHdl, Idle*, void) return; } - Window *pBox = GetWindow(WINDOW_FIRSTCHILD); + Window *pBox = GetWindow(GetWindowType::FirstChild); assert(pBox); setPosSizeOnContainee(GetSizePixel(), *pBox); } diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index 5d11517c7cd7..8474188c7fab 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -478,7 +478,7 @@ FloatingWindow* FloatingWindow::ImplFloatHitTest( vcl::Window* pReference, const // compute the floating window's size in absolute screen coordinates // use the border window to have the exact position - vcl::Window *pBorderWin = pWin->GetWindow( WINDOW_BORDER ); + vcl::Window *pBorderWin = pWin->GetWindow( GetWindowType::Border ); Point aPt; // the top-left corner in output coordinates ie (0,0) Rectangle devRect( pBorderWin->ImplOutputToUnmirroredAbsoluteScreenPixel( Rectangle( aPt, pBorderWin->GetSizePixel()) ) ) ; diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index c8bffb54751c..226359690ae7 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -182,7 +182,7 @@ Size VclBox::calculateRequisition() const sal_uInt16 nVisibleChildren = 0; Size aSize; - for (vcl::Window *pChild = GetWindow(WINDOW_FIRSTCHILD); pChild; pChild = pChild->GetWindow(WINDOW_NEXT)) + for (vcl::Window *pChild = GetWindow(GetWindowType::FirstChild); pChild; pChild = pChild->GetWindow(GetWindowType::Next)) { if (!pChild->IsVisible()) continue; @@ -202,7 +202,7 @@ Size VclBox::calculateRequisition() const void VclBox::setAllocation(const Size &rAllocation) { sal_uInt16 nVisibleChildren = 0, nExpandChildren = 0; - for (vcl::Window *pChild = GetWindow(WINDOW_FIRSTCHILD); pChild; pChild = pChild->GetWindow(WINDOW_NEXT)) + for (vcl::Window *pChild = GetWindow(GetWindowType::FirstChild); pChild; pChild = pChild->GetWindow(GetWindowType::Next)) { if (!pChild->IsVisible()) continue; @@ -231,7 +231,7 @@ void VclBox::setAllocation(const Size &rAllocation) //Split into those we pack from the start onwards, and those we pack from the end backwards std::vector<vcl::Window*> aWindows[2]; - for (vcl::Window *pChild = GetWindow(WINDOW_FIRSTCHILD); pChild; pChild = pChild->GetWindow(WINDOW_NEXT)) + for (vcl::Window *pChild = GetWindow(GetWindowType::FirstChild); pChild; pChild = pChild->GetWindow(GetWindowType::Next)) { if (!pChild->IsVisible()) continue; @@ -427,7 +427,7 @@ VclButtonBox::Requisition VclButtonBox::calculatePrimarySecondaryRequisitions() std::vector<long> aSubGroupSizes; std::vector<bool> aSubGroupNonHomogeneous; - for (const vcl::Window *pChild = GetWindow(WINDOW_FIRSTCHILD); pChild; pChild = pChild->GetWindow(WINDOW_NEXT)) + for (const vcl::Window *pChild = GetWindow(GetWindowType::FirstChild); pChild; pChild = pChild->GetWindow(GetWindowType::Next)) { if (!pChild->IsVisible()) continue; @@ -621,7 +621,7 @@ void VclButtonBox::setAllocation(const Size &rAllocation) std::vector<long>::const_iterator aPrimaryI = aReq.m_aMainGroupDimensions.begin(); std::vector<long>::const_iterator aSecondaryI = aReq.m_aSubGroupDimensions.begin(); bool bIgnoreSecondaryPacking = (m_eLayoutStyle == VCL_BUTTONBOX_SPREAD || m_eLayoutStyle == VCL_BUTTONBOX_CENTER); - for (vcl::Window *pChild = GetWindow(WINDOW_FIRSTCHILD); pChild; pChild = pChild->GetWindow(WINDOW_NEXT)) + for (vcl::Window *pChild = GetWindow(GetWindowType::FirstChild); pChild; pChild = pChild->GetWindow(GetWindowType::Next)) { if (!pChild->IsVisible()) continue; @@ -736,8 +736,8 @@ bool sortButtons::operator()(const vcl::Window *pA, const vcl::Window *pB) const void VclButtonBox::sort_native_button_order() { std::vector<vcl::Window*> aChilds; - for (vcl::Window* pChild = GetWindow(WINDOW_FIRSTCHILD); pChild; - pChild = pChild->GetWindow(WINDOW_NEXT)) + for (vcl::Window* pChild = GetWindow(GetWindowType::FirstChild); pChild; + pChild = pChild->GetWindow(GetWindowType::Next)) { aChilds.push_back(pChild); } @@ -752,8 +752,8 @@ VclGrid::array_type VclGrid::assembleGrid() const { ext_array_type A; - for (vcl::Window* pChild = GetWindow(WINDOW_FIRSTCHILD); pChild; - pChild = pChild->GetWindow(WINDOW_NEXT)) + for (vcl::Window* pChild = GetWindow(GetWindowType::FirstChild); pChild; + pChild = pChild->GetWindow(GetWindowType::Next)) { sal_Int32 nLeftAttach = std::max<sal_Int32>(pChild->get_grid_left_attach(), 0); sal_Int32 nWidth = pChild->get_grid_width(); @@ -1490,7 +1490,7 @@ const vcl::Window *VclExpander::get_child() const assert(pWindowImpl->mpFirstChild == m_pDisclosureButton); - return pWindowImpl->mpFirstChild->GetWindow(WINDOW_NEXT); + return pWindowImpl->mpFirstChild->GetWindow(GetWindowType::Next); } vcl::Window *VclExpander::get_child() @@ -1654,7 +1654,7 @@ IMPL_LINK_NOARG(VclScrolledWindow, ScrollBarHdl) assert(dynamic_cast<VclViewport*>(pChild) && "scrolledwindow child should be a Viewport"); - pChild = pChild->GetWindow(WINDOW_FIRSTCHILD); + pChild = pChild->GetWindow(GetWindowType::FirstChild); if (!pChild) return 1; @@ -1862,7 +1862,7 @@ const vcl::Window *VclEventBox::get_child() const assert(pWindowImpl->mpFirstChild.get() == m_aEventBoxHelper.get()); - return pWindowImpl->mpFirstChild->GetWindow(WINDOW_NEXT); + return pWindowImpl->mpFirstChild->GetWindow(GetWindowType::Next); } vcl::Window *VclEventBox::get_child() @@ -1873,7 +1873,7 @@ vcl::Window *VclEventBox::get_child() void VclEventBox::setAllocation(const Size& rAllocation) { Point aChildPos(0, 0); - for (vcl::Window *pChild = GetWindow(WINDOW_FIRSTCHILD); pChild; pChild = pChild->GetWindow(WINDOW_NEXT)) + for (vcl::Window *pChild = GetWindow(GetWindowType::FirstChild); pChild; pChild = pChild->GetWindow(GetWindowType::Next)) { if (!pChild->IsVisible()) continue; @@ -1886,7 +1886,7 @@ Size VclEventBox::calculateRequisition() const Size aRet(0, 0); for (const vcl::Window* pChild = get_child(); pChild; - pChild = pChild->GetWindow(WINDOW_NEXT)) + pChild = pChild->GetWindow(GetWindowType::Next)) { if (!pChild->IsVisible()) continue; @@ -2072,8 +2072,8 @@ short MessageDialog::get_response(const vcl::Window *pWindow) const void MessageDialog::setButtonHandlers(VclButtonBox *pButtonBox) { assert(pButtonBox); - for (vcl::Window* pChild = pButtonBox->GetWindow(WINDOW_FIRSTCHILD); pChild; - pChild = pChild->GetWindow(WINDOW_NEXT)) + for (vcl::Window* pChild = pButtonBox->GetWindow(GetWindowType::FirstChild); pChild; + pChild = pChild->GetWindow(GetWindowType::Next)) { switch (pChild->GetType()) { @@ -2334,8 +2334,8 @@ Size getLegacyBestSizeForChildren(const vcl::Window &rWindow) { Rectangle aBounds; - for (const vcl::Window* pChild = rWindow.GetWindow(WINDOW_FIRSTCHILD); pChild; - pChild = pChild->GetWindow(WINDOW_NEXT)) + for (const vcl::Window* pChild = rWindow.GetWindow(GetWindowType::FirstChild); pChild; + pChild = pChild->GetWindow(GetWindowType::Next)) { if (!pChild->IsVisible()) continue; @@ -2406,8 +2406,8 @@ bool isEnabledInLayout(const vcl::Window *pWindow) bool isLayoutEnabled(const vcl::Window *pWindow) { //Child is a container => we're layout enabled - const vcl::Window *pChild = pWindow ? pWindow->GetWindow(WINDOW_FIRSTCHILD) : NULL; - return pChild && isContainerWindow(*pChild) && !pChild->GetWindow(WINDOW_NEXT); + const vcl::Window *pChild = pWindow ? pWindow->GetWindow(GetWindowType::FirstChild) : NULL; + return pChild && isContainerWindow(*pChild) && !pChild->GetWindow(GetWindowType::Next); } bool isInitialLayout(const vcl::Window *pWindow) diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 9d1dee066889..34c485de80c5 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -2975,7 +2975,7 @@ sal_uInt16 PopupMenu::ImplExecute( vcl::Window* pW, const Rectangle& rRect, Floa Rectangle aDesktopRect(pWin->GetDesktopRectPixel()); if( Application::GetScreenCount() > 1 && Application::IsUnifiedDisplay() ) { - vcl::Window* pDeskW = pWindow->GetWindow( WINDOW_REALPARENT ); + vcl::Window* pDeskW = pWindow->GetWindow( GetWindowType::RealParent ); if( ! pDeskW ) pDeskW = pWindow; Point aDesktopTL( pDeskW->OutputToAbsoluteScreenPixel( aRect.TopLeft() ) ); diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx index 7cbc158d0128..cf6573ed635a 100644 --- a/vcl/source/window/menubarwindow.cxx +++ b/vcl/source/window/menubarwindow.cxx @@ -533,12 +533,12 @@ static int ImplGetTopDockingAreaHeight( vcl::Window *pWindow ) // note: dockingareas are direct children of the SystemWindow if( pWindow->ImplGetFrameWindow() ) { - vcl::Window *pWin = pWindow->ImplGetFrameWindow()->GetWindow( WINDOW_FIRSTCHILD ); //mpWindowImpl->mpFirstChild; + vcl::Window *pWin = pWindow->ImplGetFrameWindow()->GetWindow( GetWindowType::FirstChild ); //mpWindowImpl->mpFirstChild; while( pWin ) { if( pWin->IsSystemWindow() ) { - vcl::Window *pChildWin = pWin->GetWindow( WINDOW_FIRSTCHILD ); //mpWindowImpl->mpFirstChild; + vcl::Window *pChildWin = pWin->GetWindow( GetWindowType::FirstChild ); //mpWindowImpl->mpFirstChild; while( pChildWin ) { DockingAreaWindow *pDockingArea = NULL; @@ -551,12 +551,12 @@ static int ImplGetTopDockingAreaHeight( vcl::Window *pWindow ) return pDockingArea->GetOutputSizePixel().Height(); } - pChildWin = pChildWin->GetWindow( WINDOW_NEXT ); //mpWindowImpl->mpNext; + pChildWin = pChildWin->GetWindow( GetWindowType::Next ); //mpWindowImpl->mpNext; } } - pWin = pWin->GetWindow( WINDOW_NEXT ); //mpWindowImpl->mpNext; + pWin = pWin->GetWindow( GetWindowType::Next ); //mpWindowImpl->mpNext; } } return 0; @@ -716,9 +716,9 @@ bool MenuBarWindow::HandleKeyEvent( const KeyEvent& rKEvent, bool bFromMenu ) if( GetParent() ) { - if( GetParent()->GetWindow( WINDOW_CLIENT )->IsSystemWindow() ) + if( GetParent()->GetWindow( GetWindowType::Client )->IsSystemWindow() ) { - SystemWindow *pSysWin = static_cast<SystemWindow*>(GetParent()->GetWindow( WINDOW_CLIENT )); + SystemWindow *pSysWin = static_cast<SystemWindow*>(GetParent()->GetWindow( GetWindowType::Client )); if( pSysWin->GetTaskPaneList() ) if( pSysWin->GetTaskPaneList()->HandleKeyEvent( rKEvent ) ) return true; diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx index 5aeed11a45ab..7a4a8262dfa6 100644 --- a/vcl/source/window/mouse.cxx +++ b/vcl/source/window/mouse.cxx @@ -406,7 +406,7 @@ void Window::ImplGrabFocusToDocument( sal_uInt16 nFlags ) { if( !pWin->GetParent() ) { - pWin->ImplGetFrameWindow()->GetWindow( WINDOW_CLIENT )->ImplGrabFocus(nFlags); + pWin->ImplGetFrameWindow()->GetWindow( GetWindowType::Client )->ImplGrabFocus(nFlags); return; } pWin = pWin->GetParent(); diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx index 2217797ced8e..ff30617795fa 100644 --- a/vcl/source/window/split.cxx +++ b/vcl/source/window/split.cxx @@ -182,7 +182,7 @@ void Splitter::SetKeyboardStepSize( long nStepSize ) Splitter* Splitter::ImplFindSibling() { // look for another splitter with the same parent but different orientation - vcl::Window *pWin = GetParent()->GetWindow( WINDOW_FIRSTCHILD ); + vcl::Window *pWin = GetParent()->GetWindow( GetWindowType::FirstChild ); Splitter *pSplitter = NULL; while( pWin ) { @@ -192,7 +192,7 @@ Splitter* Splitter::ImplFindSibling() if( pSplitter != this && IsHorizontal() != pSplitter->IsHorizontal() ) return pSplitter; } - pWin = pWin->GetWindow( WINDOW_NEXT ); + pWin = pWin->GetWindow( GetWindowType::Next ); } return NULL; } diff --git a/vcl/source/window/stacking.cxx b/vcl/source/window/stacking.cxx index ccf60ca60f5f..dc0f78e78d72 100644 --- a/vcl/source/window/stacking.cxx +++ b/vcl/source/window/stacking.cxx @@ -1054,67 +1054,67 @@ vcl::Window* Window::GetChild( sal_uInt16 nChild ) const return NULL; } -vcl::Window* Window::GetWindow( sal_uInt16 nType ) const +vcl::Window* Window::GetWindow( GetWindowType nType ) const { if (!mpWindowImpl) return 0; switch ( nType ) { - case WINDOW_PARENT: + case GetWindowType::Parent: return mpWindowImpl->mpRealParent; - case WINDOW_FIRSTCHILD: + case GetWindowType::FirstChild: return mpWindowImpl->mpFirstChild; - case WINDOW_LASTCHILD: + case GetWindowType::LastChild: return mpWindowImpl->mpLastChild; - case WINDOW_PREV: + case GetWindowType::Prev: return mpWindowImpl->mpPrev; - case WINDOW_NEXT: + case GetWindowType::Next: return mpWindowImpl->mpNext; - case WINDOW_FIRSTOVERLAP: + case GetWindowType::FirstOverlap: return mpWindowImpl->mpFirstOverlap; - case WINDOW_LASTOVERLAP: + case GetWindowType::LastOverlap: return mpWindowImpl->mpLastOverlap; - case WINDOW_OVERLAP: + case GetWindowType::Overlap: if ( ImplIsOverlapWindow() ) return const_cast<vcl::Window*>(this); else return mpWindowImpl->mpOverlapWindow; - case WINDOW_PARENTOVERLAP: + case GetWindowType::ParentOverlap: if ( ImplIsOverlapWindow() ) return mpWindowImpl->mpOverlapWindow; else return mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpOverlapWindow; - case WINDOW_CLIENT: + case GetWindowType::Client: return const_cast<vcl::Window*>(this)->ImplGetWindow(); - case WINDOW_REALPARENT: + case GetWindowType::RealParent: return ImplGetParent(); - case WINDOW_FRAME: + case GetWindowType::Frame: return mpWindowImpl->mpFrameWindow; - case WINDOW_BORDER: + case GetWindowType::Border: if ( mpWindowImpl->mpBorderWindow ) - return mpWindowImpl->mpBorderWindow->GetWindow( WINDOW_BORDER ); + return mpWindowImpl->mpBorderWindow->GetWindow( GetWindowType::Border ); return const_cast<vcl::Window*>(this); - case WINDOW_FIRSTTOPWINDOWCHILD: + case GetWindowType::FirstTopWindowChild: return ImplGetWinData()->maTopWindowChildren.empty() ? NULL : (*ImplGetWinData()->maTopWindowChildren.begin()).get(); - case WINDOW_LASTTOPWINDOWCHILD: + case GetWindowType::LastTopWindowChild: return ImplGetWinData()->maTopWindowChildren.empty() ? NULL : (*ImplGetWinData()->maTopWindowChildren.rbegin()).get(); - case WINDOW_PREVTOPWINDOWSIBLING: + case GetWindowType::PrevTopWindowSibling: { if ( !mpWindowImpl->mpRealParent ) return NULL; @@ -1128,7 +1128,7 @@ vcl::Window* Window::GetWindow( sal_uInt16 nType ) const return *--myPos; } - case WINDOW_NEXTTOPWINDOWSIBLING: + case GetWindowType::NextTopWindowSibling: { if ( !mpWindowImpl->mpRealParent ) return NULL; diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index a2c46eead160..07c087dcf7ab 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -1028,7 +1028,7 @@ Size SystemWindow::GetOptimalSize() const if (!isLayoutEnabled()) return Window::GetOptimalSize(); - Size aSize = VclContainer::getLayoutRequisition(*GetWindow(WINDOW_FIRSTCHILD)); + Size aSize = VclContainer::getLayoutRequisition(*GetWindow(GetWindowType::FirstChild)); sal_Int32 nBorderWidth = get_border_width(); @@ -1059,7 +1059,7 @@ IMPL_LINK_NOARG_TYPED( SystemWindow, ImplHandleLayoutTimerHdl, Idle*, void ) return; } - Window *pBox = GetWindow(WINDOW_FIRSTCHILD); + Window *pBox = GetWindow(GetWindowType::FirstChild); assert(pBox); setPosSizeOnContainee(GetSizePixel(), *pBox); } @@ -1085,7 +1085,7 @@ void SystemWindow::setOptimalLayoutSize() maLayoutIdle.Stop(); //resize SystemWindow to fit requisition on initial show - Window *pBox = GetWindow(WINDOW_FIRSTCHILD); + Window *pBox = GetWindow(GetWindowType::FirstChild); settingOptimalLayoutSize(pBox); diff --git a/vcl/source/window/tabdlg.cxx b/vcl/source/window/tabdlg.cxx index a99daecc3390..47e9912bfc73 100644 --- a/vcl/source/window/tabdlg.cxx +++ b/vcl/source/window/tabdlg.cxx @@ -41,7 +41,7 @@ void TabDialog::ImplPosControls() long nOffY = 0; vcl::Window* pTabControl = NULL; - vcl::Window* pChild = GetWindow( WINDOW_FIRSTCHILD ); + vcl::Window* pChild = GetWindow( GetWindowType::FirstChild ); while ( pChild ) { if ( pChild->IsVisible() && (pChild != mpViewWindow) ) @@ -67,7 +67,7 @@ void TabDialog::ImplPosControls() } } - pChild = pChild->GetWindow( WINDOW_NEXT ); + pChild = pChild->GetWindow( GetWindowType::Next ); } // do we have a TabControl ? @@ -155,7 +155,7 @@ void TabDialog::ImplPosControls() if ( nCtrlBarWidth <= (aTabSize.Width()+nBtnEx) ) nX = (aTabSize.Width()+nBtnEx) - nCtrlBarWidth + IMPL_DIALOG_OFFSET; - vcl::Window* pChild2 = GetWindow( WINDOW_FIRSTCHILD ); + vcl::Window* pChild2 = GetWindow( GetWindowType::FirstChild ); while ( pChild2 ) { if ( pChild2->IsVisible() && (pChild2 != mpViewWindow) ) @@ -185,7 +185,7 @@ void TabDialog::ImplPosControls() } } - pChild2 = pChild2->GetWindow( WINDOW_NEXT ); + pChild2 = pChild2->GetWindow( GetWindowType::Next ); } aDlgSize.Height() += nLines * (aCtrlSize.Height()+IMPL_DIALOG_OFFSET); diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx index 787411221f6e..0f326758683a 100644 --- a/vcl/source/window/tabpage.cxx +++ b/vcl/source/window/tabpage.cxx @@ -187,14 +187,14 @@ OString TabPage::GetConfigId() const { OString sId(GetHelpId()); if (sId.isEmpty() && isLayoutEnabled(this)) - sId = GetWindow(WINDOW_FIRSTCHILD)->GetHelpId(); + sId = GetWindow(GetWindowType::FirstChild)->GetHelpId(); return sId; } Size TabPage::GetOptimalSize() const { if (isLayoutEnabled(this)) - return VclContainer::getLayoutRequisition(*GetWindow(WINDOW_FIRSTCHILD)); + return VclContainer::getLayoutRequisition(*GetWindow(GetWindowType::FirstChild)); return getLegacyBestSizeForChildren(*this); } @@ -202,14 +202,14 @@ void TabPage::SetPosSizePixel(const Point& rAllocPos, const Size& rAllocation) { Window::SetPosSizePixel(rAllocPos, rAllocation); if (isLayoutEnabled(this) && rAllocation.Width() && rAllocation.Height()) - VclContainer::setLayoutAllocation(*GetWindow(WINDOW_FIRSTCHILD), Point(0, 0), rAllocation); + VclContainer::setLayoutAllocation(*GetWindow(GetWindowType::FirstChild), Point(0, 0), rAllocation); } void TabPage::SetSizePixel(const Size& rAllocation) { Window::SetSizePixel(rAllocation); if (isLayoutEnabled(this) && rAllocation.Width() && rAllocation.Height()) - VclContainer::setLayoutAllocation(*GetWindow(WINDOW_FIRSTCHILD), Point(0, 0), rAllocation); + VclContainer::setLayoutAllocation(*GetWindow(GetWindowType::FirstChild), Point(0, 0), rAllocation); } void TabPage::SetPosPixel(const Point& rAllocPos) @@ -218,7 +218,7 @@ void TabPage::SetPosPixel(const Point& rAllocPos) Size aAllocation(GetOutputSizePixel()); if (isLayoutEnabled(this) && aAllocation.Width() && aAllocation.Height()) { - VclContainer::setLayoutAllocation(*GetWindow(WINDOW_FIRSTCHILD), Point(0, 0), aAllocation); + VclContainer::setLayoutAllocation(*GetWindow(GetWindowType::FirstChild), Point(0, 0), aAllocation); } } diff --git a/vcl/source/window/taskpanelist.cxx b/vcl/source/window/taskpanelist.cxx index af4f617205ae..46aa4e117121 100644 --- a/vcl/source/window/taskpanelist.cxx +++ b/vcl/source/window/taskpanelist.cxx @@ -78,8 +78,8 @@ static void ImplTaskPaneListGrabFocus( vcl::Window *pWindow, bool bForward ) { // put focus in child of floating windows which is typically a toolbar // that can deal with the focus - if( pWindow->ImplIsFloatingWindow() && pWindow->GetWindow( WINDOW_FIRSTCHILD ) ) - pWindow = pWindow->GetWindow( WINDOW_FIRSTCHILD ); + if( pWindow->ImplIsFloatingWindow() && pWindow->GetWindow( GetWindowType::FirstChild ) ) + pWindow = pWindow->GetWindow( GetWindowType::FirstChild ); pWindow->ImplGrabFocus( GETFOCUS_F6 | (bForward ? GETFOCUS_FORWARD : GETFOCUS_BACKWARD)); } diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index dc2409ac322e..e17950136349 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -4591,7 +4591,7 @@ void ToolBox::ToggleFloatingMode() mbHorz = false; // set focus back to document - ImplGetFrameWindow()->GetWindow( WINDOW_CLIENT )->GrabFocus(); + ImplGetFrameWindow()->GetWindow( GetWindowType::Client )->GrabFocus(); } if( mbOldHorz != mbHorz ) @@ -5213,7 +5213,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) { if( !pWin->GetParent() ) { - pWin->ImplGetFrameWindow()->GetWindow( WINDOW_CLIENT )->GrabFocus(); + pWin->ImplGetFrameWindow()->GetWindow( GetWindowType::Client )->GrabFocus(); break; } pWin = pWin->GetParent(); diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 6504a42aaa08..4aa4269c6902 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -1046,7 +1046,7 @@ bool ToolBox::ImplHasExternalMenubutton() if( ImplIsFloatingMode() ) { // custom menu is placed in the decoration - ImplBorderWindow *pBorderWin = dynamic_cast<ImplBorderWindow*>( GetWindow( WINDOW_BORDER ) ); + ImplBorderWindow *pBorderWin = dynamic_cast<ImplBorderWindow*>( GetWindow( GetWindowType::Border ) ); if( pBorderWin && !pBorderWin->GetMenuRect().IsEmpty() ) bRet = true; } @@ -1902,7 +1902,7 @@ void ToolBox::ImplExecuteCustomMenu() if( IsFloatingMode() ) { // custom menu is placed in the decoration - ImplBorderWindow *pBorderWin = dynamic_cast<ImplBorderWindow*>( GetWindow( WINDOW_BORDER ) ); + ImplBorderWindow *pBorderWin = dynamic_cast<ImplBorderWindow*>( GetWindow( GetWindowType::Border ) ); if( pBorderWin && !pBorderWin->GetMenuRect().IsEmpty() ) { pWin = pBorderWin; diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 8be6e900feaf..12d44d759865 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -117,7 +117,7 @@ namespace // skip border windows, they don't carry information which helps diagnosing the problem const vcl::Window* pWindow( &i_rWindow ); while ( pWindow && ( pWindow->GetType() == WINDOW_BORDERWINDOW ) ) - pWindow = pWindow->GetWindow( WINDOW_FIRSTCHILD ); + pWindow = pWindow->GetWindow( GetWindowType::FirstChild ); if ( !pWindow ) pWindow = &i_rWindow; diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index b8d822f9ad8e..ef2631321bea 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -1126,7 +1126,7 @@ WindowType Window::GetType() const if (mpWindowImpl) return mpWindowImpl->mnType; else - return WINDOW_PARENT; + return 0; } Dialog* Window::GetParentDialog() const diff --git a/vcl/source/window/window3.cxx b/vcl/source/window/window3.cxx index 3eda064b9c7a..aa2a04919663 100644 --- a/vcl/source/window/window3.cxx +++ b/vcl/source/window/window3.cxx @@ -47,11 +47,11 @@ void Window::ImplAdjustNWFSizes() default: { // iterate over children - vcl::Window* pWin = GetWindow( WINDOW_FIRSTCHILD ); + vcl::Window* pWin = GetWindow( GetWindowType::FirstChild ); while( pWin ) { pWin->ImplAdjustNWFSizes(); - pWin = pWin->GetWindow( WINDOW_NEXT ); + pWin = pWin->GetWindow( GetWindowType::Next ); } } break; diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 738a64cd15fb..06d8fa879dfa 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -2263,7 +2263,7 @@ static bool ImplHandleShowDialog( vcl::Window* pWindow, ShowDialogId nDialogId ) if( pWindow->GetType() == WINDOW_BORDERWINDOW ) { - vcl::Window* pWrkWin = pWindow->GetWindow( WINDOW_CLIENT ); + vcl::Window* pWrkWin = pWindow->GetWindow( GetWindowType::Client ); if( pWrkWin ) pWindow = pWrkWin; } diff --git a/vcl/unx/gtk/a11y/atkwindow.cxx b/vcl/unx/gtk/a11y/atkwindow.cxx index 2e0bcdc5f055..b845389c6437 100644 --- a/vcl/unx/gtk/a11y/atkwindow.cxx +++ b/vcl/unx/gtk/a11y/atkwindow.cxx @@ -91,7 +91,7 @@ init_from_window( AtkObject *accessible, vcl::Window *pWindow ) default: { - vcl::Window *pChild = pWindow->GetWindow(WINDOW_FIRSTCHILD); + vcl::Window *pChild = pWindow->GetWindow(GetWindowType::FirstChild); if( pChild ) { if( WINDOW_HELPTEXTWINDOW == pChild->GetType() ) |