[Libreoffice-commits] core.git: 3 commits - chart2/source cui/source dbaccess/source extensions/source include/svx include/vcl sc/source sd/source sfx2/source svtools/source svx/source sw/source toolkit/source vcl/inc vcl/qa vcl/source vcl/unx

Noel Grandin noel at peralex.com
Fri May 22 01:38:32 PDT 2015


 chart2/source/controller/main/ChartController_Window.cxx |    2 
 cui/source/options/treeopt.cxx                           |    2 
 dbaccess/source/ui/dlg/TextConnectionHelper.cxx          |    4 
 dbaccess/source/ui/dlg/adminpages.cxx                    |    2 
 extensions/source/plugin/base/plctrl.cxx                 |    3 
 include/svx/sidebar/PanelLayout.hxx                      |    2 
 include/vcl/combobox.hxx                                 |    2 
 include/vcl/dockwin.hxx                                  |   10 +-
 include/vcl/layout.hxx                                   |    6 -
 include/vcl/lstbox.hxx                                   |    2 
 include/vcl/syswin.hxx                                   |   15 +--
 include/vcl/window.hxx                                   |   75 ++++++++-------
 sc/source/ui/dbgui/csvruler.cxx                          |    4 
 sc/source/ui/inc/csvruler.hxx                            |    2 
 sc/source/ui/miscdlgs/anyrefdg.cxx                       |   14 +-
 sc/source/ui/miscdlgs/retypepassdlg.cxx                  |    4 
 sc/source/ui/navipi/navipi.cxx                           |    2 
 sc/source/ui/view/gridwin.cxx                            |    2 
 sd/source/ui/annotations/annotationtag.cxx               |    2 
 sd/source/ui/dlg/navigatr.cxx                            |    6 -
 sfx2/source/appl/newhelp.cxx                             |    4 
 sfx2/source/appl/sfxhelp.cxx                             |    2 
 sfx2/source/control/thumbnailview.cxx                    |    2 
 sfx2/source/dialog/backingcomp.cxx                       |    2 
 sfx2/source/dialog/backingwindow.cxx                     |    4 
 sfx2/source/dialog/dialoghelper.cxx                      |    4 
 sfx2/source/doc/plugin.cxx                               |    3 
 sfx2/source/sidebar/TitleBar.cxx                         |    4 
 sfx2/source/sidebar/TitleBar.hxx                         |    2 
 svtools/source/brwbox/editbrowsebox.cxx                  |    4 
 svtools/source/control/calendar.cxx                      |    2 
 svtools/source/control/valueset.cxx                      |    2 
 svtools/source/dialogs/wizardmachine.cxx                 |    4 
 svtools/source/dialogs/wizdlg.cxx                        |   10 +-
 svx/source/form/datanavi.cxx                             |    4 
 svx/source/sidebar/PanelLayout.cxx                       |   10 +-
 svx/source/svdraw/sdrpaintwindow.cxx                     |    4 
 sw/source/uibase/utlui/navipi.cxx                        |    6 -
 toolkit/source/awt/vclxaccessiblecomponent.cxx           |    6 -
 toolkit/source/awt/vclxcontainer.cxx                     |    2 
 toolkit/source/awt/vclxwindow.cxx                        |    4 
 toolkit/source/awt/vclxwindows.cxx                       |    4 
 toolkit/source/helper/unowrapper.cxx                     |   18 +--
 vcl/inc/ilstbox.hxx                                      |    2 
 vcl/qa/cppunit/lifecycle.cxx                             |    4 
 vcl/source/app/dbggui.cxx                                |   12 +-
 vcl/source/control/button.cxx                            |   20 ++--
 vcl/source/control/combobox.cxx                          |   16 +--
 vcl/source/control/edit.cxx                              |   10 +-
 vcl/source/control/ilstbox.cxx                           |   20 ++--
 vcl/source/control/imgctrl.cxx                           |    6 -
 vcl/source/control/lstbox.cxx                            |   14 +-
 vcl/source/control/spinfld.cxx                           |    6 -
 vcl/source/window/accessibility.cxx                      |    8 -
 vcl/source/window/brdwin.cxx                             |   30 +++---
 vcl/source/window/builder.cxx                            |    6 -
 vcl/source/window/decoview.cxx                           |    2 
 vcl/source/window/dialog.cxx                             |   40 ++++----
 vcl/source/window/dlgctrl.cxx                            |    2 
 vcl/source/window/dockmgr.cxx                            |   50 +++++-----
 vcl/source/window/dockwin.cxx                            |   24 ++--
 vcl/source/window/floatwin.cxx                           |    2 
 vcl/source/window/layout.cxx                             |   40 ++++----
 vcl/source/window/menu.cxx                               |    2 
 vcl/source/window/menubarwindow.cxx                      |   16 +--
 vcl/source/window/mouse.cxx                              |    2 
 vcl/source/window/split.cxx                              |    4 
 vcl/source/window/stacking.cxx                           |   38 +++----
 vcl/source/window/syswin.cxx                             |   32 +++---
 vcl/source/window/tabdlg.cxx                             |   18 +--
 vcl/source/window/tabpage.cxx                            |   10 +-
 vcl/source/window/taskpanelist.cxx                       |    4 
 vcl/source/window/toolbox.cxx                            |    6 -
 vcl/source/window/toolbox2.cxx                           |    6 -
 vcl/source/window/window.cxx                             |   46 ++++-----
 vcl/source/window/window2.cxx                            |    8 -
 vcl/source/window/window3.cxx                            |    4 
 vcl/source/window/winproc.cxx                            |    2 
 vcl/unx/gtk/a11y/atkwindow.cxx                           |    2 
 79 files changed, 399 insertions(+), 383 deletions(-)

New commits:
commit ac3802da9ac7793c60a323bb8066c10fb40cf576
Author: Noel Grandin <noel at peralex.com>
Date:   Fri May 22 10:37:31 2015 +0200

    convert WINDOW_POSSIZE constants to scoped enum
    
    Change-Id: Id85137ffc7309a66b04132d588d289db136117b9

diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index 114f7e6..9f2f011 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -248,7 +248,7 @@ void SAL_CALL ChartController::setPosSize(
                     Fraction(nScaleXNumerator, nScaleXDenominator),
                     Fraction(nScaleYNumerator, nScaleYDenominator) );
         m_pChartWindow->SetMapMode(aNewMapMode);
-        m_pChartWindow->setPosSizePixel( X, Y, Width, Height, Flags );
+        m_pChartWindow->setPosSizePixel( X, Y, Width, Height, static_cast<PosSizeFlags>(Flags) );
 
         //#i75867# poor quality of ole's alternative view with 3D scenes and zoomfactors besides 100%
         uno::Reference< beans::XPropertySet > xProp( m_xChartView, uno::UNO_QUERY );
diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx
index 5848b5b..7282b7f 100644
--- a/dbaccess/source/ui/dlg/adminpages.cxx
+++ b/dbaccess/source/ui/dlg/adminpages.cxx
@@ -277,7 +277,7 @@ namespace dbaui
                 0,
                 aMinSize.Width(),
                 0,
-                WINDOW_POSSIZE_X | WINDOW_POSSIZE_WIDTH
+                PosSizeFlags::X | PosSizeFlags::Width
             );
         }
     }
diff --git a/extensions/source/plugin/base/plctrl.cxx b/extensions/source/plugin/base/plctrl.cxx
index 4276ba9..917809d 100644
--- a/extensions/source/plugin/base/plctrl.cxx
+++ b/extensions/source/plugin/base/plctrl.cxx
@@ -32,6 +32,7 @@
 #include <com/sun/star/awt/XSpinListener.hpp>
 #include <com/sun/star/awt/XItemListener.hpp>
 #include <com/sun/star/awt/XVclContainerListener.hpp>
