compilerplugins/clang/unusedenumconstants.untouched.results |    4 
 compilerplugins/clang/unusedenumconstants.writeonly.results |    2 
 fpicker/source/office/RemoteFilesDialog.cxx                 |    2 
 fpicker/source/office/iodlg.cxx                             |    2 
 framework/source/helper/persistentwindowstate.cxx           |    2 
 include/tools/gen.hxx                                       |    8 
 include/vcl/WindowPosSize.hxx                               |  137 ++++
 include/vcl/syswin.hxx                                      |    6 
 include/vcl/vclenum.hxx                                     |   39 -
 include/vcl/weld.hxx                                        |    3 
 include/vcl/windowstate.hxx                                 |   98 ++-
 include/vcl/wrkwin.hxx                                      |    2 
 reportdesign/source/ui/dlg/Formula.cxx                      |    2 
 reportdesign/source/ui/report/DesignView.cxx                |    4 
 reportdesign/source/ui/report/ReportController.cxx          |    2 
 sfx2/source/appl/childwin.cxx                               |    8 
 sfx2/source/dialog/basedlgs.cxx                             |    4 
 sfx2/source/dialog/recfloat.cxx                             |    9 
 solenv/clang-format/excludelist                             |    1 
 sw/source/ui/misc/bookmark.cxx                              |    3 
 sw/source/uibase/envelp/syncbtn.cxx                         |    9 
 vcl/headless/svpframe.cxx                                   |   76 +-
 vcl/inc/headless/svpframe.hxx                               |    4 
 vcl/inc/osx/salframe.h                                      |    4 
 vcl/inc/qt5/QtFrame.hxx                                     |    4 
 vcl/inc/salframe.hxx                                        |   12 
 vcl/inc/salgeom.hxx                                         |  101 ++-
 vcl/inc/salvtables.hxx                                      |    2 
 vcl/inc/salwtype.hxx                                        |   21 
 vcl/inc/unx/gtk/gtkframe.hxx                                |    6 
 vcl/inc/unx/salframe.h                                      |    4 
 vcl/inc/win/salframe.h                                      |    8 
 vcl/inc/window.h                                            |    4 
 vcl/osx/salframe.cxx                                        |  183 ++---
 vcl/osx/salframeview.mm                                     |   34 -
 vcl/osx/salgdiutils.cxx                                     |    4 
 vcl/osx/salmenu.cxx                                         |    8 
 vcl/osx/salnativewidgets.cxx                                |    4 
 vcl/qt5/QtFrame.cxx                                         |   92 +-
 vcl/qt5/QtMainWindow.cxx                                    |    3 
 vcl/qt5/QtWidget.cxx                                        |    7 
 vcl/quartz/AquaGraphicsBackend.cxx                          |    2 
 vcl/source/app/salvtables.cxx                               |    2 
 vcl/source/gdi/salgdilayout.cxx                             |    4 
 vcl/source/window/dockwin.cxx                               |   22 
 vcl/source/window/event.cxx                                 |    4 
 vcl/source/window/menu.cxx                                  |    2 
 vcl/source/window/printdlg.cxx                              |    2 
 vcl/source/window/syswin.cxx                                |  337 +++++-----
 vcl/source/window/window.cxx                                |   46 -
 vcl/source/window/winproc.cxx                               |    4 
 vcl/source/window/wrkwin.cxx                                |   31 
 vcl/unx/generic/app/wmadaptor.cxx                           |   87 +-
 vcl/unx/generic/gdi/gdiimpl.cxx                             |    4 
 vcl/unx/generic/window/salframe.cxx                         |  378 +++++-------
 vcl/unx/gtk3/gtkframe.cxx                                   |  204 ++----
 vcl/unx/gtk3/gtkinst.cxx                                    |   57 -
 vcl/unx/gtk3/gtksalmenu.cxx                                 |    4 
 vcl/win/gdi/gdiimpl.cxx                                     |    4 
 vcl/win/window/salframe.cxx                                 |  145 ++--
 60 files changed, 1139 insertions(+), 1128 deletions(-)

New commits:
commit ea5a0918c8c32309821ab239c4b95f4d6a3b5c12
Author:     Jan-Marek Glogowski <glo...@fbihome.de>
AuthorDate: Thu Jun 2 22:42:20 2022 +0200
Commit:     Jan-Marek Glogowski <glo...@fbihome.de>
CommitDate: Wed Jun 8 18:17:17 2022 +0200

    VCL add vcl::WindowPosSize abstract class
    
    ... and use it to remove a duplicate and simplify code.
    
    Should mostly be a refactoring, which was mainly done by some
    larger sed calls, except for the new API calls, which helped
    shrinking some LOC. All data is also now private.
    
    Originally two of the "replaced" "classes" had unsigned width
    and height and one had signed. Noel pointed out, that during
    calculations, the value might get negative temporarly, so this
    now settles with signed values. Still the set size should never
    be negative and this is enforced this way. Not sure that is what
    Noel had in mind.
    
    This also includes:
    - rename WindowState => WindowData
    - rename WindowStateMask => WindowDataMask
    - rename WindowStateState => WindowState
    - move WindowState and WindowDataMask to vcl/windowstate.hxx
    - move WindowData(Mask) and WindowState into vcl namespace
    - readability: replace or'ed WindowState enums with "meta" enums
      + add "meta" WindowState enums PosSize and PosSizeState
    
    Change-Id: Icd16cfb498531aa7238ddbde83fcb0ed6d9e4f77
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135426
    Tested-by: Jenkins
    Reviewed-by: Jan-Marek Glogowski <glo...@fbihome.de>

diff --git a/compilerplugins/clang/unusedenumconstants.untouched.results 
b/compilerplugins/clang/unusedenumconstants.untouched.results
index 58b8091b96f6..1f639cf2a666 100644
--- a/compilerplugins/clang/unusedenumconstants.untouched.results
+++ b/compilerplugins/clang/unusedenumconstants.untouched.results
@@ -139,9 +139,9 @@ include/vcl/toolkit/treelistbox.hxx:150
 include/vcl/toolkit/treelistbox.hxx:154
     enum DragDropMode ALL
 include/vcl/vclenum.hxx:310
-    enum WindowStateState Rollup
+    enum vcl::WindowState Rollup
 include/vcl/vclenum.hxx:313
-    enum WindowStateState FullScreen
+    enum vcl::WindowState FullScreen
 include/vcl/vclenum.hxx:408
     enum TrackingEventFlags Focus
 libreofficekit/qa/gtktiledviewer/gtv-lok-dialog.cxx:70
diff --git a/compilerplugins/clang/unusedenumconstants.writeonly.results 
b/compilerplugins/clang/unusedenumconstants.writeonly.results
index 07c5ebb31982..0d2f68303c8a 100644
--- a/compilerplugins/clang/unusedenumconstants.writeonly.results
+++ b/compilerplugins/clang/unusedenumconstants.writeonly.results
@@ -3047,7 +3047,7 @@ include/vcl/vclenum.hxx:134
 include/vcl/vclenum.hxx:143
     enum TimeFormat Hour24
 include/vcl/vclenum.hxx:314
