toolkit/source/controls/geometrycontrolmodel.cxx |   25 +++++++++++++----------
 1 file changed, 15 insertions(+), 10 deletions(-)

New commits:
commit db3b31c433320d15bc5f1961d026ef056cd8842c
Author:     RMZeroFour <ritobrot...@gmail.com>
AuthorDate: Sun Mar 17 17:11:00 2024 +0530
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Mon Mar 18 09:52:28 2024 +0100

    tdf#145614 Convert GCM_PROPERTY_ID #defines to enum
    
    As part of the efforts in #145614 to replace older parts of the
    codebase using #defined constants with enums, this turns the
    GCM_PROPERTY_ID_* values into an unscoped enum.
    
    Change-Id: Iafb9960b87fcd12f6596578866856fabed8ecd04
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164942
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/toolkit/source/controls/geometrycontrolmodel.cxx 
b/toolkit/source/controls/geometrycontrolmodel.cxx
index c76657d9fbe6..b5fb16cfe5d7 100644
--- a/toolkit/source/controls/geometrycontrolmodel.cxx
+++ b/toolkit/source/controls/geometrycontrolmodel.cxx
@@ -28,16 +28,21 @@
 #include <functional>
 #include <utility>
 
-
-#define GCM_PROPERTY_ID_POS_X               1
-#define GCM_PROPERTY_ID_POS_Y               2
-#define GCM_PROPERTY_ID_WIDTH               3
-#define GCM_PROPERTY_ID_HEIGHT              4
-#define GCM_PROPERTY_ID_NAME                5
-#define GCM_PROPERTY_ID_TABINDEX            6
-#define GCM_PROPERTY_ID_STEP                7
-#define GCM_PROPERTY_ID_TAG                 8
-#define GCM_PROPERTY_ID_RESOURCERESOLVER    9
+namespace
+{
+    enum GcmPropertyId : sal_Int32
+    {
+        GCM_PROPERTY_ID_POS_X            = 1,
+        GCM_PROPERTY_ID_POS_Y            = 2,
+        GCM_PROPERTY_ID_WIDTH            = 3,
+        GCM_PROPERTY_ID_HEIGHT           = 4,
+        GCM_PROPERTY_ID_NAME             = 5,
+        GCM_PROPERTY_ID_TABINDEX         = 6,
+        GCM_PROPERTY_ID_STEP             = 7,
+        GCM_PROPERTY_ID_TAG              = 8,
+        GCM_PROPERTY_ID_RESOURCERESOLVER = 9
+    };
+}
 
 constexpr OUStringLiteral GCM_PROPERTY_POS_X = u"PositionX";
 constexpr OUStringLiteral GCM_PROPERTY_POS_Y = u"PositionY";

Reply via email to