+#include <com/sun/star/awt/PosSize.hpp>
 
 #include <plugin/plctrl.hxx>
 #include <vcl/syschild.hxx>
@@ -43,7 +44,7 @@ PluginControl_Impl::PluginControl_Impl()
     , _nY( 0 )
     , _nWidth( 100 )
     , _nHeight( 100 )
-    , _nFlags( WINDOW_POSSIZE_ALL )
+    , _nFlags( css::awt::PosSize::POSSIZE )
     , _bVisible(false)
     , _bInDesignMode(false)
     , _bEnable(true)
diff --git a/include/svx/sidebar/PanelLayout.hxx b/include/svx/sidebar/PanelLayout.hxx
index 9c58248..09386a6 100644
--- a/include/svx/sidebar/PanelLayout.hxx
+++ b/include/svx/sidebar/PanelLayout.hxx
@@ -38,7 +38,7 @@ public:
     virtual void dispose() SAL_OVERRIDE;
 
     virtual Size GetOptimalSize() const SAL_OVERRIDE;
-    virtual void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL) SAL_OVERRIDE;
+    virtual void setPosSizePixel(long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All) SAL_OVERRIDE;
     virtual void queue_resize(StateChangedType eReason = StateChangedType::Layout) SAL_OVERRIDE;
 
 };
diff --git a/include/vcl/combobox.hxx b/include/vcl/combobox.hxx
index 83e4a18..50058fd 100644
--- a/include/vcl/combobox.hxx
+++ b/include/vcl/combobox.hxx
@@ -109,7 +109,7 @@ public:
 
     virtual const Wallpaper& GetDisplayBackground() const SAL_OVERRIDE;
 
-    virtual void    setPosSizePixel( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ) SAL_OVERRIDE;
+    virtual void    setPosSizePixel( long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All ) SAL_OVERRIDE;
     void            SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ) SAL_OVERRIDE
                         { Edit::SetPosSizePixel( rNewPos, rNewSize ); }
 
diff --git a/include/vcl/dockwin.hxx b/include/vcl/dockwin.hxx
index 605441e..156d0a0 100644
--- a/include/vcl/dockwin.hxx
+++ b/include/vcl/dockwin.hxx
@@ -171,7 +171,7 @@ public:
 
     void            setPosSizePixel( long nX, long nY,
                                      long nWidth, long nHeight,
-                                     sal_uInt16 nFlags = WINDOW_POSSIZE_ALL );
+                                     PosSizeFlags nFlags = PosSizeFlags::All );
     void            SetPosSizePixel( const Point& rNewPos,
                                      const Size& rNewSize )
                         { mpDockingWindow->SetPosSizePixel( rNewPos, rNewSize ); }
@@ -211,7 +211,7 @@ public:
     // be availbale from the toolkit
     void        SetPosSizePixel( vcl::Window *pWin, long nX, long nY,
                                 long nWidth, long nHeight,
-                                sal_uInt16 nFlags = WINDOW_POSSIZE_ALL );
+                                PosSizeFlags nFlags = PosSizeFlags::All );
     Rectangle   GetPosSizePixel( const vcl::Window *pWin );
 };
 
@@ -347,7 +347,7 @@ public:
 
     virtual void    setPosSizePixel( long nX, long nY,
                                      long nWidth, long nHeight,
-                                     sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ) SAL_OVERRIDE;
+                                     PosSizeFlags nFlags = PosSizeFlags::All ) SAL_OVERRIDE;
     void            SetPosSizePixel( const Point& rNewPos,
                                      const Size& rNewSize ) SAL_OVERRIDE
                         { Window::SetPosSizePixel( rNewPos, rNewSize ); }
diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx
index 4cbdd49..d93167e 100644
--- a/include/vcl/lstbox.hxx
+++ b/include/vcl/lstbox.hxx
@@ -101,7 +101,7 @@ public:
     virtual const Wallpaper& GetDisplayBackground() const SAL_OVERRIDE;
 
     virtual void        setPosSizePixel( long nX, long nY,
-                                         long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ) SAL_OVERRIDE;
+                                         long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All ) SAL_OVERRIDE;
     void                SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ) SAL_OVERRIDE
                         { Control::SetPosSizePixel( rNewPos, rNewSize ); }
 
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index a31ca52..919bd31 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -116,7 +116,6 @@ enum class TrackingEventFlags
     End            = 0x1000,
     DontCallHdl    = 0x8000,
 };
-
 namespace o3tl
 {
     template<> struct typed_flags<TrackingEventFlags> : is_typed_flags<TrackingEventFlags, 0x9107> {};
@@ -149,15 +148,24 @@ enum class GetWindowType
 };
 
 // Flags for setPosSizePixel()
-#define WINDOW_POSSIZE_X                ((sal_uInt16)0x0001)
-#define WINDOW_POSSIZE_Y                ((sal_uInt16)0x0002)
-#define WINDOW_POSSIZE_WIDTH            ((sal_uInt16)0x0004)
-#define WINDOW_POSSIZE_HEIGHT           ((sal_uInt16)0x0008)
-#define WINDOW_POSSIZE_POS              (WINDOW_POSSIZE_X | WINDOW_POSSIZE_Y)
-#define WINDOW_POSSIZE_SIZE             (WINDOW_POSSIZE_WIDTH | WINDOW_POSSIZE_HEIGHT)
-#define WINDOW_POSSIZE_POSSIZE          (WINDOW_POSSIZE_POS | WINDOW_POSSIZE_SIZE)
-#define WINDOW_POSSIZE_ALL              (WINDOW_POSSIZE_POSSIZE)
-#define WINDOW_POSSIZE_DROPDOWN         ((sal_uInt16)0x0010)
+// These must match the definitions in css::awt::PosSize
+enum class PosSizeFlags
+{
+    NONE             = 0x0000,
+    X                = 0x0001,
+    Y                = 0x0002,
+    Width            = 0x0004,
+    Height           = 0x0008,
+    Pos              = X | Y,
+    Size             = Width | Height,
+    PosSize          = Pos | Size,
+    All              = PosSize,
+    Dropdown         = 0x0010,
+};
+namespace o3tl
+{
+    template<> struct typed_flags<PosSizeFlags> : is_typed_flags<PosSizeFlags, 0x001f> {};
+}
 
 // Flags for Show()
 #define SHOW_NOPARENTUPDATE             ((sal_uInt16)0x0001)
@@ -498,7 +506,7 @@ public:
 
     SAL_DLLPRIVATE void                 ImplMirrorFramePos( Point &pt ) const;
 
-    SAL_DLLPRIVATE void                 ImplPosSizeWindow( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags );
+    SAL_DLLPRIVATE void                 ImplPosSizeWindow( long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags );
 
     SAL_DLLPRIVATE void                 ImplAddDel( ImplDelData* pDel );
     SAL_DLLPRIVATE void                 ImplRemoveDel( ImplDelData* pDel );
@@ -992,7 +1000,7 @@ public:
 
     virtual void                        setPosSizePixel( long nX, long nY,
                                                          long nWidth, long nHeight,
-                                                         sal_uInt16 nFlags = WINDOW_POSSIZE_ALL );
+                                                         PosSizeFlags nFlags = PosSizeFlags::All );
     virtual void                        SetPosPixel( const Point& rNewPos );
     virtual Point                       GetPosPixel() const;
     virtual void                        SetSizePixel( const Size& rNewSize );