-    enum WindowStateState SystemMask
+    enum vcl::WindowState SystemMask
 include/vcl/vclenum.hxx:331
     enum vcl::ImageType Small
 include/vcl/vclenum.hxx:353
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx 
b/fpicker/source/office/RemoteFilesDialog.cxx
index 4536690f9154..adaf756d3d8e 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -124,7 +124,7 @@ RemoteFilesDialog::~RemoteFilesDialog()
     if( !m_sIniKey.isEmpty() )
     {
         SvtViewOptions aDlgOpt( EViewType::Dialog, m_sIniKey );
-        
aDlgOpt.SetWindowState(OStringToOUString(m_xDialog->get_window_state(WindowStateMask::All),
 RTL_TEXTENCODING_UTF8));
+        
aDlgOpt.SetWindowState(OStringToOUString(m_xDialog->get_window_state(vcl::WindowDataMask::All),
 RTL_TEXTENCODING_UTF8));
 
         Size aSize(m_xDialog->get_size());
 
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index a7addbb10121..80fd8614aae6 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -467,7 +467,7 @@ SvtFileDialog::~SvtFileDialog()
     {
         // save window state
         SvtViewOptions aDlgOpt( EViewType::Dialog, m_xImpl->m_aIniKey );
-        
aDlgOpt.SetWindowState(OStringToOUString(m_xDialog->get_window_state(WindowStateMask::All),
 RTL_TEXTENCODING_UTF8));
+        
aDlgOpt.SetWindowState(OStringToOUString(m_xDialog->get_window_state(vcl::WindowDataMask::All),
 RTL_TEXTENCODING_UTF8));
         OUString sUserData = m_xFileView->GetConfigString();
         aDlgOpt.SetUserItem( "UserData",
                              Any( sUserData ) );
diff --git a/framework/source/helper/persistentwindowstate.cxx 
b/framework/source/helper/persistentwindowstate.cxx
index 2f7c9971935b..103a4bda7b57 100644
--- a/framework/source/helper/persistentwindowstate.cxx
+++ b/framework/source/helper/persistentwindowstate.cxx
@@ -215,7 +215,7 @@ OUString 
PersistentWindowState::implst_getWindowStateFromWindow(const css::uno::
         // check for system window is necessary to guarantee correct pointer 
cast!
         if ( pWindow && pWindow->IsSystemWindow() )
         {
-            WindowStateMask const nMask = WindowStateMask::All & 
~WindowStateMask::Minimized;
+            vcl::WindowDataMask const nMask = vcl::WindowDataMask::All & 
~vcl::WindowDataMask::Minimized;
             sWindowState = OStringToOUString(
                             
static_cast<SystemWindow*>(pWindow.get())->GetWindowState(nMask),
                             RTL_TEXTENCODING_UTF8);
diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx
index 20da07cb99af..7a8e66e2a6ff 100644
--- a/include/tools/gen.hxx
+++ b/include/tools/gen.hxx
@@ -481,6 +481,13 @@ inline std::basic_ostream<charT, traits> & operator <<(
 /// etc. methods interpret the interval as closed, while the lowercase
 /// getWidth() / getHeight() etc. methods interpret the interval as half-open.
 /// Ok, now is the time for despair.
+///
+/// If you want to work with Size, you must use the closed interval functions!
+/// And don't add getSize / setSize; this will probably just introduce bugs,
+/// especially when used in combination with list-initialization.
+///
+/// (Eventually you might notice, that the same engineer was also working on
+/// Qt at some point; see documentation on QRect::bottom / QRect::right ;-).
 namespace tools
 {
 class SAL_WARN_UNUSED TOOLS_DLLPUBLIC Rectangle final
@@ -493,6 +500,7 @@ public:
                          tools::Long nRight, tools::Long nBottom );
     /// Constructs an empty Rectangle, with top/left at the specified params
     constexpr Rectangle( tools::Long nLeft, tools::Long nTop );
+    /// Constructs a closed interval rectangle
     constexpr Rectangle( const Point& rLT, const Size& rSize );
 
     constexpr inline static Rectangle Justify(const Point& rLT, const Point& 
rRB);
diff --git a/include/vcl/WindowPosSize.hxx b/include/vcl/WindowPosSize.hxx
new file mode 100644
index 000000000000..c88444c6dd9a
--- /dev/null
+++ b/include/vcl/WindowPosSize.hxx
@@ -0,0 +1,137 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_VCL_FRAMEPOSSIZE_HXX
+#define INCLUDED_VCL_FRAMEPOSSIZE_HXX
+
+#include <vcl/dllapi.h>
+#include <o3tl/typed_flags_set.hxx>
+#include <rtl/string.hxx>
+#include <sal/types.h>
+#include <tools/gen.hxx>
+
+namespace vcl
+{
+/**
+ * There are multiple ways to store the two different areas of a vcl::Window.
+ * But this representataion is hopefully less error prone from the used types
+ * and more clear in what values in- or exclude the non-drawable window frame.
+ *
+ * There are especially two things to remember:
+ *  * pos() is the top-left position of the window frame
+ *  * size() returns just the drawable client area
+ *
+ * So these values actually don't represent any "real" geometry of either the
+ * outer frame or the inner client area of the window. That's my reason for
+ * naming the rectangle function posSize() instead of geometry(). Also to not
+ * be confused with Qt's geometry() function. YMMV.
+ *
+ * LO already is supposed to use this schema. FWIW, the Qt documentation claims
+ * "The differentiation is done in a way that covers the most common usage
+ * transparently." AFAIK this is common for most/all platforms / UI toolkits.
+ *
+ * The API is kept largely overload free, as we can now use 
list-initialization.
+ */
+class VCL_PLUGIN_PUBLIC WindowPosSize
+{
+    // position of the window frames left-top corner
+    sal_Int32 m_nX;
+    sal_Int32 m_nY;
+    // size of the client / drawable area, i.e. without decorations / borders
+    sal_Int32 m_nWidth;
+    sal_Int32 m_nHeight;
+
+protected:
+    WindowPosSize()
+        : m_nX(0)
+        , m_nY(0)
+        , m_nWidth(1)
+        , m_nHeight(1)
+    {
+    }
+
+public:
+    constexpr sal_Int32 x() const { return m_nX; }
+    void setX(sal_Int32 nX) { m_nX = nX; }
+    constexpr sal_Int32 y() const { return m_nY; }
+    void setY(sal_Int32 nY) { m_nY = nY; }
+
+    constexpr Point pos() const { return { m_nX, m_nY }; }
+    void setPos(const Point& aPos)
+    {
+        setX(aPos.getX());
+        setY(aPos.getY());
+    }
+    void move(sal_Int32 nDX, sal_Int32 nDY)
+    {
+        m_nX += nDX;
+        m_nY += nDY;
+    }
+
+    constexpr sal_Int32 width() const { return m_nWidth; }
+    void setWidth(sal_Int32 nWidth)
+    {
+        assert(nWidth >= 0);
+        if (nWidth >= 0)
+            m_nWidth = nWidth;
+        else
+            m_nWidth = 0;
+    }
+
+    constexpr sal_Int32 height() const { return m_nHeight; }
+    void setHeight(sal_Int32 nHeight)
+    {
+        assert(nHeight >= 0);
+        if (nHeight >= 0)
+            m_nHeight = nHeight;
+        else
+            m_nHeight = 0;
+    }
+
+    constexpr Size size() const
+    {
+        return { static_cast<tools::Long>(m_nWidth), 
static_cast<tools::Long>(m_nHeight) };
+    }
+    void setSize(const Size& rSize)
+    {
+        setWidth(rSize.Width());
+        setHeight(rSize.Height());
+    }
+
+    constexpr tools::Rectangle posSize() const { return { pos(), size() }; }
+    void setPosSize(const tools::Rectangle& rRect)
+    {
+        setPos(rRect.GetPos());
+        setSize(rRect.GetSize());
+    }
+    // because tools::Rectangle has the ambigious (Point&, Point&) 
constructor, which we don't want here
+    void setPosSize(const Point& rPos, const Size& rSize) { setPosSize({ rPos, 
rSize }); }
+};
+
+inline std::ostream& operator<<(std::ostream& s, const WindowPosSize& rGeom)
+{
+    s << rGeom.width() << "x" << rGeom.height() << "@(" << rGeom.x() << "," << 
rGeom.y() << ")";
+    return s;
+}
+
+} // namespace vcl
+
+#endif // INCLUDED_VCL_FRAMEPOSSIZE_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx
index 24f41331eb21..e2faf1337e62 100644
--- a/include/vcl/syswin.hxx
+++ b/include/vcl/syswin.hxx
@@ -139,7 +139,7 @@ protected:
     explicit SystemWindow(WindowType nType, const char* pIdleDebugName);
     void loadUI(vcl::Window* pParent, const OString& rID, const OUString& 
rUIXMLDescription, const css::uno::Reference<css::frame::XFrame> &rFrame = 
css::uno::Reference<css::frame::XFrame>());
 
-    void     SetWindowStateData( const WindowStateData& rData );
+    void SetWindowState(const vcl::WindowData& rData);
 
     virtual void settingOptimalLayoutSize(Window *pBox);
 
@@ -177,7 +177,7 @@ public:
     const Size&     GetMaxOutputSizePixel() const;
 
     void            SetWindowState(std::string_view rStr);
-    OString         GetWindowState(WindowStateMask nMask = 
WindowStateMask::All) const;
+    OString GetWindowState(vcl::WindowDataMask nMask = 
vcl::WindowDataMask::All) const;
 
     void            SetMenuBar(MenuBar* pMenuBar);
     MenuBar*        GetMenuBar() const { return mpMenuBar; }
@@ -194,7 +194,7 @@ public:
     VclPtr<NotebookBar> const & GetNotebookBar() const;
 
     TaskPaneList*   GetTaskPaneList();
-    void            GetWindowStateData( WindowStateData& rData ) const;
+    void GetWindowState(vcl::WindowData& rData) const;
 
     virtual void     SetText( const OUString& rStr ) override;
     virtual OUString GetText() const override;
diff --git a/include/vcl/vclenum.hxx b/include/vcl/vclenum.hxx
index 6e0359fa2699..9f1a3c8f6b08 100644
--- a/include/vcl/vclenum.hxx
+++ b/include/vcl/vclenum.hxx
@@ -118,27 +118,6 @@ namespace o3tl
     template<> struct typed_flags<WindowBorderStyle> : 
is_typed_flags<WindowBorderStyle, 0x3033> {};
 }
 
-enum class WindowStateMask {
-    NONE             = 0x0000,
-    X                = 0x0001,
-    Y                = 0x0002,
-    Width            = 0x0004,
-    Height           = 0x0008,
-    State            = 0x0010,
-    Minimized        = 0x0020,
-    MaximizedX       = 0x0100,
-    MaximizedY       = 0x0200,
-    MaximizedWidth   = 0x0400,
-    MaximizedHeight  = 0x0800,
-    Pos              = X | Y,
-    Size             = Width | Height,
-    All              = X | Y | Width | Height | MaximizedX | MaximizedY | 
MaximizedWidth | MaximizedHeight | State | Minimized
-};
-namespace o3tl
-{
-    template<> struct typed_flags<WindowStateMask> : 
is_typed_flags<WindowStateMask, 0x0f3f> {};
-}
-
 enum class TimeFormat
 {
     Hour12, Hour24
@@ -299,24 +278,6 @@ enum class ToolBoxButtonSize
     Size32,
 };
 
-enum class WindowStateState {
-    NONE           = 0x0000,
-    Normal         = 0x0001,
-    Minimized      = 0x0002,
-    Maximized      = 0x0004,
-    // Rollup is no longer used, but retained because WindowStateState is 
serialized
-    // from/to strings describing window state that are stored in a users 
config
-    Rollup         = 0x0008,
-    MaximizedHorz  = 0x0010,
-    MaximizedVert  = 0x0020,
-    FullScreen     = 0x0040,
-    SystemMask     = 0xffff
-};
-namespace o3tl
-{
-    template<> struct typed_flags<WindowStateState> : 
is_typed_flags<WindowStateState, 0xffff> {};
-}
-
 namespace vcl
 {
     // The exact sizes of the icons in each size grouping are not necessarily
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 054b817975bd..135378ec540f 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -22,6 +22,7 @@
 #include <vcl/font.hxx>
 #include <vcl/vclptr.hxx>
 #include <vcl/uitest/factory.hxx>
+#include <vcl/windowstate.hxx>
 
 #include <com/sun/star/accessibility/XAccessibleRelationSet.hpp>
 #include <com/sun/star/accessibility/XAccessible.hpp>
@@ -543,7 +544,7 @@ public:
     virtual bool is_default_widget(const weld::Widget* pCandidate) const = 0;
 
     virtual void set_window_state(const OString& rStr) = 0;
-    virtual OString get_window_state(WindowStateMask nMask) const = 0;
+    virtual OString get_window_state(vcl::WindowDataMask nMask) const = 0;
 
     virtual css::uno::Reference<css::awt::XWindow> GetXWindow() = 0;
 
diff --git a/include/vcl/windowstate.hxx b/include/vcl/windowstate.hxx
index dcf0f4e9a394..b78162ddf52e 100644
--- a/include/vcl/windowstate.hxx
+++ b/include/vcl/windowstate.hxx
@@ -20,52 +20,78 @@
 #ifndef INCLUDED_VCL_WINDOWSTATE_HXX
 #define INCLUDED_VCL_WINDOWSTATE_HXX
 
-#include <vcl/dllapi.h>
-#include <vcl/vclenum.hxx>
-#include <rtl/string.hxx>
+#include <vcl/WindowPosSize.hxx>
 
-class VCL_PLUGIN_PUBLIC WindowStateData
+namespace vcl
 {
-private:
-    WindowStateMask mnValidMask;
-    int mnX;
-    int mnY;
-    unsigned int mnWidth;
-    unsigned int mnHeight;
+enum class WindowState
+{
+    NONE = 0x0000,
+    Normal = 0x0001,
+    Minimized = 0x0002,
+    Maximized = 0x0004,
+    // Rollup is no longer used, but the bit is retained because WindowData is 
serialized
+    // from/to strings describing window state that are stored in a users 
config
+    // Rollup = 0x0008,
+    MaximizedHorz = 0x0010,
+    MaximizedVert = 0x0020,
+    FullScreen = 0x0040,
+    SystemMask = 0xffff
+};
+
+enum class WindowDataMask
+{
+    NONE = 0x0000,
+    X = 0x0001,
+    Y = 0x0002,
+    Width = 0x0004,
+    Height = 0x0008,
+    State = 0x0010,
+    Minimized = 0x0020,
+    MaximizedX = 0x0100,
+    MaximizedY = 0x0200,
+    MaximizedWidth = 0x0400,
+    MaximizedHeight = 0x0800,
+    Pos = X | Y,
+    Size = Width | Height,
+    PosSize = Pos | Size,
+    PosSizeState = Pos | Size | State,
+    All = X | Y | Width | Height | MaximizedX | MaximizedY | MaximizedWidth | 
MaximizedHeight
+          | State | Minimized
+};
+
+class VCL_PLUGIN_PUBLIC WindowData final : public WindowPosSize
+{
+    WindowState m_nState;
+    WindowDataMask m_nMask;
+
     int mnMaximizedX;
     int mnMaximizedY;
     unsigned int mnMaximizedWidth;
     unsigned int mnMaximizedHeight;
-    WindowStateState mnState;
 
 public:
-    WindowStateData()
-        : mnValidMask(WindowStateMask::NONE)
-        , mnX(0)
-        , mnY(0)
-        , mnWidth(0)
-        , mnHeight(0)
+    WindowData()
+        : m_nState(WindowState::NONE)
+        , m_nMask(WindowDataMask::NONE)
         , mnMaximizedX(0)
         , mnMaximizedY(0)
         , mnMaximizedWidth(0)
         , mnMaximizedHeight(0)
-        , mnState(WindowStateState::NONE)
     {
     }
 
-    void SetMask(WindowStateMask nValidMask) { mnValidMask = nValidMask; }
-    WindowStateMask GetMask() const { return mnValidMask; }
+    // serialize values to a string (the original WindowState representation)
+    OString toStr() const;
+
+    void setState(WindowState nState) { m_nState = nState; }
+    WindowState state() const { return m_nState; }
+    WindowState& rState() { return m_nState; }
+
+    void setMask(WindowDataMask nMask) { m_nMask = nMask; }
+    WindowDataMask mask() const { return m_nMask; }
+    WindowDataMask& rMask() { return m_nMask; }
 
-    void SetX(int nX) { mnX = nX; }
-    int GetX() const { return mnX; }
-    void SetY(int nY) { mnY = nY; }
-    int GetY() const { return mnY; }
-    void SetWidth(unsigned int nWidth) { mnWidth = nWidth; }
-    unsigned int GetWidth() const { return mnWidth; }
-    void SetHeight(unsigned int nHeight) { mnHeight = nHeight; }
-    unsigned int GetHeight() const { return mnHeight; }
-    void SetState(WindowStateState nState) { mnState = nState; }
-    WindowStateState GetState() const { return mnState; }
     void SetMaximizedX(int nRX) { mnMaximizedX = nRX; }
     int GetMaximizedX() const { return mnMaximizedX; }
     void SetMaximizedY(int nRY) { mnMaximizedY = nRY; }
@@ -74,9 +100,19 @@ public:
     unsigned int GetMaximizedWidth() const { return mnMaximizedWidth; }
     void SetMaximizedHeight(unsigned int nRHeight) { mnMaximizedHeight = 
nRHeight; }
     unsigned int GetMaximizedHeight() const { return mnMaximizedHeight; }
+};
+
+} // namespace vcl
 
-    OString ToStr() const;
+namespace o3tl
+{
+template <> struct typed_flags<vcl::WindowState> : 
is_typed_flags<vcl::WindowState, 0xffff>
+{
+};
+template <> struct typed_flags<vcl::WindowDataMask> : 
is_typed_flags<vcl::WindowDataMask, 0x0f3f>
+{
 };
+}
 
 #endif // INCLUDED_VCL_WINDOWSTATE_HXX
 
diff --git a/include/vcl/wrkwin.hxx b/include/vcl/wrkwin.hxx
index dfc6cc1b3fd0..615696f94620 100644
--- a/include/vcl/wrkwin.hxx
+++ b/include/vcl/wrkwin.hxx
@@ -60,7 +60,7 @@ private:
 protected:
     explicit        WorkWindow( WindowType nType );
     SAL_DLLPRIVATE void ImplInit( vcl::Window* pParent, WinBits nStyle, 
SystemParentData* pSystemParentData = nullptr );
-    SAL_DLLPRIVATE void ImplSetFrameState( WindowStateState aFrameState );
+    SAL_DLLPRIVATE void ImplSetFrameState(vcl::WindowState);
 
 public:
     explicit        WorkWindow( vcl::Window* pParent, WinBits nStyle = 
WB_STDWORK );
diff --git a/reportdesign/source/ui/dlg/Formula.cxx 
b/reportdesign/source/ui/dlg/Formula.cxx
index f2b95e0df1b7..a0b866031631 100644
--- a/reportdesign/source/ui/dlg/Formula.cxx
+++ b/reportdesign/source/ui/dlg/Formula.cxx
@@ -87,7 +87,7 @@ FormulaDialog::~FormulaDialog()
     if ( m_xAddField )
     {
         SvtViewOptions aDlgOpt( EViewType::Window, HID_RPT_FIELD_SEL_WIN );
-        
aDlgOpt.SetWindowState(OStringToOUString(m_xAddField->getDialog()->get_window_state(WindowStateMask::X
 | WindowStateMask::Y | WindowStateMask::State | WindowStateMask::Minimized), 
RTL_TEXTENCODING_ASCII_US));
+        
aDlgOpt.SetWindowState(OStringToOUString(m_xAddField->getDialog()->get_window_state(vcl::WindowDataMask::Pos
 | vcl::WindowDataMask::State | vcl::WindowDataMask::Minimized), 
RTL_TEXTENCODING_ASCII_US));
 
         if (m_xAddField->getDialog()->get_visible())
             m_xAddField->response(RET_CANCEL);
diff --git a/reportdesign/source/ui/report/DesignView.cxx 
b/reportdesign/source/ui/report/DesignView.cxx
index ab213479b9f6..b34c8c944fd8 100644
--- a/reportdesign/source/ui/report/DesignView.cxx
+++ b/reportdesign/source/ui/report/DesignView.cxx
@@ -136,7 +136,7 @@ void ODesignView::dispose()
     if ( m_xAddField )
     {
         SvtViewOptions aDlgOpt( EViewType::Window, UID_RPT_RPT_APP_VIEW );
-        
aDlgOpt.SetWindowState(OStringToOUString(m_xAddField->getDialog()->get_window_state(WindowStateMask::All),
 RTL_TEXTENCODING_ASCII_US));
+        
aDlgOpt.SetWindowState(OStringToOUString(m_xAddField->getDialog()->get_window_state(vcl::WindowDataMask::All),
 RTL_TEXTENCODING_ASCII_US));
 
         if (m_xAddField->getDialog()->get_visible())
             m_xAddField->response(RET_CANCEL);
@@ -146,7 +146,7 @@ void ODesignView::dispose()
     if ( m_xReportExplorer )
     {
         SvtViewOptions aDlgOpt(EViewType::Window, 
OStringToOUString(m_xReportExplorer->get_help_id(), RTL_TEXTENCODING_UTF8));
-        
aDlgOpt.SetWindowState(OStringToOUString(m_xReportExplorer->getDialog()->get_window_state(WindowStateMask::All),
 RTL_TEXTENCODING_ASCII_US));
+        
aDlgOpt.SetWindowState(OStringToOUString(m_xReportExplorer->getDialog()->get_window_state(vcl::WindowDataMask::All),
 RTL_TEXTENCODING_ASCII_US));
 
         if (m_xReportExplorer->getDialog()->get_visible())
             m_xReportExplorer->response(RET_CANCEL);
diff --git a/reportdesign/source/ui/report/ReportController.cxx 
b/reportdesign/source/ui/report/ReportController.cxx
index 7f20a0040c6e..7c588a99791c 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -294,7 +294,7 @@ void OReportController::disposing()
     if ( m_xGroupsFloater )
     {
         SvtViewOptions aDlgOpt(EViewType::Window, 
OStringToOUString(m_xGroupsFloater->get_help_id(), RTL_TEXTENCODING_UTF8));
-        
aDlgOpt.SetWindowState(OStringToOUString(m_xGroupsFloater->getDialog()->get_window_state(WindowStateMask::All),
 RTL_TEXTENCODING_ASCII_US));
+        
aDlgOpt.SetWindowState(OStringToOUString(m_xGroupsFloater->getDialog()->get_window_state(vcl::WindowDataMask::All),
 RTL_TEXTENCODING_ASCII_US));
         if (m_xGroupsFloater->getDialog()->get_visible())
             m_xGroupsFloater->response(RET_CANCEL);
         m_xGroupsFloater.reset();
diff --git a/sfx2/source/appl/childwin.cxx b/sfx2/source/appl/childwin.cxx
index 1740459e7aea..0887e5106137 100644
--- a/sfx2/source/appl/childwin.cxx
+++ b/sfx2/source/appl/childwin.cxx
@@ -310,9 +310,9 @@ SfxChildWinInfo SfxChildWindow::GetInfo() const
         weld::Dialog* pDialog = xController->getDialog();
         aInfo.aPos  = pDialog->get_position();
         aInfo.aSize = pDialog->get_size();
-        WindowStateMask nMask = WindowStateMask::Pos | WindowStateMask::State;
+        vcl::WindowDataMask nMask = vcl::WindowDataMask::Pos | 
vcl::WindowDataMask::State;
         if (pDialog->get_resizable())
-            nMask |= WindowStateMask::Size;
+            nMask |= vcl::WindowDataMask::Size;
         aInfo.aWinState = pDialog->get_window_state(nMask);
     }
     else if (pWindow)
@@ -321,9 +321,9 @@ SfxChildWinInfo SfxChildWindow::GetInfo() const
         aInfo.aSize = pWindow->GetSizePixel();
         if ( pWindow->IsSystemWindow() )
         {
-            WindowStateMask nMask = WindowStateMask::Pos | 
WindowStateMask::State;
+            vcl::WindowDataMask nMask = vcl::WindowDataMask::Pos | 
vcl::WindowDataMask::State;
             if ( pWindow->GetStyle() & WB_SIZEABLE )
-                nMask |= WindowStateMask::Size;
+                nMask |= vcl::WindowDataMask::Size;
             aInfo.aWinState = 
static_cast<SystemWindow*>(pWindow.get())->GetWindowState( nMask );
         }
         else if (DockingWindow* pDockingWindow = 
dynamic_cast<DockingWindow*>(pWindow.get()))
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 0604f035bcd9..ab976093025a 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -173,9 +173,9 @@ void SfxModelessDialogController::ChildWinDispose()
 {
     if (m_xImpl->pMgr)
     {
-        WindowStateMask nMask = WindowStateMask::Pos | WindowStateMask::State;
+        vcl::WindowDataMask nMask = vcl::WindowDataMask::Pos | 
vcl::WindowDataMask::State;
         if (m_xDialog->get_resizable())
-            nMask |= WindowStateMask::Size;
+            nMask |= vcl::WindowDataMask::Size;
         m_xImpl->aWinState = m_xDialog->get_window_state(nMask);
         GetBindings().GetWorkWindow_Impl()->ConfigChild_Impl( 
SfxChildIdentifier::DOCKINGWINDOW, SfxDockingConfig::ALIGNDOCKINGWINDOW, 
m_xImpl->pMgr->GetType() );
     }
diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx
index 6a6fc17dbd9a..d835e7640bc5 100644
--- a/sfx2/source/dialog/recfloat.cxx
+++ b/sfx2/source/dialog/recfloat.cxx
@@ -56,11 +56,10 @@ 
SfxRecordingFloatWrapper_Impl::SfxRecordingFloatWrapper_Impl(vcl::Window* pParen
     aPos.AdjustX(20);
     aPos.AdjustY(10);
 
-    WindowStateData aState;
-    aState.SetMask(WindowStateMask::Pos);
-    aState.SetX(aPos.X());
-    aState.SetY(aPos.Y());
-    pDlg->set_window_state(aState.ToStr());
+    vcl::WindowData aState;
+    aState.setMask(vcl::WindowDataMask::Pos);
+    aState.setPos(aPos);
+    pDlg->set_window_state(aState.toStr());
 
     pFloatDlg->Initialize(pInfo);
 }
diff --git a/solenv/clang-format/excludelist b/solenv/clang-format/excludelist
index 9a3d34e3d2cf..a0bb88b41fbc 100644
--- a/solenv/clang-format/excludelist
+++ b/solenv/clang-format/excludelist
@@ -14422,7 +14422,6 @@ vcl/inc/salbmp.hxx
 vcl/inc/salframe.hxx
 vcl/inc/salgdi.hxx
 vcl/inc/salgdiimpl.hxx
-vcl/inc/salgeom.hxx
 vcl/inc/salinst.hxx
 vcl/inc/sallayout.hxx
 vcl/inc/salmenu.hxx
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index a25e85164433..473c6a99b49f 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -362,8 +362,7 @@ SwInsertBookmarkDlg::~SwInsertBookmarkDlg()
 {
     // tdf#146261 - Remember size of bookmark dialog
     SvtViewOptions aDlgOpt(EViewType::Dialog, "BookmarkDialog");
-    OString sWindowState
-        = m_xDialog->get_window_state(WindowStateMask::Pos | 
WindowStateMask::Size);
+    OString sWindowState = 
m_xDialog->get_window_state(vcl::WindowDataMask::PosSize);
     aDlgOpt.SetWindowState(OUString::fromUtf8(sWindowState));
 }
 
diff --git a/sw/source/uibase/envelp/syncbtn.cxx 
b/sw/source/uibase/envelp/syncbtn.cxx
index 009525d02ce5..0b61ff8a6c72 100644
--- a/sw/source/uibase/envelp/syncbtn.cxx
+++ b/sw/source/uibase/envelp/syncbtn.cxx
@@ -53,11 +53,10 @@ SwSyncChildWin::SwSyncChildWin(vcl::Window* _pParent,
         else
             aPos = _pParent->OutputToScreenPixel(Point(0, 0));
 
-        WindowStateData aState;
-        aState.SetMask(WindowStateMask::Pos);
-        aState.SetX(aPos.X());
-        aState.SetY(aPos.Y());
-        pDlg->set_window_state(aState.ToStr());
+        vcl::WindowData aState;
+        aState.setMask(vcl::WindowDataMask::Pos);
+        aState.setPos(aPos);
+        pDlg->set_window_state(aState.toStr());
 
         pInfo->aPos = pDlg->get_position();
         pInfo->aSize = pDlg->get_size();
diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx
index c6c8a08e29c0..62b43dfd0824 100644
--- a/vcl/headless/svpframe.cxx
+++ b/vcl/headless/svpframe.cxx
@@ -143,7 +143,7 @@ void SvpSalFrame::LoseFocus()
 
 basegfx::B2IVector SvpSalFrame::GetSurfaceFrameSize() const
 {
-    basegfx::B2IVector aFrameSize( maGeometry.nWidth, maGeometry.nHeight );
+    basegfx::B2IVector aFrameSize( maGeometry.width(), maGeometry.height() );
     if( aFrameSize.getX() == 0 )
         aFrameSize.setX( 1 );
     if( aFrameSize.getY() == 0 )
@@ -181,7 +181,7 @@ void SvpSalFrame::PostPaint() const
 {
     if( m_bVisible )
     {
-        SalPaintEvent aPEvt(0, 0, maGeometry.nWidth, maGeometry.nHeight);
+        SalPaintEvent aPEvt(0, 0, maGeometry.width(), maGeometry.height());
         aPEvt.mbImmediateUpdate = false;
         CallCallback( SalEvent::Paint, &aPEvt );
     }
@@ -248,24 +248,24 @@ void SvpSalFrame::SetMaxClientSize( tools::Long nWidth, 
tools::Long nHeight )
 void SvpSalFrame::SetPosSize( tools::Long nX, tools::Long nY, tools::Long 
nWidth, tools::Long nHeight, sal_uInt16 nFlags )
 {
     if( (nFlags & SAL_FRAME_POSSIZE_X) != 0 )
-        maGeometry.nX = nX;
+        maGeometry.setX(nX);
     if( (nFlags & SAL_FRAME_POSSIZE_Y) != 0 )
-        maGeometry.nY = nY;
+        maGeometry.setY(nY);
     if( (nFlags & SAL_FRAME_POSSIZE_WIDTH) != 0 )
     {
-        maGeometry.nWidth = nWidth;
-        if( m_nMaxWidth > 0 && maGeometry.nWidth > 
o3tl::make_unsigned(m_nMaxWidth) )
-            maGeometry.nWidth = m_nMaxWidth;
-        if( m_nMinWidth > 0 && maGeometry.nWidth < 
o3tl::make_unsigned(m_nMinWidth) )
-            maGeometry.nWidth = m_nMinWidth;
+        maGeometry.setWidth(nWidth);
+        if (m_nMaxWidth > 0 && maGeometry.width() > m_nMaxWidth)
+            maGeometry.setWidth(m_nMaxWidth);
+        if (m_nMinWidth > 0 && maGeometry.width() < m_nMinWidth)
+            maGeometry.setWidth(m_nMinWidth);
     }
     if( (nFlags & SAL_FRAME_POSSIZE_HEIGHT) != 0 )
     {
-        maGeometry.nHeight = nHeight;
-        if( m_nMaxHeight > 0 && maGeometry.nHeight > 
o3tl::make_unsigned(m_nMaxHeight) )
-            maGeometry.nHeight = m_nMaxHeight;
-        if( m_nMinHeight > 0 && maGeometry.nHeight < 
o3tl::make_unsigned(m_nMinHeight) )
-            maGeometry.nHeight = m_nMinHeight;
+        maGeometry.setHeight(nHeight);
+        if (m_nMaxHeight > 0 && maGeometry.height() > m_nMaxHeight)
+            maGeometry.setHeight(m_nMaxHeight);
+        if (m_nMinHeight > 0 && maGeometry.height() < m_nMinHeight)
+            maGeometry.setHeight(m_nMinHeight);
     }
 #ifndef IOS
     basegfx::B2IVector aFrameSize = GetSurfaceFrameSize();
@@ -292,8 +292,8 @@ void SvpSalFrame::SetPosSize( tools::Long nX, tools::Long 
nY, tools::Long nWidth
 
 void SvpSalFrame::GetClientSize( tools::Long& rWidth, tools::Long& rHeight )
 {
-    rWidth = maGeometry.nWidth;
-    rHeight = maGeometry.nHeight;
+    rWidth = maGeometry.width();
+    rHeight = maGeometry.height();
 }
 
 void SvpSalFrame::GetWorkArea( tools::Rectangle& rRect )
@@ -307,48 +307,40 @@ SalFrame* SvpSalFrame::GetParent() const
     return m_pParent;
 }
 
-constexpr auto FRAMESTATE_MASK_GEOMETRY =
-     WindowStateMask::X     | WindowStateMask::Y |
-     WindowStateMask::Width | WindowStateMask::Height;
-
-void SvpSalFrame::SetWindowState( const SalFrameState *pState )
+void SvpSalFrame::SetWindowState(const vcl::WindowData *pState)
 {
     if (pState == nullptr)
         return;
 
     // Request for position or size change
-    if (!(pState->mnMask & FRAMESTATE_MASK_GEOMETRY))
+    if (!(pState->mask() & vcl::WindowDataMask::PosSize))
         return;
 
-    tools::Long nX = maGeometry.nX;
-    tools::Long nY = maGeometry.nY;
-    tools::Long nWidth = maGeometry.nWidth;
-    tools::Long nHeight = maGeometry.nHeight;
+    tools::Long nX = maGeometry.x();
+    tools::Long nY = maGeometry.y();
+    tools::Long nWidth = maGeometry.width();
+    tools::Long nHeight = maGeometry.height();
 
     // change requested properties
-    if (pState->mnMask & WindowStateMask::X)
-        nX = pState->mnX;
-    if (pState->mnMask & WindowStateMask::Y)
-        nY = pState->mnY;
-    if (pState->mnMask & WindowStateMask::Width)
-        nWidth = pState->mnWidth;
-    if (pState->mnMask & WindowStateMask::Height)
-        nHeight = pState->mnHeight;
+    if (pState->mask() & vcl::WindowDataMask::X)
+        nX = pState->x();
+    if (pState->mask() & vcl::WindowDataMask::Y)
+        nY = pState->y();
+    if (pState->mask() & vcl::WindowDataMask::Width)
+        nWidth = pState->width();
+    if (pState->mask() & vcl::WindowDataMask::Height)
+        nHeight = pState->height();
 
     SetPosSize( nX, nY, nWidth, nHeight,
                 SAL_FRAME_POSSIZE_X | SAL_FRAME_POSSIZE_Y |
                 SAL_FRAME_POSSIZE_WIDTH | SAL_FRAME_POSSIZE_HEIGHT );
 }
 
-bool SvpSalFrame::GetWindowState( SalFrameState* pState )
+bool SvpSalFrame::GetWindowState(vcl::WindowData* pState)
 {
-    pState->mnState = WindowStateState::Normal;
-    pState->mnX      = maGeometry.nX;
-    pState->mnY      = maGeometry.nY;
-    pState->mnWidth  = maGeometry.nWidth;
-    pState->mnHeight = maGeometry.nHeight;
-    pState->mnMask   = FRAMESTATE_MASK_GEOMETRY | WindowStateMask::State;
-
+    pState->setPosSize(maGeometry.posSize());
+    pState->setState(vcl::WindowState::Normal);
+    pState->setMask(vcl::WindowDataMask::PosSizeState);
     return true;
 }
 
diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx
index 84dca0c84cdc..f2fce5c420b4 100644
--- a/vcl/inc/headless/svpframe.hxx
+++ b/vcl/inc/headless/svpframe.hxx
@@ -90,8 +90,8 @@ public:
     virtual void                GetClientSize( tools::Long& rWidth, 
tools::Long& rHeight ) override;
     virtual void                GetWorkArea( tools::Rectangle& rRect ) 
override;
     virtual SalFrame*           GetParent() const override;
-    virtual void                SetWindowState( const SalFrameState* pState ) 
override;
-    virtual bool                GetWindowState( SalFrameState* pState ) 
override;
+    virtual void SetWindowState(const vcl::WindowData*) override;
+    virtual bool GetWindowState(vcl::WindowData*) override;
     virtual void                ShowFullScreen( bool bFullScreen, sal_Int32 
nDisplay ) override;
     virtual void                StartPresentation( bool bStart ) override;
     virtual void                SetAlwaysOnTop( bool bOnTop ) override;
diff --git a/vcl/inc/osx/salframe.h b/vcl/inc/osx/salframe.h
index 47f8e62981b8..953a17adbcc9 100644
--- a/vcl/inc/osx/salframe.h
+++ b/vcl/inc/osx/salframe.h
@@ -126,8 +126,8 @@ public:
     virtual void                GetClientSize( tools::Long& rWidth, 
tools::Long& rHeight ) override;
     virtual void                GetWorkArea( tools::Rectangle& rRect ) 
override;
     virtual SalFrame*           GetParent() const override;
-    virtual void                SetWindowState( const SalFrameState* pState ) 
override;
-    virtual bool                GetWindowState( SalFrameState* pState ) 
override;
+    virtual void SetWindowState(const vcl::WindowData*) override;
+    virtual bool GetWindowState(vcl::WindowData*) override;
     virtual void                ShowFullScreen( bool bFullScreen, sal_Int32 
nDisplay ) override;
     virtual void                StartPresentation( bool bStart ) override;
     virtual void                SetAlwaysOnTop( bool bOnTop ) override;
diff --git a/vcl/inc/qt5/QtFrame.hxx b/vcl/inc/qt5/QtFrame.hxx
index 2d7c5718d6cf..dcdca17844ae 100644
--- a/vcl/inc/qt5/QtFrame.hxx
+++ b/vcl/inc/qt5/QtFrame.hxx
@@ -182,8 +182,8 @@ public:
     virtual SalFrame* GetParent() const override;
     virtual void SetModal(bool bModal) override;
     virtual bool GetModal() const override;
-    virtual void SetWindowState(const SalFrameState* pState) override;
-    virtual bool GetWindowState(SalFrameState* pState) override;
+    virtual void SetWindowState(const vcl::WindowData*) override;
+    virtual bool GetWindowState(vcl::WindowData*) override;
     virtual void ShowFullScreen(bool bFullScreen, sal_Int32 nDisplay) override;
     virtual void StartPresentation(bool bStart) override;
     virtual void SetAlwaysOnTop(bool bOnTop) override;
diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx
index 1c5cbbbcd0ee..b7dcea63e64f 100644
--- a/vcl/inc/salframe.hxx
+++ b/vcl/inc/salframe.hxx
@@ -35,7 +35,7 @@ class SalGraphics;
 class SalBitmap;
 class SalMenu;
 
-struct SalFrameState;
+namespace vcl { class WindowData; }
 struct SalInputContext;
 struct SystemEnvData;
 
@@ -126,11 +126,11 @@ public:
                             SalFrame();
     virtual                 ~SalFrame() override;
 
-    SalFrameGeometry        maGeometry = {}; ///< absolute, unmirrored values
+    SalFrameGeometry maGeometry; ///< absolute, unmirrored values
 
     // SalGeometryProvider
-    virtual tools::Long GetWidth() const override { return maGeometry.nWidth; }
-    virtual tools::Long GetHeight() const override { return 
maGeometry.nHeight; }
+    virtual tools::Long GetWidth() const override { return maGeometry.width(); 
}
+    virtual tools::Long GetHeight() const override { return 
maGeometry.height(); }
     virtual bool IsOffScreen() const override { return false; }
 
     // SalGraphics or NULL, but two Graphics for all SalFrames
@@ -166,11 +166,11 @@ public:
     SalFrameGeometry        GetGeometry() const;
     const SalFrameGeometry& GetUnmirroredGeometry() const { return maGeometry; 
}
 
-    virtual void            SetWindowState( const SalFrameState* pState ) = 0;
+    virtual void SetWindowState(const vcl::WindowData*) = 0;
     // return the absolute, unmirrored system frame state
     // if this returns false the structure is uninitialised
     [[nodiscard]]
-    virtual bool            GetWindowState( SalFrameState* pState ) = 0;
+    virtual bool GetWindowState(vcl::WindowData*) = 0;
     virtual void            ShowFullScreen( bool bFullScreen, sal_Int32 
nDisplay ) = 0;
     virtual void            PositionByToolkit( const tools::Rectangle&, 
FloatWinPopupFlags ) {};
 
diff --git a/vcl/inc/salgeom.hxx b/vcl/inc/salgeom.hxx
index 0bc7335c2977..63675b6d9ceb 100644
--- a/vcl/inc/salgeom.hxx
+++ b/vcl/inc/salgeom.hxx
@@ -23,44 +23,91 @@
 #include <iostream>
 
 #include <vcl/dllapi.h>
+#include <vcl/WindowPosSize.hxx>
 #include <tools/long.hxx>
 
-struct SalFrameGeometry {
-    // screen position of upper left corner of drawable area in pixel
-    tools::Long                nX, nY;
-    // dimensions of the drawable area in pixel
-    tools::ULong        nWidth, nHeight;
-    // thickness of the decoration in pixel
-    tools::ULong        nLeftDecoration,
-                        nTopDecoration,
-                        nRightDecoration,
-                        nBottomDecoration;
-    unsigned int        nDisplayScreenNumber;
+// There are some unused functions, which I would keep to ease understanding.
+class SalFrameGeometry : public vcl::WindowPosSize
+{
+    // non-drawable area / margins / frame / decorations around the client area
+    sal_uInt32 m_nLeftDecoration, m_nTopDecoration, m_nRightDecoration, 
m_nBottomDecoration;
+    unsigned int m_nDisplayScreenNumber;
+
+public:
+    SalFrameGeometry()
+        : m_nLeftDecoration(0)
+        , m_nTopDecoration(0)
+        , m_nRightDecoration(0)
+        , m_nBottomDecoration(0)
+        , m_nDisplayScreenNumber(0)
+    {
+    }
+
+    constexpr tools::Rectangle clientArea() const
+    {
+        tools::Long nX(x() + m_nLeftDecoration), nY(y() + m_nTopDecoration);
+        return { { nX, nY }, size() };
+    }
+    void setClientArea(const tools::Rectangle& rRect)
+    {
+        setX(rRect.getX() - m_nLeftDecoration);
+        setY(rRect.getY() - m_nTopDecoration);
+        setSize(rRect.GetSize());
+    }
+    constexpr tools::Rectangle clientRect() const { return { { 0, 0 }, size() 
}; }
 
-    SalFrameGeometry() :
-        nX( 0 ),
-        nY( 0 ),
-        nWidth( 1 ),
-        nHeight( 1 ),
-        nLeftDecoration( 0 ),
-        nTopDecoration( 0 ),
-        nRightDecoration( 0 ),
-        nBottomDecoration( 0 ),
-        nDisplayScreenNumber( 0 )
-    {}
+    // returns the position and size of the window, including all margins
+    constexpr tools::Rectangle frameArea() const
+    {
+        tools::Long nWidth(width() + m_nLeftDecoration + m_nRightDecoration);
+        tools::Long nHeight(height() + m_nTopDecoration + m_nBottomDecoration);
+        return { pos(), Size(nWidth, nHeight) };
+    }
+    // no setFrameArea, as it can't really be implemented, e.g. what happens, 
if size() > frameArea.size() etc.
+
+    constexpr sal_uInt32 leftDecoration() const { return m_nLeftDecoration; }
+    void setLeftDecoration(sal_uInt32 nLeftDecoration) { m_nLeftDecoration = 
nLeftDecoration; }
+    constexpr sal_uInt32 topDecoration() const { return m_nTopDecoration; }
+    void setTopDecoration(sal_uInt32 nTopDecoration) { m_nTopDecoration = 
nTopDecoration; }
+    constexpr sal_uInt32 rightDecoration() const { return m_nRightDecoration; }
+    void setRightDecoration(sal_uInt32 nRightDecoration) { m_nRightDecoration 
= nRightDecoration; }
+    constexpr sal_uInt32 bottomDecoration() const { return 
m_nBottomDecoration; }
+    void setBottomDecoration(sal_uInt32 nBottomDecoration)
+    {
+        m_nBottomDecoration = nBottomDecoration;
+    }
+    void decorations(sal_uInt32& nLeft, sal_uInt32& nTop, sal_uInt32& nRight,
+                     sal_uInt32& nBottom) const
+    {
+        nLeft = m_nLeftDecoration;
+        nTop = m_nTopDecoration;
+        nRight = m_nRightDecoration;
+        nBottom = m_nBottomDecoration;
+    }
+    void setDecorations(sal_uInt32 nLeft, sal_uInt32 nTop, sal_uInt32 nRight, 
sal_uInt32 nBottom)
+    {
+        m_nLeftDecoration = nLeft;
+        m_nTopDecoration = nTop;
+        m_nRightDecoration = nRight;
+        m_nBottomDecoration = nBottom;
+    }
+
+    unsigned int screen() const { return m_nDisplayScreenNumber; }
+    void setScreen(unsigned int nScreen) { m_nDisplayScreenNumber = nScreen; }
 };
 
-inline std::ostream &operator <<(std::ostream& s, const SalFrameGeometry& 
rGeom)
+inline std::ostream& operator<<(std::ostream& s, const SalFrameGeometry& rGeom)
 {
-    s << rGeom.nWidth << "x" << rGeom.nHeight << "@(" << rGeom.nX << "," << 
rGeom.nY << "):{"
-      << rGeom.nLeftDecoration << "," << rGeom.nTopDecoration << "," << 
rGeom.nRightDecoration << "," << rGeom.nBottomDecoration << "}";
-
+    s << static_cast<const vcl::WindowPosSize*>(&rGeom) << ":{" << 
rGeom.leftDecoration() << ","
+      << rGeom.topDecoration() << "," << rGeom.rightDecoration() << "," << 
rGeom.bottomDecoration()
+      << "}s" << rGeom.screen();
     return s;
 }
 
 /// Interface used to share logic on sizing between
 /// SalVirtualDevices and SalFrames
-class VCL_PLUGIN_PUBLIC SalGeometryProvider {
+class VCL_PLUGIN_PUBLIC SalGeometryProvider
+{
 public:
     virtual ~SalGeometryProvider() {}
     virtual tools::Long GetWidth() const = 0;
diff --git a/vcl/inc/salvtables.hxx b/vcl/inc/salvtables.hxx
index e7c637e93b96..81e1d1f00d4f 100644
--- a/vcl/inc/salvtables.hxx
+++ b/vcl/inc/salvtables.hxx
@@ -480,7 +480,7 @@ public:
 
     virtual void set_window_state(const OString& rStr) override;
 
-    virtual OString get_window_state(WindowStateMask nMask) const override;
+    virtual OString get_window_state(vcl::WindowDataMask nMask) const override;
 
     virtual SystemEnvData get_system_data() const override;
 
diff --git a/vcl/inc/salwtype.hxx b/vcl/inc/salwtype.hxx
index c9f50cd63982..41e4e04e9a50 100644
--- a/vcl/inc/salwtype.hxx
+++ b/vcl/inc/salwtype.hxx
@@ -31,10 +31,13 @@ class LogicalFontInstance;
 class SalGraphics;
 class SalFrame;
 class SalObject;
-namespace vcl { class Window; }
+namespace vcl
+{
+    class Window;
+    enum class WindowState;
+}
 enum class InputContextFlags;
 enum class WindowStateMask;
-enum class WindowStateState;
 enum class ExtTextInputAttr;
 enum class ModKeyFlags;
 
@@ -231,20 +234,6 @@ enum class SalObjEvent {
     ToTop              = 3
 };
 
-struct SalFrameState
-{
-    tools::Long            mnX;
-    tools::Long            mnY;
-    tools::Long            mnWidth;
-    tools::Long            mnHeight;
-    tools::Long            mnMaximizedX;
-    tools::Long            mnMaximizedY;
-    tools::Long            mnMaximizedWidth;
-    tools::Long            mnMaximizedHeight;
-    WindowStateMask  mnMask;
-    WindowStateState mnState;
-};
-
 struct SalInputContext
 {
     rtl::Reference<LogicalFontInstance> mpFont;
diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx
index 91a9470a071e..2adacd1ee5ba 100644
--- a/vcl/inc/unx/gtk/gtkframe.hxx
+++ b/vcl/inc/unx/gtk/gtkframe.hxx
@@ -443,7 +443,7 @@ public:
     GtkWidget*  getMouseEventWidget() const;
     GtkGrid*    getTopLevelGridWidget() const { return m_pTopLevelGrid; }
     const SalX11Screen& getXScreenNumber() const { return m_nXScreen; }
-    int          GetDisplayScreen() const { return 
maGeometry.nDisplayScreenNumber; }
+    int GetDisplayScreen() const { return maGeometry.screen(); }
     void updateScreenNumber();
 
     cairo_t* getCairoContext() const;
@@ -521,8 +521,8 @@ public:
     virtual void                GetClientSize( tools::Long& rWidth, 
tools::Long& rHeight ) override;
     virtual void                GetWorkArea( tools::Rectangle& rRect ) 
override;
     virtual SalFrame*           GetParent() const override;
-    virtual void                SetWindowState( const SalFrameState* pState ) 
override;
-    virtual bool                GetWindowState( SalFrameState* pState ) 
override;
+    virtual void SetWindowState(const vcl::WindowData*) override;
+    virtual bool GetWindowState(vcl::WindowData*) override;
     virtual void                ShowFullScreen( bool bFullScreen, sal_Int32 
nDisplay ) override;
     // Enable/Disable ScreenSaver, SystemAgents, ...
     virtual void                StartPresentation( bool bStart ) override;
diff --git a/vcl/inc/unx/salframe.h b/vcl/inc/unx/salframe.h
index 1107ac9feb71..7b804b0cc089 100644
--- a/vcl/inc/unx/salframe.h
+++ b/vcl/inc/unx/salframe.h
@@ -222,8 +222,8 @@ public:
     virtual void                GetClientSize( tools::Long& rWidth, 
tools::Long& rHeight ) override;
     virtual void                GetWorkArea( tools::Rectangle& rRect ) 
override;
     virtual SalFrame*           GetParent() const override;
-    virtual void                SetWindowState( const SalFrameState* pState ) 
override;
-    virtual bool                GetWindowState( SalFrameState* pState ) 
override;
+    virtual void SetWindowState(const vcl::WindowData*) override;
+    virtual bool GetWindowState(vcl::WindowData*) override;
     virtual void                ShowFullScreen( bool bFullScreen, sal_Int32 
nMonitor ) override;
     virtual void                StartPresentation( bool bStart ) override;
     virtual void                SetAlwaysOnTop( bool bOnTop ) override;
diff --git a/vcl/inc/win/salframe.h b/vcl/inc/win/salframe.h
index e3d8b685a229..c37fb5b98915 100644
--- a/vcl/inc/win/salframe.h
+++ b/vcl/inc/win/salframe.h
@@ -25,12 +25,12 @@
 #include <string_view>
 
 #include <vcl/sysdata.hxx>
+#include <vcl/windowstate.hxx>
 #include <salframe.hxx>
 #include <svsys.h>
 
 class WinSalGraphics;
 
-
 class WinSalFrame final: public SalFrame
 {
 public:
@@ -43,7 +43,7 @@ public:
     HMENU                   mSelectedhMenu;         // the menu where 
highlighting is currently going on
     HMENU                   mLastActivatedhMenu;    // the menu that was most 
recently opened
     SystemEnvData           maSysData;              // system data
-    SalFrameState           maState = {};           // frame state
+    vcl::WindowData maState; ///< frame state
     int                     mnShowState;            // show state
     LONG                    mnWidth;                // client width in pixeln
     LONG                    mnHeight;               // client height in pixeln
@@ -112,8 +112,8 @@ public:
     virtual void                GetClientSize( tools::Long& rWidth, 
tools::Long& rHeight ) override;
     virtual void                GetWorkArea( tools::Rectangle& rRect ) 
override;
     virtual SalFrame*           GetParent() const override;
-    virtual void                SetWindowState( const SalFrameState* pState ) 
override;
-    virtual bool                GetWindowState( SalFrameState* pState ) 
override;
+    virtual void SetWindowState(const vcl::WindowData*) override;
+    virtual bool GetWindowState(vcl::WindowData*) override;
     virtual void                ShowFullScreen( bool bFullScreen, sal_Int32 
nDisplay ) override;
     virtual void                StartPresentation( bool bStart ) override;
     virtual void                SetAlwaysOnTop( bool bOnTop ) override;
diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index b0395330e19e..18e1a3e1e417 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -45,7 +45,7 @@ class VirtualDevice;
 namespace vcl::font { class PhysicalFontCollection; }
 class ImplFontCache;
 class VCLXWindow;
-class WindowStateData;
+namespace vcl { class WindowData; }
 class SalFrame;
 class SalObject;
 enum class MouseEventModifiers;
@@ -433,7 +433,7 @@ bool ImplLOKHandleMouseEvent( const VclPtr<vcl::Window>& 
xWindow, MouseNotifyEve
 
 void ImplHandleResize( vcl::Window* pWindow, tools::Long nNewWidth, 
tools::Long nNewHeight );
 
-VCL_DLLPUBLIC void ImplWindowStateFromStr(WindowStateData& rData, 
std::string_view rStr);
+VCL_DLLPUBLIC void ImplWindowStateFromStr(vcl::WindowData& rData, 
std::string_view rStr);
 
 VCL_DLLPUBLIC css::uno::Reference<css::accessibility::XAccessibleEditableText>
 
FindFocusedEditableText(css::uno::Reference<css::accessibility::XAccessibleContext>
 const&);
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index a5356fcf19be..e90b7edbf258 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -110,7 +110,7 @@ AquaSalFrame::AquaSalFrame( SalFrame* pParent, 
SalFrameStyleFlags salFrameStyle
 AquaSalFrame::~AquaSalFrame()
 {
     if (mbFullScreen)
-        doShowFullScreen(false, maGeometry.nDisplayScreenNumber);
+        doShowFullScreen(false, maGeometry.screen());
 
     assert( GetSalData()->mpInstance->IsMainThread() );
 
@@ -168,10 +168,10 @@ void AquaSalFrame::initWindowAndView()
     NSRect aVisibleRect = [pNSScreen visibleFrame];
     CocoaToVCL( aVisibleRect );
 
-    maGeometry.nX = static_cast<int>(aVisibleRect.origin.x + 
aVisibleRect.size.width / 10);
-    maGeometry.nY = static_cast<int>(aVisibleRect.origin.y + 
aVisibleRect.size.height / 10);
-    maGeometry.nWidth = static_cast<unsigned int>(aVisibleRect.size.width * 
0.8);
-    maGeometry.nHeight = static_cast<unsigned int>(aVisibleRect.size.height * 
0.8);
+    maGeometry.setX(static_cast<sal_Int32>(aVisibleRect.origin.x + 
aVisibleRect.size.width / 10));
+    maGeometry.setY(static_cast<sal_Int32>(aVisibleRect.origin.y + 
aVisibleRect.size.height / 10));
+    maGeometry.setWidth(static_cast<sal_uInt32>(aVisibleRect.size.width * 
0.8));
+    maGeometry.setHeight(static_cast<sal_uInt32>(aVisibleRect.size.height * 
0.8));
 
     // calculate style mask
     if( (mnStyle & SalFrameStyleFlags::FLOAT) ||
@@ -184,10 +184,10 @@ void AquaSalFrame::initWindowAndView()
                       NSWindowStyleMaskResizable      |
                       NSWindowStyleMaskClosable;
         // make default window "maximized"
-        maGeometry.nX = static_cast<int>(aVisibleRect.origin.x);
-        maGeometry.nY = static_cast<int>(aVisibleRect.origin.y);
-        maGeometry.nWidth = static_cast<int>(aVisibleRect.size.width);
-        maGeometry.nHeight = static_cast<int>(aVisibleRect.size.height);
+        maGeometry.setX(static_cast<sal_Int32>(aVisibleRect.origin.x));
+        maGeometry.setY(static_cast<sal_Int32>(aVisibleRect.origin.y));
+        maGeometry.setWidth(static_cast<sal_uInt32>(aVisibleRect.size.width));
+        
maGeometry.setHeight(static_cast<sal_uInt32>(aVisibleRect.size.height));
         mbPositioned = mbSized = true;
     }
     else
@@ -231,7 +231,7 @@ void AquaSalFrame::initWindowAndView()
     [mpNSWindow setDelegate: static_cast<id<NSWindowDelegate> >(mpNSWindow)];
 
     [mpNSWindow setRestorable:NO];
-    const NSRect aRect = { NSZeroPoint, NSMakeSize( maGeometry.nWidth, 
maGeometry.nHeight )};
+    const NSRect aRect = { NSZeroPoint, NSMakeSize(maGeometry.width(), 
maGeometry.height()) };
     mnTrackingRectTag = [mpNSView addTrackingRect: aRect owner: mpNSView 
userData: nil assumeInside: NO];
 
     maSysData.mpNSView = mpNSView;
@@ -246,7 +246,7 @@ void AquaSalFrame::CocoaToVCL( NSRect& io_rRect, bool 
bRelativeToScreen )
     if( bRelativeToScreen )
         io_rRect.origin.y = maScreenRect.size.height - 
(io_rRect.origin.y+io_rRect.size.height);
     else
-        io_rRect.origin.y = maGeometry.nHeight - 
(io_rRect.origin.y+io_rRect.size.height);
+        io_rRect.origin.y = maGeometry.height() - 
(io_rRect.origin.y+io_rRect.size.height);
 }
 
 void AquaSalFrame::VCLToCocoa( NSRect& io_rRect, bool bRelativeToScreen )
@@ -254,7 +254,7 @@ void AquaSalFrame::VCLToCocoa( NSRect& io_rRect, bool 
bRelativeToScreen )
     if( bRelativeToScreen )
         io_rRect.origin.y = maScreenRect.size.height - 
(io_rRect.origin.y+io_rRect.size.height);
     else
-        io_rRect.origin.y = maGeometry.nHeight - 
(io_rRect.origin.y+io_rRect.size.height);
+        io_rRect.origin.y = maGeometry.height() - 
(io_rRect.origin.y+io_rRect.size.height);
 }
 
 void AquaSalFrame::CocoaToVCL( NSPoint& io_rPoint, bool bRelativeToScreen )
@@ -262,7 +262,7 @@ void AquaSalFrame::CocoaToVCL( NSPoint& io_rPoint, bool 
bRelativeToScreen )
     if( bRelativeToScreen )
         io_rPoint.y = maScreenRect.size.height - io_rPoint.y;
     else
-        io_rPoint.y = maGeometry.nHeight - io_rPoint.y;
+        io_rPoint.y = maGeometry.height() - io_rPoint.y;
 }
 
 void AquaSalFrame::VCLToCocoa( NSPoint& io_rPoint, bool bRelativeToScreen )
@@ -270,7 +270,7 @@ void AquaSalFrame::VCLToCocoa( NSPoint& io_rPoint, bool 
bRelativeToScreen )
     if( bRelativeToScreen )
         io_rPoint.y = maScreenRect.size.height - io_rPoint.y;
     else
-        io_rPoint.y = maGeometry.nHeight - io_rPoint.y;
+        io_rPoint.y = maGeometry.height() - io_rPoint.y;
 }
 
 void AquaSalFrame::screenParametersChanged()
@@ -393,25 +393,25 @@ void AquaSalFrame::initShow()
         if( mpParent ) // center relative to parent
         {
             // center on parent
-            tools::Long nNewX = mpParent->maGeometry.nX + 
(static_cast<tools::Long>(mpParent->maGeometry.nWidth) - 
static_cast<tools::Long>(maGeometry.nWidth))/2;
+            tools::Long nNewX = mpParent->maGeometry.x() + 
(static_cast<tools::Long>(mpParent->maGeometry.width()) - 
static_cast<tools::Long>(maGeometry.width())) / 2;
             if( nNewX < aScreenRect.Left() )
                 nNewX = aScreenRect.Left();
-            if( tools::Long(nNewX + maGeometry.nWidth) > aScreenRect.Right() )
-                nNewX = aScreenRect.Right() - maGeometry.nWidth-1;
-            tools::Long nNewY = mpParent->maGeometry.nY + 
(static_cast<tools::Long>(mpParent->maGeometry.nHeight) - 
static_cast<tools::Long>(maGeometry.nHeight))/2;
+            if (static_cast<tools::Long>(nNewX + maGeometry.width()) > 
aScreenRect.Right())
+                nNewX = aScreenRect.Right() - maGeometry.width() - 1;
+            tools::Long nNewY = mpParent->maGeometry.y() + 
(static_cast<tools::Long>(mpParent->maGeometry.height()) - 
static_cast<tools::Long>(maGeometry.height())) / 2;
             if( nNewY < aScreenRect.Top() )
                 nNewY = aScreenRect.Top();
             if( nNewY > aScreenRect.Bottom() )
-                nNewY = aScreenRect.Bottom() - maGeometry.nHeight-1;
-            SetPosSize( nNewX - mpParent->maGeometry.nX,
-                        nNewY - mpParent->maGeometry.nY,
+                nNewY = aScreenRect.Bottom() - maGeometry.height() - 1;
+            SetPosSize( nNewX - mpParent->maGeometry.x(),
+                        nNewY - mpParent->maGeometry.y(),
                         0, 0,  SAL_FRAME_POSSIZE_X | SAL_FRAME_POSSIZE_Y );
         }
         else if( ! (mnStyle & SalFrameStyleFlags::SIZEABLE) )
         {
             // center on screen
-            tools::Long nNewX = (aScreenRect.GetWidth() - maGeometry.nWidth)/2;
-            tools::Long nNewY = (aScreenRect.GetHeight() - 
maGeometry.nHeight)/2;
+            tools::Long nNewX = (aScreenRect.GetWidth() - maGeometry.width()) 
/ 2;
+            tools::Long nNewY = (aScreenRect.GetHeight() - 
maGeometry.height()) / 2;
             SetPosSize( nNewX, nNewY, 0, 0,  SAL_FRAME_POSSIZE_X | 
SAL_FRAME_POSSIZE_Y );
         }
     }
@@ -424,7 +424,7 @@ void AquaSalFrame::SendPaintEvent( const tools::Rectangle* 
pRect )
 {
     OSX_SALDATA_RUNINMAIN( SendPaintEvent( pRect ) )
 
-    SalPaintEvent aPaintEvt( 0, 0, maGeometry.nWidth, maGeometry.nHeight, true 
);
+    SalPaintEvent aPaintEvt(0, 0, maGeometry.width(), maGeometry.height(), 
true);
     if( pRect )
     {
         aPaintEvt.mnBoundX      = pRect->Left();
@@ -507,8 +507,8 @@ void AquaSalFrame::SetMinClientSize( tools::Long nWidth, 
tools::Long nHeight )
     {
         // Always add the decoration as the dimension concerns only
         // the content rectangle
-        nWidth += maGeometry.nLeftDecoration + maGeometry.nRightDecoration;
-        nHeight += maGeometry.nTopDecoration + maGeometry.nBottomDecoration;
+        nWidth += maGeometry.leftDecoration() + maGeometry.rightDecoration();
+        nHeight += maGeometry.topDecoration() + maGeometry.bottomDecoration();
 
         NSSize aSize = { static_cast<CGFloat>(nWidth), 
static_cast<CGFloat>(nHeight) };
 
@@ -529,8 +529,8 @@ void AquaSalFrame::SetMaxClientSize( tools::Long nWidth, 
tools::Long nHeight )
     {
         // Always add the decoration as the dimension concerns only
         // the content rectangle
-        nWidth += maGeometry.nLeftDecoration + maGeometry.nRightDecoration;
-        nHeight += maGeometry.nTopDecoration + maGeometry.nBottomDecoration;
+        nWidth += maGeometry.leftDecoration() + maGeometry.rightDecoration();
+        nHeight += maGeometry.topDecoration() + maGeometry.bottomDecoration();
 
         // Carbon windows can't have a size greater than 32767x32767
         if (nWidth>32767) nWidth=32767;
@@ -548,8 +548,8 @@ void AquaSalFrame::GetClientSize( tools::Long& rWidth, 
tools::Long& rHeight )
 {
     if (mbShown || mbInitShow || Application::IsBitmapRendering())
     {
-        rWidth  = maGeometry.nWidth;
-        rHeight = maGeometry.nHeight;
+        rWidth = maGeometry.width();
+        rHeight = maGeometry.height();
     }
     else
     {
@@ -578,24 +578,24 @@ SalEvent AquaSalFrame::PreparePosSize(tools::Long nX, 
tools::Long nY, tools::Lon
     if (Application::IsBitmapRendering())
     {
         if (nFlags & SAL_FRAME_POSSIZE_X)
-            maGeometry.nX = nX;
+            maGeometry.setX(nX);
         if (nFlags & SAL_FRAME_POSSIZE_Y)
-            maGeometry.nY = nY;
+            maGeometry.setY(nY);
         if (nFlags & SAL_FRAME_POSSIZE_WIDTH)
         {
-            maGeometry.nWidth = nWidth;
-            if (mnMaxWidth > 0 && maGeometry.nWidth > 
o3tl::make_unsigned(mnMaxWidth))
-                maGeometry.nWidth = mnMaxWidth;
-            if (mnMinWidth > 0 && maGeometry.nWidth < 
o3tl::make_unsigned(mnMinWidth))
-                maGeometry.nWidth = mnMinWidth;
+            maGeometry.setWidth(nWidth);
+            if (mnMaxWidth > 0 && maGeometry.width() > mnMaxWidth)
+                maGeometry.setWidth(mnMaxWidth);
+            if (mnMinWidth > 0 && maGeometry.width() < mnMinWidth)
+                maGeometry.setWidth(mnMinWidth);
         }
         if (nFlags & SAL_FRAME_POSSIZE_HEIGHT)
         {
-            maGeometry.nHeight = nHeight;
-            if (mnMaxHeight > 0 && maGeometry.nHeight > 
o3tl::make_unsigned(mnMaxHeight))
-                maGeometry.nHeight = mnMaxHeight;
-            if (mnMinHeight > 0 && maGeometry.nHeight < 
o3tl::make_unsigned(mnMinHeight))
-                maGeometry.nHeight = mnMinHeight;
+            maGeometry.setHeight(nHeight);
+            if (mnMaxHeight > 0 && maGeometry.height() > mnMaxHeight)
+                maGeometry.setHeight(mnMaxHeight);
+            if (mnMinHeight > 0 && maGeometry.height() < mnMinHeight)
+                maGeometry.setHeight(mnMinHeight);
         }
         if (nEvent != SalEvent::NONE)
             CallCallback(nEvent, nullptr);
@@ -604,7 +604,7 @@ SalEvent AquaSalFrame::PreparePosSize(tools::Long nX, 
tools::Long nY, tools::Lon
     return nEvent;
 }
 
-void AquaSalFrame::SetWindowState( const SalFrameState* pState )
+void AquaSalFrame::SetWindowState(const vcl::WindowData* pState)
 {
     if (!mpNSWindow && !Application::IsBitmapRendering())
         return;
@@ -612,12 +612,12 @@ void AquaSalFrame::SetWindowState( const SalFrameState* 
pState )
     OSX_SALDATA_RUNINMAIN( SetWindowState( pState ) )
 
     sal_uInt16 nFlags = 0;
-    nFlags |= ((pState->mnMask & WindowStateMask::X) ? SAL_FRAME_POSSIZE_X : 
0);
-    nFlags |= ((pState->mnMask & WindowStateMask::Y) ? SAL_FRAME_POSSIZE_Y : 
0);
-    nFlags |= ((pState->mnMask & WindowStateMask::Width) ? 
SAL_FRAME_POSSIZE_WIDTH : 0);
-    nFlags |= ((pState->mnMask & WindowStateMask::Height) ? 
SAL_FRAME_POSSIZE_HEIGHT : 0);
+    nFlags |= ((pState->mask() & vcl::WindowDataMask::X) ? SAL_FRAME_POSSIZE_X 
: 0);
+    nFlags |= ((pState->mask() & vcl::WindowDataMask::Y) ? SAL_FRAME_POSSIZE_Y 
: 0);
+    nFlags |= ((pState->mask() & vcl::WindowDataMask::Width) ? 
SAL_FRAME_POSSIZE_WIDTH : 0);
+    nFlags |= ((pState->mask() & vcl::WindowDataMask::Height) ? 
SAL_FRAME_POSSIZE_HEIGHT : 0);
 
-    SalEvent nEvent = PreparePosSize(pState->mnX, pState->mnY, 
pState->mnWidth, pState->mnHeight, nFlags);
+    SalEvent nEvent = PreparePosSize(pState->x(), pState->y(), 
pState->width(), pState->height(), nFlags);
     if (Application::IsBitmapRendering())
         return;
 
@@ -625,19 +625,19 @@ void AquaSalFrame::SetWindowState( const SalFrameState* 
pState )
     NSRect aStateRect = [mpNSWindow frame];
     aStateRect = [NSWindow contentRectForFrameRect: aStateRect styleMask: 
mnStyleMask];
     CocoaToVCL(aStateRect);
-    if (pState->mnMask & WindowStateMask::X)
-        aStateRect.origin.x = float(pState->mnX);
-    if (pState->mnMask & WindowStateMask::Y)
-        aStateRect.origin.y = float(pState->mnY);
-    if (pState->mnMask & WindowStateMask::Width)
-        aStateRect.size.width = float(pState->mnWidth);
-    if (pState->mnMask & WindowStateMask::Height)
-        aStateRect.size.height = float(pState->mnHeight);
+    if (pState->mask() & vcl::WindowDataMask::X)
+        aStateRect.origin.x = float(pState->x());
+    if (pState->mask() & vcl::WindowDataMask::Y)
+        aStateRect.origin.y = float(pState->y());
+    if (pState->mask() & vcl::WindowDataMask::Width)
+        aStateRect.size.width = float(pState->width());
+    if (pState->mask() & vcl::WindowDataMask::Height)
+        aStateRect.size.height = float(pState->height());
     VCLToCocoa(aStateRect);
     aStateRect = [NSWindow frameRectForContentRect: aStateRect styleMask: 
mnStyleMask];
     [mpNSWindow setFrame: aStateRect display: NO];
 
-    if (pState->mnState == WindowStateState::Minimized)
+    if (pState->state() == vcl::WindowState::Minimized)
         [mpNSWindow miniaturize: NSApp];
     else if ([mpNSWindow isMiniaturized])
         [mpNSWindow deminiaturize: NSApp];
@@ -646,7 +646,7 @@ void AquaSalFrame::SetWindowState( const SalFrameState* 
pState )
        the program specified one), but comes closest since the default 
behavior is
        "maximized" if the user did not intervene
      */
-    if (pState->mnState == WindowStateState::Maximized)
+    if (pState->state() == vcl::WindowState::Maximized)
     {
         if (![mpNSWindow isZoomed])
             [mpNSWindow zoom: NSApp];
@@ -674,20 +674,15 @@ void AquaSalFrame::SetWindowState( const SalFrameState* 
pState )
     }
 }
 
-bool AquaSalFrame::GetWindowState( SalFrameState* pState )
+bool AquaSalFrame::GetWindowState(vcl::WindowData* pState)
 {
     if (!mpNSWindow)
     {
         if (Application::IsBitmapRendering())
         {
-            pState->mnMask = WindowStateMask::X | WindowStateMask::Y
-                             | WindowStateMask::Width | WindowStateMask::Height
-                             | WindowStateMask::State;
-            pState->mnX = maGeometry.nX;
-            pState->mnY = maGeometry.nY;
-            pState->mnWidth = maGeometry.nWidth;
-            pState->mnHeight = maGeometry.nHeight;
-            pState->mnState = WindowStateState::Normal;
+            pState->setMask(vcl::WindowDataMask::PosSizeState);
+            pState->setPosSize(maGeometry.posSize());
+            pState->setState(vcl::WindowState::Normal);
             return true;
         }
         return false;
@@ -695,26 +690,22 @@ bool AquaSalFrame::GetWindowState( SalFrameState* pState )
 
     OSX_SALDATA_RUNINMAIN_UNION( GetWindowState( pState ), boolean )
 
-    pState->mnMask = WindowStateMask::X                 |
-                     WindowStateMask::Y                 |
-                     WindowStateMask::Width             |
-                     WindowStateMask::Height            |
-                     WindowStateMask::State;
+    pState->setMask(vcl::WindowDataMask::PosSizeState);
 
     NSRect aStateRect = [mpNSWindow frame];
     aStateRect = [NSWindow contentRectForFrameRect: aStateRect styleMask: 
mnStyleMask];
     CocoaToVCL( aStateRect );
-    pState->mnX         = tools::Long(aStateRect.origin.x);
-    pState->mnY         = tools::Long(aStateRect.origin.y);
-    pState->mnWidth     = tools::Long(aStateRect.size.width);
-    pState->mnHeight    = tools::Long(aStateRect.size.height);
+    pState->setX(static_cast<sal_Int32>(aStateRect.origin.x));
+    pState->setY(static_cast<sal_Int32>(aStateRect.origin.y));
+    pState->setWidth(static_cast<sal_uInt32>(aStateRect.size.width));
+    pState->setHeight(static_cast<sal_uInt32>(aStateRect.size.height));
 
     if( [mpNSWindow isMiniaturized] )
-        pState->mnState = WindowStateState::Minimized;
+        pState->setState(vcl::WindowState::Minimized);
     else if( ! [mpNSWindow isZoomed] )
-        pState->mnState = WindowStateState::Normal;
+        pState->setState(vcl::WindowState::Normal);
     else
-        pState->mnState = WindowStateState::Maximized;
+        pState->setState(vcl::WindowState::Maximized);
 
     return true;
 }
@@ -961,7 +952,7 @@ void AquaSalFrame::SetPointerPos( tools::Long nX, 
tools::Long nY )
 
     // FIXME: use Cocoa functions
     // FIXME: multiscreen support
-    CGPoint aPoint = { static_cast<CGFloat>(nX + maGeometry.nX), 
static_cast<CGFloat>(nY + maGeometry.nY) };
+    CGPoint aPoint = { static_cast<CGFloat>(nX + maGeometry.x()), 
static_cast<CGFloat>(nY + maGeometry.y()) };
     CGDirectDisplayID mainDisplayID = CGMainDisplayID();
     CGDisplayMoveCursorToPoint( mainDisplayID, aPoint );
 }
@@ -1392,9 +1383,9 @@ void AquaSalFrame::SetPosSize(
         if( AllSettings::GetLayoutRTL() )
         {
             if( (nFlags & SAL_FRAME_POSSIZE_WIDTH) != 0 )
-                nX = mpParent->maGeometry.nWidth - nWidth-1 - nX;
+                nX = static_cast<tools::Long>(mpParent->maGeometry.width()) - 
nWidth - 1 - nX;
             else
-                nX = mpParent->maGeometry.nWidth - static_cast<tools::Long>( 
aContentRect.size.width-1) - nX;
+                nX = static_cast<tools::Long>(mpParent->maGeometry.width()) - 
aContentRect.size.width - 1 - nX;
         }
         NSRect aParentFrameRect = [mpParent->mpNSWindow frame];
         aParentContentRect = [NSWindow contentRectForFrameRect: 
aParentFrameRect styleMask: mpParent->mnStyleMask];
@@ -1669,10 +1660,10 @@ void AquaSalFrame::UpdateFrameGeometry()
         if( pScreens )
         {
             unsigned int nNewDisplayScreenNumber = [pScreens indexOfObject: 
pScreen];
-            if (bFirstTime || maGeometry.nDisplayScreenNumber != 
nNewDisplayScreenNumber)
+            if (bFirstTime || maGeometry.screen() != nNewDisplayScreenNumber)
             {
                 mbGeometryDidChange = true;
-                maGeometry.nDisplayScreenNumber = nNewDisplayScreenNumber;
+                maGeometry.setScreen(nNewDisplayScreenNumber);
             }
         }
     }
@@ -1704,19 +1695,17 @@ void AquaSalFrame::UpdateFrameGeometry()
         maContentRect = aContentRect;
         maFrameRect = aFrameRect;
 
-        maGeometry.nX = static_cast<int>(aContentRect.origin.x);
-        maGeometry.nY = static_cast<int>(aContentRect.origin.y);
-
-        maGeometry.nLeftDecoration = static_cast<unsigned 
int>(aContentRect.origin.x - aFrameRect.origin.x);
-        maGeometry.nRightDecoration = static_cast<unsigned 
int>((aFrameRect.origin.x + aFrameRect.size.width) -
-                                      (aContentRect.origin.x + 
aContentRect.size.width));
-
-        maGeometry.nTopDecoration = static_cast<unsigned 
int>(aContentRect.origin.y - aFrameRect.origin.y);
-        maGeometry.nBottomDecoration = static_cast<unsigned 
int>((aFrameRect.origin.y + aFrameRect.size.height) -
-                                       (aContentRect.origin.y + 
aContentRect.size.height));
-
-        maGeometry.nWidth = static_cast<unsigned int>(aContentRect.size.width);
-        maGeometry.nHeight = static_cast<unsigned 
int>(aContentRect.size.height);
+        maGeometry.setX(static_cast<sal_Int32>(aContentRect.origin.x));
+        maGeometry.setY(static_cast<sal_Int32>(aContentRect.origin.y));
+        maGeometry.setWidth(static_cast<sal_uInt32>(aContentRect.size.width));
+        
maGeometry.setHeight(static_cast<sal_uInt32>(aContentRect.size.height));
+
+        
maGeometry.setLeftDecoration(static_cast<sal_uInt32>(aContentRect.origin.x - 
aFrameRect.origin.x));
+        
maGeometry.setRightDecoration(static_cast<sal_uInt32>((aFrameRect.origin.x + 
aFrameRect.size.width) -
+                                      (aContentRect.origin.x + 
aContentRect.size.width)));
+        
maGeometry.setTopDecoration(static_cast<sal_uInt32>(aContentRect.origin.y - 
aFrameRect.origin.y));
+        
maGeometry.setBottomDecoration(static_cast<sal_uInt32>((aFrameRect.origin.y + 
aFrameRect.size.height) -
+                                       (aContentRect.origin.y + 
aContentRect.size.height)));
     }
 }
 
diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm
index ee245af64820..df2c55abf97a 100644
--- a/vcl/osx/salframeview.mm
+++ b/vcl/osx/salframeview.mm
@@ -166,8 +166,8 @@ static AquaSalFrame* getMouseContainerFrame()
 {
     mDraggingDestinationHandler = nil;
     mpFrame = pFrame;
-    NSRect aRect = { { static_cast<CGFloat>(pFrame->maGeometry.nX), 
static_cast<CGFloat>(pFrame->maGeometry.nY) },
-                     { static_cast<CGFloat>(pFrame->maGeometry.nWidth), 
static_cast<CGFloat>(pFrame->maGeometry.nHeight) } };
+    NSRect aRect = { { static_cast<CGFloat>(pFrame->maGeometry.x()), 
static_cast<CGFloat>(pFrame->maGeometry.y()) },
+                     { static_cast<CGFloat>(pFrame->maGeometry.width()), 
static_cast<CGFloat>(pFrame->maGeometry.height()) } };
     pFrame->VCLToCocoa( aRect );
     NSWindow* pNSWindow = [super initWithContentRect: aRect
                                  styleMask: mpFrame->getStyleMask()
@@ -473,7 +473,7 @@ static AquaSalFrame* getMouseContainerFrame()
     if( mpFrame && AquaSalFrame::isAlive( mpFrame ) )
     {
         // FIXME: does this leak the returned NSCursor of getCurrentCursor ?
-        const NSRect aRect = { NSZeroPoint, NSMakeSize( 
mpFrame->maGeometry.nWidth, mpFrame->maGeometry.nHeight) };
+        const NSRect aRect = { NSZeroPoint, 
NSMakeSize(mpFrame->maGeometry.width(), mpFrame->maGeometry.height()) };
         [self addCursorRect: aRect cursor: mpFrame->getCurrentCursor()];
     }
 }
@@ -600,13 +600,13 @@ static AquaSalFrame* getMouseContainerFrame()
 
         SalMouseEvent aEvent;
         aEvent.mnTime   = pDispatchFrame->mnLastEventTime;
-        aEvent.mnX      = static_cast<tools::Long>(aPt.x) - 
pDispatchFrame->maGeometry.nX;
-        aEvent.mnY      = static_cast<tools::Long>(aPt.y) - 
pDispatchFrame->maGeometry.nY;
+        aEvent.mnX = static_cast<tools::Long>(aPt.x) - 
pDispatchFrame->maGeometry.x();
+        aEvent.mnY = static_cast<tools::Long>(aPt.y) - 
pDispatchFrame->maGeometry.y();
         aEvent.mnButton = nButton;
         aEvent.mnCode   =  aEvent.mnButton | nModMask;
 
         if( AllSettings::GetLayoutRTL() )
-            aEvent.mnX = pDispatchFrame->maGeometry.nWidth-1-aEvent.mnX;
+            aEvent.mnX = pDispatchFrame->maGeometry.width() - 1 - aEvent.mnX;
 
         pDispatchFrame->CallCallback( nEvent, &aEvent );
     }
@@ -760,14 +760,14 @@ static AquaSalFrame* getMouseContainerFrame()
 
         SalWheelMouseEvent aEvent;
         aEvent.mnTime           = mpFrame->mnLastEventTime;
-        aEvent.mnX              = static_cast<tools::Long>(aPt.x) - 
mpFrame->maGeometry.nX;
-        aEvent.mnY              = static_cast<tools::Long>(aPt.y) - 
mpFrame->maGeometry.nY;
+        aEvent.mnX = static_cast<tools::Long>(aPt.x) - mpFrame->maGeometry.x();
+        aEvent.mnY = static_cast<tools::Long>(aPt.y) - mpFrame->maGeometry.y();
         aEvent.mnCode           = ImplGetModifierMask( 
mpFrame->mnLastModifierFlags );
         aEvent.mnCode           |= KEY_MOD1; // we want zooming, no scrolling
         aEvent.mbDeltaIsPixel   = true;
 
         if( AllSettings::GetLayoutRTL() )
-            aEvent.mnX = mpFrame->maGeometry.nWidth-1-aEvent.mnX;
+            aEvent.mnX = mpFrame->maGeometry.width() - 1 - aEvent.mnX;
 
         aEvent.mnDelta = nDeltaZ;
         aEvent.mnNotchDelta = (nDeltaZ >= 0) ? +1 : -1;
@@ -817,13 +817,13 @@ static AquaSalFrame* getMouseContainerFrame()
 
         SalWheelMouseEvent aEvent;
         aEvent.mnTime           = mpFrame->mnLastEventTime;
-        aEvent.mnX              = static_cast<tools::Long>(aPt.x) - 
mpFrame->maGeometry.nX;
-        aEvent.mnY              = static_cast<tools::Long>(aPt.y) - 
mpFrame->maGeometry.nY;
+        aEvent.mnX = static_cast<tools::Long>(aPt.x) - mpFrame->maGeometry.x();
+        aEvent.mnY = static_cast<tools::Long>(aPt.y) - mpFrame->maGeometry.y();
         aEvent.mnCode           = ImplGetModifierMask( 
mpFrame->mnLastModifierFlags );
         aEvent.mbDeltaIsPixel   = true;
 
         if( AllSettings::GetLayoutRTL() )
-            aEvent.mnX = mpFrame->maGeometry.nWidth-1-aEvent.mnX;
+            aEvent.mnX = mpFrame->maGeometry.width() - 1 - aEvent.mnX;
 
         if( dX != 0.0 )
         {
@@ -876,13 +876,13 @@ static AquaSalFrame* getMouseContainerFrame()
 
         SalWheelMouseEvent aEvent;
         aEvent.mnTime         = mpFrame->mnLastEventTime;
-        aEvent.mnX            = static_cast<tools::Long>(aPt.x) - 
mpFrame->maGeometry.nX;
-        aEvent.mnY            = static_cast<tools::Long>(aPt.y) - 
mpFrame->maGeometry.nY;
+        aEvent.mnX = static_cast<tools::Long>(aPt.x) - mpFrame->maGeometry.x();
+        aEvent.mnY = static_cast<tools::Long>(aPt.y) - mpFrame->maGeometry.y();
         aEvent.mnCode         = ImplGetModifierMask( 
mpFrame->mnLastModifierFlags );
         aEvent.mbDeltaIsPixel = false;
 
         if( AllSettings::GetLayoutRTL() )
-            aEvent.mnX = mpFrame->maGeometry.nWidth-1-aEvent.mnX;
+            aEvent.mnX = mpFrame->maGeometry.width() - 1 - aEvent.mnX;
 
         if( dX != 0.0 )
         {
@@ -1666,8 +1666,8 @@ static AquaSalFrame* getMouseContainerFrame()
 
     NSRect rect;
 
-    rect.origin.x = aPosEvent.mnX + mpFrame->maGeometry.nX;
-    rect.origin.y =   aPosEvent.mnY + mpFrame->maGeometry.nY + 4; // add some 
space for underlines
+    rect.origin.x = aPosEvent.mnX + mpFrame->maGeometry.x();
+    rect.origin.y = aPosEvent.mnY + mpFrame->maGeometry.y() + 4; // add some 
space for underlines
     rect.size.width = aPosEvent.mnWidth;
     rect.size.height = aPosEvent.mnHeight;
 
diff --git a/vcl/osx/salgdiutils.cxx b/vcl/osx/salgdiutils.cxx
index 7b088864d111..603a8b612d42 100644
--- a/vcl/osx/salgdiutils.cxx
+++ b/vcl/osx/salgdiutils.cxx
@@ -148,8 +148,8 @@ bool AquaSharedAttributes::checkContext()
 {
     if (mbWindow && mpFrame && (mpFrame->getNSWindow() || 
Application::IsBitmapRendering()))
     {
-        const unsigned int nWidth = mpFrame->maGeometry.nWidth;
-        const unsigned int nHeight = mpFrame->maGeometry.nHeight;
+        const unsigned int nWidth = mpFrame->maGeometry.width();
+        const unsigned int nHeight = mpFrame->maGeometry.height();
         const float fScale = sal::aqua::getWindowScaling();
         CGLayerRef rReleaseLayer = nullptr;
 
diff --git a/vcl/osx/salmenu.cxx b/vcl/osx/salmenu.cxx
index ab6263cc84a7..c35e7487f0f6 100644
--- a/vcl/osx/salmenu.cxx
+++ b/vcl/osx/salmenu.cxx
@@ -302,8 +302,8 @@ bool AquaSalMenu::ShowNativePopupMenu(FloatingWindow * 
pWin, const tools::Rectan
     // in mirrored UI case; best done by actually executing the same code
     sal_uInt16 nArrangeIndex;
     pWin->SetPosPixel( FloatingWindow::ImplCalcPos( pWin, rRect, nFlags, 
nArrangeIndex ) );
-    displayPopupFrame.origin.x = pWin->ImplGetFrame()->maGeometry.nX - 
pParentAquaSalFrame->maGeometry.nX + offset;
-    displayPopupFrame.origin.y = pWin->ImplGetFrame()->maGeometry.nY - 
pParentAquaSalFrame->maGeometry.nY + offset;
+    displayPopupFrame.origin.x = pWin->ImplGetFrame()->maGeometry.x() - 
pParentAquaSalFrame->maGeometry.x() + offset;
+    displayPopupFrame.origin.y = pWin->ImplGetFrame()->maGeometry.y() - 
pParentAquaSalFrame->maGeometry.y() + offset;
     pParentAquaSalFrame->VCLToCocoa(displayPopupFrame, false);
 
     // #i111992# if this menu was opened due to a key event, prevent 
dispatching that yet again
@@ -819,8 +819,8 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
 
     // make coordinates relative to reference frame
     static_cast<AquaSalFrame*>(i_pReferenceFrame)->CocoaToVCL( aRect.origin );
-    aRect.origin.x -= i_pReferenceFrame->maGeometry.nX;
-    aRect.origin.y -= i_pReferenceFrame->maGeometry.nY + aRect.size.height;
+    aRect.origin.x -= i_pReferenceFrame->maGeometry.x();
+    aRect.origin.y -= i_pReferenceFrame->maGeometry.y() + aRect.size.height;
 
     return tools::Rectangle( Point(static_cast<tools::Long>(aRect.origin.x),
                 static_cast<tools::Long>(aRect.origin.y)
diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx
index 328cf9c94eca..3cd368b92a81 100644
--- a/vcl/osx/salnativewidgets.cxx
+++ b/vcl/osx/salnativewidgets.cxx
@@ -866,11 +866,11 @@ bool 
AquaGraphicsBackendBase::performDrawNativeControl(ControlType nType,
                         // strange effects start to happen when 
HIThemeDrawFrame meets the border of the window.
                         // These can be avoided by clipping to the boundary of 
the frame (see issue 84756)
 
-                        if (rc.origin.y + rc.size.height >= 
mpFrame->maGeometry.nHeight - 3)
+                        if (rc.origin.y + rc.size.height >= 
mpFrame->maGeometry.height() - 3)
                         {
                             CGMutablePathRef rPath = CGPathCreateMutable();
                             CGPathAddRect(rPath, nullptr,
-                                          CGRectMake(0, 0, 
mpFrame->maGeometry.nWidth - 1, mpFrame->maGeometry.nHeight - 1));
+                                          CGRectMake(0, 0, 
mpFrame->maGeometry.width() - 1, mpFrame->maGeometry.height() - 1));
                             CGContextBeginPath(context);
                             CGContextAddPath(context, rPath);
                             CGContextClip(context);
diff --git a/vcl/qt5/QtFrame.cxx b/vcl/qt5/QtFrame.cxx
index 3c63060855ab..ec28689199e7 100644
--- a/vcl/qt5/QtFrame.cxx
+++ b/vcl/qt5/QtFrame.cxx
@@ -544,7 +544,7 @@ Size QtFrame::CalcDefaultSize()
     {
         if (!m_bFullScreenSpanAll)
         {
-            aSize = 
toSize(QGuiApplication::screens().at(maGeometry.nDisplayScreenNumber)->size());
+            aSize = 
toSize(QGuiApplication::screens().at(maGeometry.screen())->size());
         }
         else
         {
@@ -584,9 +584,9 @@ void QtFrame::SetPosSize(tools::Long nX, tools::Long nY, 
tools::Long nWidth, too
         if (isChild(false) || !m_pQWidget->isMaximized())
         {
             if (!(nFlags & SAL_FRAME_POSSIZE_WIDTH))
-                nWidth = maGeometry.nWidth;
+                nWidth = maGeometry.width();
             else if (!(nFlags & SAL_FRAME_POSSIZE_HEIGHT))
-                nHeight = maGeometry.nHeight;
+                nHeight = maGeometry.height();
 
             if (nWidth > 0 && nHeight > 0)
             {
@@ -602,9 +602,9 @@ void QtFrame::SetPosSize(tools::Long nX, tools::Long nY, 
tools::Long nWidth, too
             // assume the resize happened
             // needed for calculations and will eventually be corrected by 
events
             if (nWidth > 0)
-                maGeometry.nWidth = nWidth;
+                maGeometry.setWidth(nWidth);
             if (nHeight > 0)
-                maGeometry.nHeight = nHeight;
+                maGeometry.setHeight(nHeight);
         }
     }
 
@@ -619,21 +619,20 @@ void QtFrame::SetPosSize(tools::Long nX, tools::Long nY, 
tools::Long nWidth, too
     {
         const SalFrameGeometry& aParentGeometry = m_pParent->maGeometry;
         if (QGuiApplication::isRightToLeft())
-            nX = aParentGeometry.nX + aParentGeometry.nWidth - nX - 
maGeometry.nWidth - 1;
+            nX = aParentGeometry.x() + aParentGeometry.width() - nX - 
maGeometry.width() - 1;
         else
-            nX += aParentGeometry.nX;
-        nY += aParentGeometry.nY + menuBarOffset();
+            nX += aParentGeometry.x();
+        nY += aParentGeometry.y() + menuBarOffset();
     }
 
     if (!(nFlags & SAL_FRAME_POSSIZE_X))
-        nX = maGeometry.nX;
+        nX = maGeometry.x();
     else if (!(nFlags & SAL_FRAME_POSSIZE_Y))
-        nY = maGeometry.nY;
+        nY = maGeometry.y();
 
     // assume the reposition happened
     // needed for calculations and will eventually be corrected by events later
-    maGeometry.nX = nX;
-    maGeometry.nY = nY;
+    maGeometry.setPos({ nX, nY });
 
     m_bDefaultPos = false;
     asChild()->move(round(nX / devicePixelRatioF()), round(nY / 
devicePixelRatioF()));
@@ -684,71 +683,64 @@ void QtFrame::SetModal(bool bModal)
 
 bool QtFrame::GetModal() const { return isWindow() && 
windowHandle()->isModal(); }
 
-void QtFrame::SetWindowState(const SalFrameState* pState)
+void QtFrame::SetWindowState(const vcl::WindowData* pState)
 {
     if (!isWindow() || !pState || isChild(true, false))
         return;
 
-    const WindowStateMask nMaxGeometryMask
-        = WindowStateMask::X | WindowStateMask::Y | WindowStateMask::Width | 
WindowStateMask::Height
-          | WindowStateMask::MaximizedX | WindowStateMask::MaximizedY
-          | WindowStateMask::MaximizedWidth | WindowStateMask::MaximizedHeight;
+    const vcl::WindowDataMask nMaxGeometryMask
+        = vcl::WindowDataMask::PosSize | vcl::WindowDataMask::MaximizedX
+          | vcl::WindowDataMask::MaximizedY | 
vcl::WindowDataMask::MaximizedWidth
+          | vcl::WindowDataMask::MaximizedHeight;
 
-    if ((pState->mnMask & WindowStateMask::State) && (pState->mnState & 
WindowStateState::Maximized)
-        && !isMaximized() && (pState->mnMask & nMaxGeometryMask) == 
nMaxGeometryMask)
+    if ((pState->mask() & vcl::WindowDataMask::State)
+        && (pState->state() & vcl::WindowState::Maximized) && !isMaximized()
+        && (pState->mask() & nMaxGeometryMask) == nMaxGeometryMask)
     {
         const qreal fRatio = devicePixelRatioF();
         QWidget* const pChild = asChild();
-        pChild->resize(ceil(pState->mnWidth / fRatio), ceil(pState->mnHeight / 
fRatio));
-        pChild->move(ceil(pState->mnX / fRatio), ceil(pState->mnY / fRatio));
+        pChild->resize(ceil(pState->width() / fRatio), ceil(pState->height() / 
fRatio));
+        pChild->move(ceil(pState->x() / fRatio), ceil(pState->y() / fRatio));
         SetWindowStateImpl(Qt::WindowMaximized);
     }
-    else if (pState->mnMask
-             & (WindowStateMask::X | WindowStateMask::Y | 
WindowStateMask::Width
-                | WindowStateMask::Height))
+    else if (pState->mask() & vcl::WindowDataMask::PosSize)
     {
         sal_uInt16 nPosSizeFlags = 0;
-        if (pState->mnMask & WindowStateMask::X)
+        if (pState->mask() & vcl::WindowDataMask::X)
             nPosSizeFlags |= SAL_FRAME_POSSIZE_X;
-        if (pState->mnMask & WindowStateMask::Y)
+        if (pState->mask() & vcl::WindowDataMask::Y)
             nPosSizeFlags |= SAL_FRAME_POSSIZE_Y;
-        if (pState->mnMask & WindowStateMask::Width)
+        if (pState->mask() & vcl::WindowDataMask::Width)
             nPosSizeFlags |= SAL_FRAME_POSSIZE_WIDTH;
-        if (pState->mnMask & WindowStateMask::Height)
+        if (pState->mask() & vcl::WindowDataMask::Height)
             nPosSizeFlags |= SAL_FRAME_POSSIZE_HEIGHT;
-        SetPosSize(pState->mnX, pState->mnY, pState->mnWidth, 
pState->mnHeight, nPosSizeFlags);
+        SetPosSize(pState->x(), pState->y(), pState->width(), 
pState->height(), nPosSizeFlags);
     }
-    else if (pState->mnMask & WindowStateMask::State && !isChild())
+    else if (pState->mask() & vcl::WindowDataMask::State && !isChild())
     {
-        if (pState->mnState & WindowStateState::Maximized)
+        if (pState->state() & vcl::WindowState::Maximized)
             SetWindowStateImpl(Qt::WindowMaximized);
-        else if (pState->mnState & WindowStateState::Minimized)
+        else if (pState->state() & vcl::WindowState::Minimized)
             SetWindowStateImpl(Qt::WindowMinimized);
         else
             SetWindowStateImpl(Qt::WindowNoState);
     }
 }
 
-bool QtFrame::GetWindowState(SalFrameState* pState)
+bool QtFrame::GetWindowState(vcl::WindowData* pState)
 {
-    pState->mnState = WindowStateState::Normal;
-    pState->mnMask = WindowStateMask::State;
-    if (isMinimized() /*|| !windowHandle()*/)
-        pState->mnState |= WindowStateState::Minimized;
+    pState->setState(vcl::WindowState::Normal);
+    pState->setMask(vcl::WindowDataMask::State);
+    if (isMinimized())
+        pState->rState() |= vcl::WindowState::Minimized;
     else if (isMaximized())
-    {
-        pState->mnState |= WindowStateState::Maximized;
-    }
+        pState->rState() |= vcl::WindowState::Maximized;
     else
     {
         // we want the frame position and the client area size
         QRect rect = scaledQRect({ asChild()->pos(), asChild()->size() }, 
devicePixelRatioF());
-        pState->mnX = rect.x();
-        pState->mnY = rect.y();
-        pState->mnWidth = rect.width();
-        pState->mnHeight = rect.height();
-        pState->mnMask |= WindowStateMask::X | WindowStateMask::Y | 
WindowStateMask::Width
-                          | WindowStateMask::Height;
+        pState->setPosSize(toRectangle(rect));
+        pState->rMask() |= vcl::WindowDataMask::PosSize;
     }
 
     return true;
@@ -772,7 +764,7 @@ void QtFrame::ShowFullScreen(bool bFullScreen, sal_Int32 
nScreen)
     if (m_bFullScreen)
     {
         m_aRestoreGeometry = m_pTopLevel->geometry();
-        m_nRestoreScreen = maGeometry.nDisplayScreenNumber;
+        m_nRestoreScreen = maGeometry.screen();
         SetScreenNumber(m_bFullScreenSpanAll ? m_nRestoreScreen : nScreen);
         if (!m_bFullScreenSpanAll)
             windowHandle()->showFullScreen();
@@ -875,7 +867,7 @@ bool QtFrame::ShowTooltip(const OUString& rText, const 
tools::Rectangle& rHelpAr
 {
     QRect aHelpArea(toQRect(rHelpArea));
     if (QGuiApplication::isRightToLeft())
-        aHelpArea.moveLeft(maGeometry.nWidth - aHelpArea.width() - 
aHelpArea.left() - 1);
+        aHelpArea.moveLeft(maGeometry.width() - aHelpArea.width() - 
aHelpArea.left() - 1);
     m_aTooltipText = rText;
     m_aTooltipArea = aHelpArea;
     return true;
@@ -1274,7 +1266,7 @@ SalFrame::SalPointerState QtFrame::GetPointerState()
 {
     SalPointerState aState;
     aState.maPos = toPoint(QCursor::pos() * devicePixelRatioF());
-    aState.maPos.Move(-maGeometry.nX, -maGeometry.nY);
+    aState.maPos.Move(-maGeometry.x(), -maGeometry.y());
     aState.mnState = GetMouseModCode(QGuiApplication::mouseButtons())
                      | GetKeyModCode(QGuiApplication::keyboardModifiers());
     return aState;
@@ -1360,7 +1352,7 @@ void QtFrame::SetScreenNumber(unsigned int nScreen)
         nScreen = static_cast<sal_uInt32>(screenNumber(primaryScreen));
     }
 
-    maGeometry.nDisplayScreenNumber = nScreen;
+    maGeometry.setScreen(nScreen);
 }
 
 void QtFrame::SetApplicationID(const OUString& rWMClass)
diff --git a/vcl/qt5/QtMainWindow.cxx b/vcl/qt5/QtMainWindow.cxx
index 1e6ebc81a7be..5ff9ac9a8116 100644
--- a/vcl/qt5/QtMainWindow.cxx
+++ b/vcl/qt5/QtMainWindow.cxx
@@ -41,7 +41,6 @@ void QtMainWindow::closeEvent(QCloseEvent* pEvent)
 void QtMainWindow::moveEvent(QMoveEvent* pEvent)
 {
     const qreal fRatio = m_rFrame.devicePixelRatioF();
-    m_rFrame.maGeometry.nX = round(pEvent->pos().x() * fRatio);
-    m_rFrame.maGeometry.nY = round(pEvent->pos().y() * fRatio);
+    m_rFrame.maGeometry.setPos(toPoint(pEvent->pos() * fRatio));
     m_rFrame.CallCallback(SalEvent::Move, nullptr);
 }
diff --git a/vcl/qt5/QtWidget.cxx b/vcl/qt5/QtWidget.cxx
index b2451123e7e6..5c6fc002ac22 100644
--- a/vcl/qt5/QtWidget.cxx
+++ b/vcl/qt5/QtWidget.cxx
@@ -93,8 +93,7 @@ void QtWidget::resizeEvent(QResizeEvent* pEvent)
     const int nWidth = ceil(pEvent->size().width() * fRatio);
     const int nHeight = ceil(pEvent->size().height() * fRatio);
 
-    m_rFrame.maGeometry.nWidth = nWidth;
-    m_rFrame.maGeometry.nHeight = nHeight;
+    m_rFrame.maGeometry.setSize({ nWidth, nHeight });
 
     if (m_rFrame.m_bUseCairo)
     {
@@ -300,9 +299,7 @@ void QtWidget::moveEvent(QMoveEvent* pEvent)
     if (m_rFrame.m_pTopLevel)
         return;
 
-    const Point aPos = toPoint(pEvent->pos() * m_rFrame.devicePixelRatioF());
-    m_rFrame.maGeometry.nX = aPos.X();
-    m_rFrame.maGeometry.nY = aPos.Y();
+    m_rFrame.maGeometry.setPos(toPoint(pEvent->pos() * 
m_rFrame.devicePixelRatioF()));
     m_rFrame.CallCallback(SalEvent::Move, nullptr);
 }
 
diff --git a/vcl/quartz/AquaGraphicsBackend.cxx 
b/vcl/quartz/AquaGraphicsBackend.cxx
index 383fdc0f7fd0..71b50037c02b 100644
--- a/vcl/quartz/AquaGraphicsBackend.cxx
+++ b/vcl/quartz/AquaGraphicsBackend.cxx
@@ -267,7 +267,7 @@ tools::Long AquaGraphicsBackend::GetGraphicsWidth() const
     {
         if (mrShared.mbWindow && mrShared.mpFrame)
         {
-            width = mrShared.mpFrame->maGeometry.nWidth;
+            width = mrShared.mpFrame->maGeometry.width();
         }
     }
 #endif
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 0110e7e53075..0a26b3ae49a4 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -1616,7 +1616,7 @@ void SalInstanceWindow::set_window_state(const OString& 
rStr)
     pSysWin->SetWindowState(rStr);
 }
 
-OString SalInstanceWindow::get_window_state(WindowStateMask nMask) const
+OString SalInstanceWindow::get_window_state(vcl::WindowDataMask nMask) const
 {
     SystemWindow* pSysWin = dynamic_cast<SystemWindow*>(m_xWindow.get());
     assert(pSysWin);
diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx
index a998a7483df8..da8c7e2a5ae8 100644
--- a/vcl/source/gdi/salgdilayout.cxx
+++ b/vcl/source/gdi/salgdilayout.cxx
@@ -43,8 +43,8 @@ SalFrameGeometry SalFrame::GetGeometry() const
     if( pParent && AllSettings::GetLayoutRTL() )
     {
         SalFrameGeometry aGeom = maGeometry;
-        int parent_x = aGeom.nX - pParent->maGeometry.nX;
-        aGeom.nX = pParent->maGeometry.nX + pParent->maGeometry.nWidth - 
maGeometry.nWidth - parent_x;
+        const int nParentX = aGeom.x() - pParent->maGeometry.x();
+        aGeom.setX(pParent->maGeometry.x() + pParent->maGeometry.width() - 
maGeometry.width() - nParentX);
         return aGeom;
     }
     else
diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx
index fb216913b803..471757f6a861 100644
--- a/vcl/source/window/dockwin.cxx
+++ b/vcl/source/window/dockwin.cxx
@@ -835,8 +835,10 @@ void DockingWindow::setPosSizePixel( tools::Long nX, 
tools::Long nY,
             Window::setPosSizePixel( nX, nY, nWidth, nHeight, nFlags );
         else if (comphelper::LibreOfficeKit::isActive())
         {
-            mpFloatWin->SetOutputSizePixel(Size(nWidth, nHeight));
-            mpFloatWin->SetPosPixel(Point(nX, nY));
+            if ((nFlags & PosSizeFlags::Size) == PosSizeFlags::Size)
+                mpFloatWin->SetOutputSizePixel({ nWidth, nHeight });
+            if ((nFlags & PosSizeFlags::Pos) == PosSizeFlags::Pos)
+                mpFloatWin->SetPosPixel({ nX, nY });
         }
     }
 
@@ -920,10 +922,10 @@ Point DockingWindow::GetFloatingPos() const
     {
         if ( pWrapper->mpFloatWin )
         {
-            WindowStateData aData;
-            aData.SetMask( WindowStateMask::Pos );
-            pWrapper->mpFloatWin->GetWindowStateData( aData );
-            Point aPos( aData.GetX(), aData.GetY() );
+            vcl::WindowData aData;
+            aData.setMask(vcl::WindowDataMask::Pos);
+            pWrapper->mpFloatWin->GetWindowState( aData );
+            Point aPos(aData.x(), aData.y());
             // LOK needs logic coordinates not absolute screen position for 
autofilter menu
             if (!comphelper::LibreOfficeKit::isActive() || get_id() != 
"check_list_menu")
                 aPos = 
pWrapper->mpFloatWin->GetParent()->ImplGetFrameWindow()->AbsoluteScreenToOutputPixel(
 aPos );
@@ -935,10 +937,10 @@ Point DockingWindow::GetFloatingPos() const
 
     if ( mpFloatWin )
     {
-        WindowStateData aData;
-        aData.SetMask( WindowStateMask::Pos );
-        mpFloatWin->GetWindowStateData( aData );
-        Point aPos( aData.GetX(), aData.GetY() );
+        vcl::WindowData aData;
+        aData.setMask(vcl::WindowDataMask::Pos);
+        mpFloatWin->GetWindowState( aData );
+        Point aPos(aData.x(), aData.y());
         aPos = 
mpFloatWin->GetParent()->ImplGetFrameWindow()->AbsoluteScreenToOutputPixel( 
aPos );
         return aPos;
     }
diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx
index 4b94b70bc11c..4b4623e8761a 100644
--- a/vcl/source/window/event.cxx
+++ b/vcl/source/window/event.cxx
@@ -546,11 +546,11 @@ void Window::ImplCallMove()
         }
 
         SalFrameGeometry g = mpWindowImpl->mpFrame->GetGeometry();
-        mpWindowImpl->maPos = Point( g.nX, g.nY );
+        mpWindowImpl->maPos = Point(g.x(), g.y());
         if( pParentFrame )
         {
             g = pParentFrame->GetGeometry();
-            mpWindowImpl->maPos -= Point( g.nX, g.nY );
+            mpWindowImpl->maPos -= Point(g.x(), g.y());
         }
         // the client window and all its subclients have the same position as 
the borderframe
         // this is important for floating toolbars where the borderwindow is a 
floating window
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 89bd5672088b..5fb4c2ca81df 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -1559,7 +1559,7 @@ Size Menu::ImplCalcSize( vcl::Window* pWin )
         // except on rather small screens
         // TODO: move GetScreenNumber from SystemWindow to Window ?
         // currently we rely on internal privileges
-        unsigned int nDisplayScreen = 
pWin->ImplGetWindowImpl()->mpFrame->maGeometry.nDisplayScreenNumber;
+        unsigned int nDisplayScreen = 
pWin->ImplGetWindowImpl()->mpFrame->maGeometry.screen();
         tools::Rectangle aDispRect( Application::GetScreenPosSizePixel( 
nDisplayScreen ) );
         tools::Long nScreenWidth = aDispRect.GetWidth() >= 800 ? 
aDispRect.GetWidth() : 800;
         if( nMaxWidth > nScreenWidth/2 )
diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx
index 9944541fb91e..b2b3cf67a46d 100644
--- a/vcl/source/window/printdlg.cxx
+++ b/vcl/source/window/printdlg.cxx
@@ -769,7 +769,7 @@ void PrintDialog::storeToSettings()
 
     pItem->setValue( "PrintDialog",
                      "WindowState",
-                     
OStringToOUString(m_xDialog->get_window_state(WindowStateMask::All), 
RTL_TEXTENCODING_UTF8) );
+                     
OStringToOUString(m_xDialog->get_window_state(vcl::WindowDataMask::All), 
RTL_TEXTENCODING_UTF8) );
 
     pItem->setValue( "PrintDialog",
                      "CopyCount",
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index 40fff00aa7d9..fa053499d623 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -399,156 +399,157 @@ const Size& SystemWindow::GetMaxOutputSizePixel() const
     return mpImplData->maMaxOutSize;
 }
 
-void ImplWindowStateFromStr(WindowStateData& rData, std::string_view rStr)
+void ImplWindowStateFromStr(vcl::WindowData& rData, std::string_view rStr)
 {
-    WindowStateMask nValidMask = WindowStateMask::NONE;
+    vcl::WindowDataMask nValidMask = vcl::WindowDataMask::NONE;
     sal_Int32 nIndex      = 0;
 
     std::string_view aTokenStr = o3tl::getToken(rStr, 0, ',', nIndex);
     if (!aTokenStr.empty())
     {
-        rData.SetX(o3tl::toInt32(aTokenStr));
-        if( rData.GetX() > -16384 && rData.GetX() < 16384 )
-            nValidMask |= WindowStateMask::X;
+        rData.setX(o3tl::toInt32(aTokenStr));
+        if (rData.x() > -16384 && rData.x() < 16384)
+            nValidMask |= vcl::WindowDataMask::X;
         else
-            rData.SetX( 0 );
+            rData.setX(0);
     }
     else
-        rData.SetX( 0 );
+        rData.setX(0);
     aTokenStr = o3tl::getToken(rStr, 0, ',', nIndex);
     if (!aTokenStr.empty())
     {
-        rData.SetY(o3tl::toInt32(aTokenStr));
-        if( rData.GetY() > -16384 && rData.GetY() < 16384 )
-            nValidMask |= WindowStateMask::Y;
+        rData.setY(o3tl::toInt32(aTokenStr));
+        if (rData.y() > -16384 && rData.y() < 16384)
+            nValidMask |= vcl::WindowDataMask::Y;
         else
-            rData.SetY( 0 );
+            rData.setY(0);
     }
     else
-        rData.SetY( 0 );
+        rData.setY(0);
     aTokenStr = o3tl::getToken(rStr, 0, ',', nIndex);
     if (!aTokenStr.empty())
     {
-        rData.SetWidth(o3tl::toInt32(aTokenStr));
-        if( rData.GetWidth() > 0 && rData.GetWidth() < 16384 )
-            nValidMask |= WindowStateMask::Width;
+        rData.setWidth(o3tl::toInt32(aTokenStr));
+        if (rData.width() > 0 && rData.width() < 16384)
+            nValidMask |= vcl::WindowDataMask::Width;
         else
-            rData.SetWidth( 0 );
+            rData.setWidth(0);
     }
     else
-        rData.SetWidth( 0 );
+        rData.setWidth(0);
     aTokenStr = o3tl::getToken(rStr, 0, ';', nIndex);
     if (!aTokenStr.empty())
     {
-        rData.SetHeight(o3tl::toInt32(aTokenStr));
-        if( rData.GetHeight() > 0 && rData.GetHeight() < 16384 )
-            nValidMask |= WindowStateMask::Height;
+        rData.setHeight(o3tl::toInt32(aTokenStr));
+        if (rData.height() > 0 && rData.height() < 16384)
+            nValidMask |= vcl::WindowDataMask::Height;
         else
-            rData.SetHeight( 0 );
+            rData.setHeight(0);
     }
     else
-        rData.SetHeight( 0 );
+        rData.setHeight(0);
     aTokenStr = o3tl::getToken(rStr, 0, ';', nIndex);
     if (!aTokenStr.empty())
     {

... etc. - the rest is truncated

Reply via email to