vcl/source/control/calendar.cxx |   30 ++++++++++++++++--------------
 1 file changed, 16 insertions(+), 14 deletions(-)

New commits:
commit 924c559c7df097be3d86fb415209b061ef709eaa
Author:     Christopher Sherlock <chris.sherloc...@gmail.com>
AuthorDate: Mon Apr 14 04:28:12 2025 +1000
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Wed Sep 17 23:04:37 2025 +0200

    vcl: convert define statements to constexpr variables
    
    Change-Id: Ic56e4dbc933117aadb73b558b0e236322b4a7106
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174730
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/vcl/source/control/calendar.cxx b/vcl/source/control/calendar.cxx
index 6d4f2cfd29f8..c85d8de7f66a 100644
--- a/vcl/source/control/calendar.cxx
+++ b/vcl/source/control/calendar.cxx
@@ -34,20 +34,22 @@
 #include <strings.hrc>
 #include <memory>
 
-#define DAY_OFFX                        4
-#define DAY_OFFY                        2
-#define MONTH_BORDERX                   4
-#define MONTH_OFFY                      3
-#define WEEKDAY_OFFY                    3
-#define TITLE_OFFY                      3
-#define TITLE_BORDERY                   2
-#define SPIN_OFFX                       4
-#define SPIN_OFFY                       TITLE_BORDERY
-#define CALENDAR_HITTEST_DAY            (sal_uInt16(0x0001))
-#define CALENDAR_HITTEST_MONTHTITLE     (sal_uInt16(0x0004))
-#define CALENDAR_HITTEST_PREV           (sal_uInt16(0x0008))
-#define CALENDAR_HITTEST_NEXT           (sal_uInt16(0x0010))
-#define MENU_YEAR_COUNT                 3
+constexpr tools::Long DAY_OFFX = 4;
+constexpr tools::Long DAY_OFFY = 2;
+constexpr tools::Long MONTH_BORDERX = 4;
+constexpr tools::Long MONTH_OFFY = 3;
+constexpr tools::Long WEEKDAY_OFFY = 3;
+constexpr tools::Long TITLE_OFFY = 3;
+constexpr tools::Long TITLE_BORDERY = 2;
+constexpr tools::Long SPIN_OFFX = 4;
+constexpr tools::Long SPIN_OFFY = TITLE_BORDERY;
+
+constexpr sal_uInt16 CALENDAR_HITTEST_DAY = 0x0001;
+constexpr sal_uInt16 CALENDAR_HITTEST_MONTHTITLE = 0x0004;
+constexpr sal_uInt16 CALENDAR_HITTEST_PREV  = 0x0008;
+constexpr sal_uInt16 CALENDAR_HITTEST_NEXT = 0x0010;
+
+constexpr sal_uInt16 MENU_YEAR_COUNT = 3;
 
 using namespace ::com::sun::star;
 

Reply via email to