diff --git a/sc/source/ui/dbgui/csvruler.cxx b/sc/source/ui/dbgui/csvruler.cxx
index fb13963..aab46e9 100644
--- a/sc/source/ui/dbgui/csvruler.cxx
+++ b/sc/source/ui/dbgui/csvruler.cxx
@@ -113,9 +113,9 @@ void ScCsvRuler::dispose()
 // common ruler handling ------------------------------------------------------
 
 void ScCsvRuler::setPosSizePixel(
-        long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags )
+        long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags )
 {
-    if( nFlags & WINDOW_POSSIZE_HEIGHT )
+    if( nFlags & PosSizeFlags::Height )
         nHeight = GetTextHeight() + mnSplitSize + 2;
     ScCsvControl::setPosSizePixel( nX, nY, nWidth, nHeight, nFlags );
 }
diff --git a/sc/source/ui/inc/csvruler.hxx b/sc/source/ui/inc/csvruler.hxx
index 6fc719d..44f8a76 100644
--- a/sc/source/ui/inc/csvruler.hxx
+++ b/sc/source/ui/inc/csvruler.hxx
@@ -63,7 +63,7 @@ public:
     virtual void                setPosSizePixel(
                                     long nX, long nY,
                                     long nWidth, long nHeight,
-                                    sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ) SAL_OVERRIDE;
+                                    PosSizeFlags nFlags = PosSizeFlags::All ) SAL_OVERRIDE;
 
     /** Apply current layout data to the ruler. */
     void                        ApplyLayout( const ScCsvLayoutData& rOldData );
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index 77bf5a4..04ec62b 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -600,7 +600,7 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, vcl
             (aTbxCmd->GetPosPixel().Y() + aTbxCmd->GetSizePixel().Height()),
             (aEdRow->GetPosPixel().Y() + aEdRow->GetSizePixel().Height()) )
         + 4;
-    aLbEntries->setPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y);
+    aLbEntries->setPosSizePixel( 0, nListboxYPos, 0, 0, PosSizeFlags::Y);
 
     nBorderOffset = aLbEntries->GetPosPixel().X();
 
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index ae200c6..ae1f66e 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -101,7 +101,7 @@ SdNavigatorWin::SdNavigatorWin(
     // TreeListBox
     // set position below toolbox
     long nListboxYPos = maToolbox->GetPosPixel().Y() + maToolbox->GetSizePixel().Height() + 4;
-    maTlbObjects->setPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y );
+    maTlbObjects->setPosSizePixel( 0, nListboxYPos, 0, 0, PosSizeFlags::Y );
     maTlbObjects->SetDoubleClickHdl( LINK( this, SdNavigatorWin, ClickObjectHdl ) );
     maTlbObjects->SetSelectionMode( SINGLE_SELECTION );
     // set focus to listbox, otherwise it is in the toolbox which is only useful
@@ -113,14 +113,14 @@ SdNavigatorWin::SdNavigatorWin(
     maLbDocs->SetSelectHdl( LINK( this, SdNavigatorWin, SelectDocumentHdl ) );
     // set position below treelistbox
     nListboxYPos = maTlbObjects->GetPosPixel().Y() + maTlbObjects->GetSizePixel().Height() + 4;
-    maLbDocs->setPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y );
+    maLbDocs->setPosSizePixel( 0, nListboxYPos, 0, 0, PosSizeFlags::Y );
 
     // assure that tool box is at least as wide as the tree list box
     {
         const Size aTlbSize( maTlbObjects->GetOutputSizePixel() );
         if ( aTlbSize.Width() > aTbxSize.Width() )
         {
-            maToolbox->setPosSizePixel( 0, 0, aTlbSize.Width(), 0, WINDOW_POSSIZE_WIDTH );
+            maToolbox->setPosSizePixel( 0, 0, aTlbSize.Width(), 0, PosSizeFlags::Width );
             aTbxSize = maToolbox->GetOutputSizePixel();
         }
     }
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index ba6f706..4bcdf56 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -240,7 +240,7 @@ void ThumbnailView::ImplInitScrollBar()
         {
             // adapt the width because of the changed settings
             long nScrBarWidth = GetSettings().GetStyleSettings().GetScrollBarSize();
-            mpScrBar->setPosSizePixel( 0, 0, nScrBarWidth, 0, WINDOW_POSSIZE_WIDTH );
+            mpScrBar->setPosSizePixel( 0, 0, nScrBarWidth, 0, PosSizeFlags::Width );
         }
     }
 }
diff --git a/sfx2/source/doc/plugin.cxx b/sfx2/source/doc/plugin.cxx
index 7c5d715..987e953 100644
--- a/sfx2/source/doc/plugin.cxx
+++ b/sfx2/source/doc/plugin.cxx
@@ -24,6 +24,7 @@
 #include <com/sun/star/plugin/XPluginManager.hpp>
 #include <com/sun/star/plugin/PluginMode.hpp>
 #include <com/sun/star/awt/XControl.hpp>
+#include <com/sun/star/awt/PosSize.hpp>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/frame/XSynchronousFrameLoader.hpp>
 #include <com/sun/star/lang/XEventListener.hpp>
@@ -60,7 +61,7 @@ void PluginWindow_Impl::Resize()
 {
     Size aSize( GetOutputSizePixel() );
     if ( xWindow.is() )
-        xWindow->setPosSize( 0, 0, aSize.Width(), aSize.Height(), WINDOW_POSSIZE_SIZE );
+        xWindow->setPosSize( 0, 0, aSize.Width(), aSize.Height(), css::awt::PosSize::SIZE );
 }
 
 #define PROPERTY_UNBOUND 0
diff --git a/sfx2/source/sidebar/TitleBar.cxx b/sfx2/source/sidebar/TitleBar.cxx
index fd3c1a9..239cf04 100644
--- a/sfx2/source/sidebar/TitleBar.cxx
+++ b/sfx2/source/sidebar/TitleBar.cxx
@@ -94,13 +94,13 @@ void TitleBar::DataChanged (const DataChangedEvent& /*rEvent*/)
     Invalidate();
 }
 
-void TitleBar::setPosSizePixel (long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags)
+void TitleBar::setPosSizePixel (long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags)
 {
     Window::setPosSizePixel(nX, nY, nWidth, nHeight, nFlags);
 
     // Place the toolbox.
     const sal_Int32 nToolBoxWidth (maToolBox->GetItemPosRect(0).GetWidth());
-    maToolBox->setPosSizePixel(nWidth - nToolBoxWidth,0, nToolBoxWidth, nHeight, WINDOW_POSSIZE_POSSIZE);
+    maToolBox->setPosSizePixel(nWidth - nToolBoxWidth,0, nToolBoxWidth, nHeight, PosSizeFlags::PosSize);
     maToolBox->Show();
 }
 
diff --git a/sfx2/source/sidebar/TitleBar.hxx b/sfx2/source/sidebar/TitleBar.hxx
index 3372385..b0bc5d8 100644
--- a/sfx2/source/sidebar/TitleBar.hxx
+++ b/sfx2/source/sidebar/TitleBar.hxx
@@ -41,7 +41,7 @@ public:
     virtual void ApplySettings(vcl::RenderContext& rRenderContext) SAL_OVERRIDE;
     virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle& rUpdateArea) SAL_OVERRIDE;
     virtual void DataChanged (const DataChangedEvent& rEvent) SAL_OVERRIDE;
-    virtual void setPosSizePixel (long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL) SAL_OVERRIDE;
+    virtual void setPosSizePixel (long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All) SAL_OVERRIDE;
 
     ToolBox& GetToolBox()
     {
diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx
index ffd68d6..e560bcd 100644
--- a/svtools/source/control/calendar.cxx
+++ b/svtools/source/control/calendar.cxx
@@ -2222,7 +2222,7 @@ void ImplCFieldFloatWin::ArrangeButtons()
         }
         long nLineWidth = aOutSize.Width()-(CALFIELD_BORDERLINE_X*2);
         mpFixedLine->setPosSizePixel( (aOutSize.Width()-nLineWidth)/2, aOutSize.Height()+((CALFIELD_BORDER_YTOP-2)/2),
-                                      nLineWidth, 2, WINDOW_POSSIZE_POSSIZE );
+                                      nLineWidth, 2, PosSizeFlags::PosSize );
         aOutSize.Height() += nBtnHeight + (CALFIELD_BORDER_Y*2) + CALFIELD_BORDER_YTOP;
         SetOutputSizePixel( aOutSize );
     }
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index 49e784a..2180346 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -219,7 +219,7 @@ void ValueSet::ImplInitScrollBar()
         {
             // adapt the width because of the changed settings
             long nScrBarWidth = Application::GetSettings().GetStyleSettings().GetScrollBarSize();
-            mxScrollBar->setPosSizePixel(0, 0, nScrBarWidth, 0, WINDOW_POSSIZE_WIDTH);
+            mxScrollBar->setPosSizePixel(0, 0, nScrBarWidth, 0, PosSizeFlags::Width);
         }
     }
 }
diff --git a/svtools/source/dialogs/wizdlg.cxx b/svtools/source/dialogs/wizdlg.cxx
index 2855ada..39d6390 100644
--- a/svtools/source/dialogs/wizdlg.cxx
+++ b/svtools/source/dialogs/wizdlg.cxx
@@ -195,13 +195,13 @@ void WizardDialog::ImplPosCtrls()
         long    nViewWidth = 0;
         long    nViewHeight = 0;
         long    nDlgHeight = nOffY;
-        sal_uInt16  nViewPosFlags = WINDOW_POSSIZE_POS;
+        PosSizeFlags nViewPosFlags = PosSizeFlags::Pos;
         if ( meViewAlign == WINDOWALIGN_TOP )
         {
             nViewOffX       = WIZARDDIALOG_VIEW_DLGOFFSET_X;
             nViewOffY       = WIZARDDIALOG_VIEW_DLGOFFSET_Y;
             nViewWidth      = aDlgSize.Width()-(WIZARDDIALOG_VIEW_DLGOFFSET_X*2);
-            nViewPosFlags  |= WINDOW_POSSIZE_WIDTH;
+            nViewPosFlags  |= PosSizeFlags::Width;
         }
         else if ( meViewAlign == WINDOWALIGN_LEFT )
         {
@@ -217,21 +217,21 @@ void WizardDialog::ImplPosCtrls()
                 nViewOffY       = WIZARDDIALOG_VIEW_DLGOFFSET_Y;
                 nViewHeight     = nDlgHeight-(WIZARDDIALOG_VIEW_DLGOFFSET_Y*2);
             }
-            nViewPosFlags  |= WINDOW_POSSIZE_HEIGHT;
+            nViewPosFlags  |= PosSizeFlags::Height;
         }
         else if ( meViewAlign == WINDOWALIGN_BOTTOM )
         {
             nViewOffX       = WIZARDDIALOG_VIEW_DLGOFFSET_X;
             nViewOffY       = nDlgHeight-mpViewWindow->GetSizePixel().Height()-WIZARDDIALOG_VIEW_DLGOFFSET_Y;
             nViewWidth      = aDlgSize.Width()-(WIZARDDIALOG_VIEW_DLGOFFSET_X*2);
-            nViewPosFlags  |= WINDOW_POSSIZE_WIDTH;
+            nViewPosFlags  |= PosSizeFlags::Width;
         }
         else if ( meViewAlign == WINDOWALIGN_RIGHT )
         {
             nViewOffX       = aDlgSize.Width()-mpViewWindow->GetSizePixel().Width()-WIZARDDIALOG_VIEW_DLGOFFSET_X;
             nViewOffY       = WIZARDDIALOG_VIEW_DLGOFFSET_Y;
             nViewHeight     = nDlgHeight-(WIZARDDIALOG_VIEW_DLGOFFSET_Y*2);
-            nViewPosFlags  |= WINDOW_POSSIZE_HEIGHT;
+            nViewPosFlags  |= PosSizeFlags::Height;
         }
         mpViewWindow->setPosSizePixel( nViewOffX, nViewOffY,
                                        nViewWidth, nViewHeight,
diff --git a/svx/source/sidebar/PanelLayout.cxx b/svx/source/sidebar/PanelLayout.cxx
index 1b5173d..591dfe3 100644
--- a/svx/source/sidebar/PanelLayout.cxx
+++ b/svx/source/sidebar/PanelLayout.cxx
@@ -69,7 +69,7 @@ IMPL_LINK_NOARG_TYPED( PanelLayout, ImplHandlePanelLayoutTimerHdl, Idle*, void )
     VclContainer::setLayoutAllocation(*pChild, Point(0, 0), GetSizePixel());
 }
 
-void PanelLayout::setPosSizePixel(long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags)
+void PanelLayout::setPosSizePixel(long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags)
 {
     bool bCanHandleSmallerWidth = false;
     bool bCanHandleSmallerHeight = false;
@@ -94,7 +94,7 @@ void PanelLayout::setPosSizePixel(long nX, long nY, long nWidth, long nHeight, s
 
     Control::setPosSizePixel(nX, nY, nWidth, nHeight, nFlags);
 
-    if (bIsLayoutEnabled && (nFlags & WINDOW_POSSIZE_SIZE))
+    if (bIsLayoutEnabled && (nFlags & PosSizeFlags::Size))
         VclContainer::setLayoutAllocation(*pChild, Point(0, 0), Size(nWidth, nHeight));
 }
 
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index 25e7277..0872760 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -632,7 +632,7 @@ void SwNavigationPI::Resize()
         aGlobalTree->SetSizePixel(aNewSize);
         aDocListBox->setPosSizePixel( aLBPos.X(), aLBPos.Y(),
             aDocLBSz.Width(), aDocLBSz.Height(),
-            WINDOW_POSSIZE_X|WINDOW_POSSIZE_Y|WINDOW_POSSIZE_WIDTH);
+            PosSizeFlags::X|PosSizeFlags::Y|PosSizeFlags::Width);
     }
 }
 
@@ -754,7 +754,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
         }
     }
 
-    aContentTree->setPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y );
+    aContentTree->setPosSizePixel( 0, nListboxYPos, 0, 0, PosSizeFlags::Y );
     aContentTree->SetStyle( aContentTree->GetStyle()|WB_HASBUTTONS|WB_HASBUTTONSATROOT|
                             WB_CLIPCHILDREN|WB_HSCROLL|WB_FORCE_MAKEVISIBLE );
     aContentTree->SetSpaceBetweenEntries(3);
@@ -767,7 +767,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings,
     aContentToolBox->CheckItem(FN_SHOW_CONTENT_BOX, true);
 
 //  TreeListBox for global document
-    aGlobalTree->setPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y );
+    aGlobalTree->setPosSizePixel( 0, nListboxYPos, 0, 0, PosSizeFlags::Y );
     aGlobalTree->SetSelectionMode( MULTIPLE_SELECTION );
     aGlobalTree->SetStyle( aGlobalTree->GetStyle()|WB_HASBUTTONS|WB_HASBUTTONSATROOT|
                                 WB_CLIPCHILDREN|WB_HSCROLL );
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index e2439fc..f315f99 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -970,9 +970,9 @@ void VCLXWindow::setPosSize( sal_Int32 X, sal_Int32 Y, sal_Int32 Width, sal_Int3
     if ( GetWindow() )
     {
         if( vcl::Window::GetDockingManager()->IsDockable( GetWindow() ) )
-            vcl::Window::GetDockingManager()->SetPosSizePixel( GetWindow() , X, Y, Width, Height, Flags );
+            vcl::Window::GetDockingManager()->SetPosSizePixel( GetWindow() , X, Y, Width, Height, static_cast<PosSizeFlags>(Flags) );
         else
-            GetWindow()->setPosSizePixel( X, Y, Width, Height, Flags );
+            GetWindow()->setPosSizePixel( X, Y, Width, Height, static_cast<PosSizeFlags>(Flags) );
     }
 }
 
diff --git a/vcl/inc/ilstbox.hxx b/vcl/inc/ilstbox.hxx
index bceba39..8a5bca2 100644
--- a/vcl/inc/ilstbox.hxx
+++ b/vcl/inc/ilstbox.hxx
@@ -536,7 +536,7 @@ public:
     void            StartFloat( bool bStartTracking );
 
     virtual void    setPosSizePixel( long nX, long nY,
-                                     long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ) SAL_OVERRIDE;
+                                     long nWidth, long nHeight, PosSizeFlags nFlags = PosSizeFlags::All ) SAL_OVERRIDE;
     void            SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ) SAL_OVERRIDE
                         { FloatingWindow::SetPosSizePixel( rNewPos, rNewSize ); }
 
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 1cd46dd..d2f128a 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -1159,7 +1159,7 @@ void PushButton::ImplSetDefButton( bool bSet )
         ImplGetButtonState() &= ~DrawButtonFlags::Default;
     }
     if( bSetPos )
-        setPosSizePixel( aPos.X(), aPos.Y(), aSize.Width(), aSize.Height(), WINDOW_POSSIZE_ALL );
+        setPosSizePixel( aPos.X(), aPos.Y(), aSize.Width(), aSize.Height(), PosSizeFlags::All );
 
     Invalidate();
 }
@@ -3463,7 +3463,7 @@ void CheckBox::GetFocus()
         aPos.Move(-1,-1);
         aSize.Height() += 2;
         aSize.Width() += 2;
-        setPosSizePixel( aPos.X(), aPos.Y(), aSize.Width(), aSize.Height(), WINDOW_POSSIZE_ALL );
+        setPosSizePixel( aPos.X(), aPos.Y(), aSize.Width(), aSize.Height(), PosSizeFlags::All );
         Invalidate();
     }
     else
@@ -3494,7 +3494,7 @@ void CheckBox::LoseFocus()
         aPos.Move(1,1);
         aSize.Height() -= 2;
         aSize.Width() -= 2;
-        setPosSizePixel( aPos.X(), aPos.Y(), aSize.Width(), aSize.Height(), WINDOW_POSSIZE_ALL );
+        setPosSizePixel( aPos.X(), aPos.Y(), aSize.Width(), aSize.Height(), PosSizeFlags::All );
         Invalidate();
     }
 }
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 3991274..dde32df 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -537,18 +537,18 @@ sal_uInt16 ComboBox::GetDropDownLineCount() const
 }
 
 void ComboBox::setPosSizePixel( long nX, long nY, long nWidth, long nHeight,
-                                sal_uInt16 nFlags )
+                                PosSizeFlags nFlags )
 {
-    if( IsDropDownBox() && ( nFlags & WINDOW_POSSIZE_SIZE ) )
+    if( IsDropDownBox() && ( nFlags & PosSizeFlags::Size ) )
     {
         Size aPrefSz = mpFloatWin->GetPrefSize();
-        if ( ( nFlags & WINDOW_POSSIZE_HEIGHT ) && ( nHeight >= 2*mnDDHeight ) )
+        if ( ( nFlags & PosSizeFlags::Height ) && ( nHeight >= 2*mnDDHeight ) )
             aPrefSz.Height() = nHeight-mnDDHeight;
-        if ( nFlags & WINDOW_POSSIZE_WIDTH )
+        if ( nFlags & PosSizeFlags::Width )
             aPrefSz.Width() = nWidth;
         mpFloatWin->SetPrefSize( aPrefSz );
 
-        if ( IsAutoSizeEnabled() && ! (nFlags & WINDOW_POSSIZE_DROPDOWN) )
+        if ( IsAutoSizeEnabled() && ! (nFlags & PosSizeFlags::Dropdown) )
             nHeight = mnDDHeight;
     }
 
diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx
index 0407eed..e9c4f92 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -3036,21 +3036,21 @@ bool ImplListBoxFloatingWindow::PreNotify( NotifyEvent& rNEvt )
     return FloatingWindow::PreNotify( rNEvt );
 }
 
-void ImplListBoxFloatingWindow::setPosSizePixel( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags )
+void ImplListBoxFloatingWindow::setPosSizePixel( long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags )
 {
     FloatingWindow::setPosSizePixel( nX, nY, nWidth, nHeight, nFlags );
 
     // Fix #60890# ( MBA ): to be able to resize the Listbox even in its open state
     // after a call to Resize(), we adjust its position if necessary
-    if ( IsReallyVisible() && ( nFlags & WINDOW_POSSIZE_HEIGHT ) )
+    if ( IsReallyVisible() && ( nFlags & PosSizeFlags::Height ) )
     {
         Point aPos = GetParent()->GetPosPixel();
         aPos = GetParent()->GetParent()->OutputToScreenPixel( aPos );
 
-        if ( nFlags & WINDOW_POSSIZE_X )
+        if ( nFlags & PosSizeFlags::X )
             aPos.X() = nX;
 
-        if ( nFlags & WINDOW_POSSIZE_Y )
+        if ( nFlags & PosSizeFlags::Y )
             aPos.Y() = nY;
 
         sal_uInt16 nIndex;
diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx
index 58d9c13..4fbc24e 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -605,18 +605,18 @@ sal_uInt16 ListBox::GetDropDownLineCount() const
     return mnLineCount;
 }
 
-void ListBox::setPosSizePixel( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags )
+void ListBox::setPosSizePixel( long nX, long nY, long nWidth, long nHeight, PosSizeFlags nFlags )
 {
-    if( IsDropDownBox() && ( nFlags & WINDOW_POSSIZE_SIZE ) )
+    if( IsDropDownBox() && ( nFlags & PosSizeFlags::Size ) )
     {
         Size aPrefSz = mpFloatWin->GetPrefSize();
-        if ( ( nFlags & WINDOW_POSSIZE_HEIGHT ) && ( nHeight >= 2*mnDDHeight ) )
+        if ( ( nFlags & PosSizeFlags::Height ) && ( nHeight >= 2*mnDDHeight ) )
             aPrefSz.Height() = nHeight-mnDDHeight;
-        if ( nFlags & WINDOW_POSSIZE_WIDTH )
+        if ( nFlags & PosSizeFlags::Width )
             aPrefSz.Width() = nWidth;
         mpFloatWin->SetPrefSize( aPrefSz );
 
-        if ( IsAutoSizeEnabled() && ! (nFlags & WINDOW_POSSIZE_DROPDOWN) )
+        if ( IsAutoSizeEnabled() && ! (nFlags & PosSizeFlags::Dropdown) )
             nHeight = mnDDHeight;
     }
 
diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx
index 55d1c9f..406dbe2 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -854,10 +854,10 @@ bool ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const Track
                     // no move (only resize) if position did not change
                     if( aOldPos != aNewRect.TopLeft() )
                         pBorderWindow->setPosSizePixel( aNewRect.Left(), aNewRect.Top(),
-                                                    aNewRect.GetWidth(), aNewRect.GetHeight(), WINDOW_POSSIZE_POSSIZE );
+                                                    aNewRect.GetWidth(), aNewRect.GetHeight(), PosSizeFlags::PosSize );
                     else
                         pBorderWindow->setPosSizePixel( aNewRect.Left(), aNewRect.Top(),
-                                                    aNewRect.GetWidth(), aNewRect.GetHeight(), WINDOW_POSSIZE_SIZE );
+                                                    aNewRect.GetWidth(), aNewRect.GetHeight(), PosSizeFlags::Size );
 
                     pBorderWindow->ImplUpdateAll();
                     pBorderWindow->ImplGetFrameWindow()->ImplUpdateAll();
@@ -1959,8 +1959,8 @@ void ImplBorderWindow::Resize()
                                               nTopBorder,
                                               aSize.Width()-nLeftBorder-nRightBorder,
                                               nMenuHeight,
-                                              WINDOW_POSSIZE_POS |
-                                              WINDOW_POSSIZE_WIDTH | WINDOW_POSSIZE_HEIGHT );
+                                              PosSizeFlags::Pos |
+                                              PosSizeFlags::Width | PosSizeFlags::Height );
         }
 
         GetBorder( pClientWindow->mpWindowImpl->mnLeftBorder, pClientWindow->mpWindowImpl->mnTopBorder,
@@ -1969,8 +1969,8 @@ void ImplBorderWindow::Resize()
                                           pClientWindow->mpWindowImpl->mnTopBorder,
                                           aSize.Width()-pClientWindow->mpWindowImpl->mnLeftBorder-pClientWindow->mpWindowImpl->mnRightBorder,
                                           aSize.Height()-pClientWindow->mpWindowImpl->mnTopBorder-pClientWindow->mpWindowImpl->mnBottomBorder,
-                                          WINDOW_POSSIZE_X | WINDOW_POSSIZE_Y |
-                                          WINDOW_POSSIZE_WIDTH | WINDOW_POSSIZE_HEIGHT );
+                                          PosSizeFlags::X | PosSizeFlags::Y |
+                                          PosSizeFlags::Width | PosSizeFlags::Height );
     }
 
     // UpdateView
diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx
index 3811142..52708dd 100644
--- a/vcl/source/window/dockmgr.cxx
+++ b/vcl/source/window/dockmgr.cxx
@@ -253,7 +253,7 @@ void ImplDockFloatWin2::Resize()
     {
         FloatingWindow::Resize();
         Size aSize( GetSizePixel() );
-        mpDockWin->GetWindow()->ImplPosSizeWindow( 0, 0, aSize.Width(), aSize.Height(), WINDOW_POSSIZE_POSSIZE ); // TODO: is this needed ???
+        mpDockWin->GetWindow()->ImplPosSizeWindow( 0, 0, aSize.Width(), aSize.Height(), PosSizeFlags::PosSize ); // TODO: is this needed ???
     }
 }
 
@@ -429,7 +429,7 @@ void DockingManager::RemoveWindow( const vcl::Window *pWindow )
 
 void DockingManager::SetPosSizePixel( vcl::Window *pWindow, long nX, long nY,
                                     long nWidth, long nHeight,
-                                    sal_uInt16 nFlags )
+                                    PosSizeFlags nFlags )
 {
     ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow );
     if( pWrapper )
@@ -1318,7 +1318,7 @@ void ImplDockingWindowWrapper::SetFloatStyle( WinBits nStyle )
 
 void ImplDockingWindowWrapper::setPosSizePixel( long nX, long nY,
                                      long nWidth, long nHeight,
-                                     sal_uInt16 nFlags )
+                                     PosSizeFlags nFlags )
 {
     if ( mpFloatWin )
         mpFloatWin->setPosSizePixel( nX, nY, nWidth, nHeight, nFlags );
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index 2c4704d..e76b1c6 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -216,7 +216,7 @@ void ImplDockFloatWin::Resize()
 {
     FloatingWindow::Resize();
     Size aSize( GetSizePixel() );
-    mpDockWin->ImplPosSizeWindow( 0, 0, aSize.Width(), aSize.Height(), WINDOW_POSSIZE_POSSIZE );
+    mpDockWin->ImplPosSizeWindow( 0, 0, aSize.Width(), aSize.Height(), PosSizeFlags::PosSize );
 }
 
 void ImplDockFloatWin::TitleButtonClick( TitleButton nButton )
@@ -916,7 +916,7 @@ WinBits DockingWindow::GetFloatStyle() const
 
 void DockingWindow::setPosSizePixel( long nX, long nY,
                                      long nWidth, long nHeight,
-                                     sal_uInt16 nFlags )
+                                     PosSizeFlags nFlags )
 {
     ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this );
     if (pWrapper)
diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx
index 1898d66..fc266f2 100644
--- a/vcl/source/window/menubarwindow.cxx
+++ b/vcl/source/window/menubarwindow.cxx
@@ -208,7 +208,7 @@ void MenuBarWindow::SetMenu( MenuBar* pMen )
 
 void MenuBarWindow::SetHeight(long nHeight)
 {
-    setPosSizePixel(0, 0, 0, nHeight, WINDOW_POSSIZE_HEIGHT);
+    setPosSizePixel(0, 0, 0, nHeight, PosSizeFlags::Height);
 }
 
 void MenuBarWindow::ShowButtons( bool bClose, bool bFloat, bool bHide )
@@ -1013,7 +1013,7 @@ void MenuBarWindow::LayoutChanged()
     {
         nHeight = 0;
     }
-    setPosSizePixel(0, 0, 0, nHeight, WINDOW_POSSIZE_HEIGHT);
+    setPosSizePixel(0, 0, 0, nHeight, PosSizeFlags::Height);
     GetParent()->Resize();
     Invalidate();
     Resize();
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index a85fe4a..d348e2b 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -748,15 +748,15 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData )
     }
     else
     {
-        sal_uInt16 nPosSize = 0;
+        PosSizeFlags nPosSize = PosSizeFlags::NONE;
         if ( nValidMask & WINDOWSTATE_MASK_X )
-            nPosSize |= WINDOW_POSSIZE_X;
+            nPosSize |= PosSizeFlags::X;
         if ( nValidMask & WINDOWSTATE_MASK_Y )
-            nPosSize |= WINDOW_POSSIZE_Y;
+            nPosSize |= PosSizeFlags::Y;
         if ( nValidMask & WINDOWSTATE_MASK_WIDTH )
-            nPosSize |= WINDOW_POSSIZE_WIDTH;
+            nPosSize |= PosSizeFlags::Width;
         if ( nValidMask & WINDOWSTATE_MASK_HEIGHT )
-            nPosSize |= WINDOW_POSSIZE_HEIGHT;
+            nPosSize |= PosSizeFlags::Height;
 
         if( IsRollUp() )
             RollDown();
diff --git a/vcl/source/window/tabdlg.cxx b/vcl/source/window/tabdlg.cxx
index 47e9912..1080cb8 100644
--- a/vcl/source/window/tabdlg.cxx
+++ b/vcl/source/window/tabdlg.cxx
@@ -95,14 +95,14 @@ void TabDialog::ImplPosControls()
             long    nViewOffY = 0;
             long    nViewWidth = 0;
             long    nViewHeight = 0;
-            sal_uInt16  nViewPosFlags = WINDOW_POSSIZE_POS;
+            PosSizeFlags nViewPosFlags = PosSizeFlags::Pos;
             Size    aViewSize = mpViewWindow->GetSizePixel();
             if (  meViewAlign == WINDOWALIGN_TOP )
             {
                 nViewOffX       = aTabOffset.X();
                 nViewOffY       = nOffY+IMPL_DIALOG_OFFSET;
                 nViewWidth      = aTabSize.Width();
-                nViewPosFlags  |= WINDOW_POSSIZE_WIDTH;
+                nViewPosFlags  |= PosSizeFlags::Width;
                 aTabOffset.Y() += aViewSize.Height()+IMPL_DIALOG_OFFSET;
                 aDlgSize.Height() += aViewSize.Height()+IMPL_DIALOG_OFFSET;
             }
@@ -111,7 +111,7 @@ void TabDialog::ImplPosControls()
                 nViewOffX       = aTabOffset.X();
                 nViewOffY       = aTabOffset.Y()+aTabSize.Height()+IMPL_DIALOG_OFFSET;
                 nViewWidth      = aTabSize.Width();
-                nViewPosFlags  |= WINDOW_POSSIZE_WIDTH;
+                nViewPosFlags  |= PosSizeFlags::Width;
                 aDlgSize.Height() += aViewSize.Height()+IMPL_DIALOG_OFFSET;
             }
             else if (  meViewAlign == WINDOWALIGN_RIGHT )
@@ -119,7 +119,7 @@ void TabDialog::ImplPosControls()
                 nViewOffX       = aTabOffset.X()+aTabSize.Width()+IMPL_DIALOG_OFFSET;
                 nViewOffY       = aTabOffset.Y();
                 nViewHeight     = aTabSize.Height();
-                nViewPosFlags  |= WINDOW_POSSIZE_HEIGHT;
+                nViewPosFlags  |= PosSizeFlags::Height;
                 aDlgSize.Width() += aViewSize.Width()+IMPL_DIALOG_OFFSET;
                 nBtnEx          = aViewSize.Width()+IMPL_DIALOG_OFFSET;
             }
@@ -128,7 +128,7 @@ void TabDialog::ImplPosControls()
                 nViewOffX       = IMPL_DIALOG_OFFSET;
                 nViewOffY       = aTabOffset.Y();
                 nViewHeight     = aTabSize.Height();
-                nViewPosFlags  |= WINDOW_POSSIZE_HEIGHT;
+                nViewPosFlags  |= PosSizeFlags::Height;
                 aTabOffset.X() += aViewSize.Width()+IMPL_DIALOG_OFFSET;
                 aDlgSize.Width() += aViewSize.Width()+IMPL_DIALOG_OFFSET;
                 nBtnEx          = aViewSize.Width()+IMPL_DIALOG_OFFSET;
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 4e99263..b9ea0e6 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -1537,7 +1537,7 @@ void Window::ImplUpdateSysObjPos()
 }
 
 void Window::ImplPosSizeWindow( long nX, long nY,
-                                long nWidth, long nHeight, sal_uInt16 nFlags )
+                                long nWidth, long nHeight, PosSizeFlags nFlags )
 {
     bool    bNewPos         = false;
     bool    bNewSize        = false;
@@ -1567,12 +1567,12 @@ void Window::ImplPosSizeWindow( long nX, long nY,
     }
 
     bool bnXRecycled = false; // avoid duplicate mirroring in RTL case
-    if ( nFlags & WINDOW_POSSIZE_WIDTH )
+    if ( nFlags & PosSizeFlags::Width )
     {
-        if(!( nFlags & WINDOW_POSSIZE_X ))
+        if(!( nFlags & PosSizeFlags::X ))
         {
             nX = mpWindowImpl->mnX;
-            nFlags |= WINDOW_POSSIZE_X;
+            nFlags |= PosSizeFlags::X;
             bnXRecycled = true; // we're using a mnX which was already mirrored in RTL case
         }
 
@@ -1585,7 +1585,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
             bCopyBits = false;
         }
     }
-    if ( nFlags & WINDOW_POSSIZE_HEIGHT )
+    if ( nFlags & PosSizeFlags::Height )
     {
         if ( nHeight < 0 )
             nHeight = 0;
@@ -1597,7 +1597,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
         }
     }
 
-    if ( nFlags & WINDOW_POSSIZE_X )
+    if ( nFlags & PosSizeFlags::X )
     {
         long nOrgX = nX;
         // --- RTL ---  (compare the screen coordinates)
@@ -1652,7 +1652,7 @@ void Window::ImplPosSizeWindow( long nX, long nY,
             bNewPos = true;
         }
     }
-    if ( nFlags & WINDOW_POSSIZE_Y )
+    if ( nFlags & PosSizeFlags::Y )
     {
         // check maPos as well, as it could have been changed for client windows (ImplCallMove())
         if ( nY != mpWindowImpl->mnY || nY != mpWindowImpl->maPos.Y() )
@@ -1686,8 +1686,8 @@ void Window::ImplPosSizeWindow( long nX, long nY,
                                                mpWindowImpl->mpClientWindow->mpWindowImpl->mnTopBorder,
                                                mnOutWidth-mpWindowImpl->mpClientWindow->mpWindowImpl->mnLeftBorder-mpWindowImpl->mpClientWindow->mpWindowImpl->mnRightBorder,
                                                mnOutHeight-mpWindowImpl->mpClientWindow->mpWindowImpl->mnTopBorder-mpWindowImpl->mpClientWindow->mpWindowImpl->mnBottomBorder,
-                                               WINDOW_POSSIZE_X | WINDOW_POSSIZE_Y |
-                                               WINDOW_POSSIZE_WIDTH | WINDOW_POSSIZE_HEIGHT );
+                                               PosSizeFlags::X | PosSizeFlags::Y |
+                                               PosSizeFlags::Width | PosSizeFlags::Height );
             // If we have a client window, then this is the position
             // of the Application's floating windows
             mpWindowImpl->mpClientWindow->mpWindowImpl->maPos = mpWindowImpl->maPos;
@@ -2831,14 +2831,14 @@ void Window::SetActivateMode( sal_uInt16 nMode )
 }
 
 void Window::setPosSizePixel( long nX, long nY,
-                              long nWidth, long nHeight, sal_uInt16 nFlags )
+                              long nWidth, long nHeight, PosSizeFlags nFlags )
 {
 
     bool bHasValidSize = !mpWindowImpl->mbDefSize;
 
-    if ( nFlags & WINDOW_POSSIZE_POS )
+    if ( nFlags & PosSizeFlags::Pos )
         mpWindowImpl->mbDefPos = false;
-    if ( nFlags & WINDOW_POSSIZE_SIZE )
+    if ( nFlags & PosSizeFlags::Size )
         mpWindowImpl->mbDefSize = false;
 
     // The top BorderWindow is the window which is to be positioned
@@ -2853,19 +2853,19 @@ void Window::setPosSizePixel( long nX, long nY,
         // as the position of the border ! (due to limitations of several UNIX window managers)
         long nOldWidth  = pWindow->mnOutWidth;
 
-        if ( !(nFlags & WINDOW_POSSIZE_WIDTH) )
+        if ( !(nFlags & PosSizeFlags::Width) )
             nWidth = pWindow->mnOutWidth;
-        if ( !(nFlags & WINDOW_POSSIZE_HEIGHT) )
+        if ( !(nFlags & PosSizeFlags::Height) )
             nHeight = pWindow->mnOutHeight;
 
         sal_uInt16 nSysFlags=0;
         vcl::Window *pParent = GetParent();
 
-        if( nFlags & WINDOW_POSSIZE_WIDTH )
+        if( nFlags & PosSizeFlags::Width )
             nSysFlags |= SAL_FRAME_POSSIZE_WIDTH;
-        if( nFlags & WINDOW_POSSIZE_HEIGHT )
+        if( nFlags & PosSizeFlags::Height )
             nSysFlags |= SAL_FRAME_POSSIZE_HEIGHT;
-        if( nFlags & WINDOW_POSSIZE_X )
+        if( nFlags & PosSizeFlags::X )
         {
             nSysFlags |= SAL_FRAME_POSSIZE_X;
             if( pParent && (pWindow->GetStyle() & WB_SYSTEMCHILDWINDOW) )
@@ -2881,7 +2881,7 @@ void Window::setPosSizePixel( long nX, long nY,
                 nX = aRect.Left();
             }
         }
-        if( !(nFlags & WINDOW_POSSIZE_X) && bHasValidSize && pWindow->mpWindowImpl->mpFrame->maGeometry.nWidth )
+        if( !(nFlags & PosSizeFlags::X) && bHasValidSize && pWindow->mpWindowImpl->mpFrame->maGeometry.nWidth )
         {
             // --- RTL ---  make sure the old right aligned position is not changed
             //              system windows will always grow to the right
@@ -2895,15 +2895,15 @@ void Window::setPosSizePixel( long nX, long nY,
                         myWidth = mpWindowImpl->mpFrame->GetUnmirroredGeometry().nWidth;
                     if( !myWidth )
                         myWidth = nWidth;
-                    nFlags |= WINDOW_POSSIZE_X;
+                    nFlags |= PosSizeFlags::X;
                     nSysFlags |= SAL_FRAME_POSSIZE_X;
                     nX = mpWindowImpl->mpFrame->GetUnmirroredGeometry().nX - pParent->mpWindowImpl->mpFrame->GetUnmirroredGeometry().nX -
                         mpWindowImpl->mpFrame->GetUnmirroredGeometry().nLeftDecoration;
                     nX = pParent->mpWindowImpl->mpFrame->GetUnmirroredGeometry().nX - mpWindowImpl->mpFrame->GetUnmirroredGeometry().nLeftDecoration +
                         pParent->mpWindowImpl->mpFrame->GetUnmirroredGeometry().nWidth - myWidth - 1 - mpWindowImpl->mpFrame->GetUnmirroredGeometry().nX;
-                    if(!(nFlags & WINDOW_POSSIZE_Y))
+                    if(!(nFlags & PosSizeFlags::Y))
                     {
-                        nFlags |= WINDOW_POSSIZE_Y;
+                        nFlags |= PosSizeFlags::Y;
                         nSysFlags |= SAL_FRAME_POSSIZE_Y;
                         nY = mpWindowImpl->mpFrame->GetUnmirroredGeometry().nY - pWindow->GetParent()->mpWindowImpl->mpFrame->GetUnmirroredGeometry().nY -
                             mpWindowImpl->mpFrame->GetUnmirroredGeometry().nTopDecoration;
@@ -2911,7 +2911,7 @@ void Window::setPosSizePixel( long nX, long nY,
                 }
             }
         }
-        if( nFlags & WINDOW_POSSIZE_Y )
+        if( nFlags & PosSizeFlags::Y )
         {
             nSysFlags |= SAL_FRAME_POSSIZE_Y;
             if( pParent && (pWindow->GetStyle() & WB_SYSTEMCHILDWINDOW) )
diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index fc52397..c38a2b2 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -1411,20 +1411,20 @@ VCLXWindow* Window::GetWindowPeer() const
 
 void Window::SetPosPixel( const Point& rNewPos )
 {
-    setPosSizePixel( rNewPos.X(), rNewPos.Y(), 0, 0, WINDOW_POSSIZE_POS );
+    setPosSizePixel( rNewPos.X(), rNewPos.Y(), 0, 0, PosSizeFlags::Pos );
 }
 
 void Window::SetSizePixel( const Size& rNewSize )
 {
     setPosSizePixel( 0, 0, rNewSize.Width(), rNewSize.Height(),
-                     WINDOW_POSSIZE_SIZE );
+                     PosSizeFlags::Size );
 }
 
 void Window::SetPosSizePixel( const Point& rNewPos, const Size& rNewSize )
 {
     setPosSizePixel( rNewPos.X(), rNewPos.Y(),
                      rNewSize.Width(), rNewSize.Height(),
-                     WINDOW_POSSIZE_POSSIZE );
+                     PosSizeFlags::PosSize );
 }
 
 void Window::SetOutputSizePixel( const Size& rNewSize )
commit 566922a98d548529feacb7c21bfc8897ff5b61af
Author: Noel Grandin <noel at peralex.com>
Date:   Thu May 21 15:52:27 2015 +0200

    convert WINDOW constants for GetWindow() methods to scoped enum
    
    Change-Id: I0c7c6d095732704eb4ab48f1277a0592b1c7fa33

diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index cf6021e..6146c5db 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 1444b79..66fedee 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 e73399c..813999a 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 9e760e3..a31ca52 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)
@@ -1111,7 +1114,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;
 
@@ -1241,8 +1244,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 99d4f58..5219f96 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 ce482a3..ba02adc 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 de6525e..a30175d 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 606bddb..5301029 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 b655c57..6db9021 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 21e56b4..3aa7003 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 b69ee96..cf02dd9 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 ba15fd4..d58f856 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 e7c0af1..e60edb1 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 66cc84a..ba465af 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 156159c..ffb47bb 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 2e70850..ca3acd9 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 2535f9b..1b5173d 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 b31308d..e75acd8 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 1dcb9b8..9031492 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 496a3f7..aff9623 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 937e48a..2476e1f 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 56b620c..eafa539 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 4d6e1cb..2a63e79 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 8bf7467..9a17407 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 70baaa0..1cd46dd 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 635ba11..3991274 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 f621aa5..5584903 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 ad25491..0407eed 100644
--- a/vcl/source/control/ilstbox.cxx
+++ b/vcl/source/control/ilstbox.cxx
@@ -2667,8 +2667,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();
             }
         }
     }
@@ -2710,9 +2710,9 @@ void ImplWin::ImplDraw( 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 )
@@ -2926,7 +2926,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();
@@ -2943,7 +2943,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 6da20c0..8d9a5cb 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 170e60d..58d9c13 100644
--- a/vcl/source/control/lstbox.cxx
+++ b/vcl/source/control/lstbox.cxx
@@ -633,7 +633,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;
@@ -793,7 +793,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 fa4bf44..d5547df 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 07abf75..39befda 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 ba281fd..55d1c9f 100644
--- a/vcl/source/window/brdwin.cxx
+++ b/vcl/source/window/brdwin.cxx
@@ -1017,7 +1017,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;
@@ -1198,7 +1198,7 @@ void ImplSmallBorderWindowView::DrawWindow(sal_uInt16 nDrawFlags, OutputDevice*,
 
     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())
         {
@@ -1281,10 +1281,10 @@ void ImplSmallBorderWindowView::DrawWindow(sal_uInt16 nDrawFlags, OutputDevice*,
         }
 
         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( sal_uInt16 nDrawFlags, OutputDevice* p
         // 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 6453386..64d08c4 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 d0f4275..3ef2bc9 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 d760639..4df611e 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);

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list