From a942eb487857bd5312fc735c8a82ff88da78ec68 Mon Sep 17 00:00:00 2001 From: Jan Luethi Date: Wed, 23 Sep 2026 20:58:46 +0200 Subject: [PATCH] tdf#145614 Convert #define to constexpr Change-Id: I156a1a231cab8277462eddbc044f4b3378f73448 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211386 Reviewed-by: Hossein Tested-by: Jenkins --- basic/source/runtime/ddectrl.cxx | 4 ++-- sw/source/uibase/dbui/mmconfigitem.cxx | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/basic/source/runtime/ddectrl.cxx b/basic/source/runtime/ddectrl.cxx index 41e5c53d84de..b0bc4fd0064d 100644 --- a/basic/source/runtime/ddectrl.cxx +++ b/basic/source/runtime/ddectrl.cxx @@ -22,8 +22,8 @@ #include "ddectrl.hxx" #include -#define DDE_FIRSTERR 0x4000 -#define DDE_LASTERR 0x4011 +constexpr tools::Long DDE_FIRSTERR = 0x4000; +constexpr tools::Long DDE_LASTERR = 0x4011; const ErrCode nDdeErrMap[] = { diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx index 201933bad7ab..efb980f59663 100644 --- a/sw/source/uibase/dbui/mmconfigitem.cxx +++ b/sw/source/uibase/dbui/mmconfigitem.cxx @@ -62,12 +62,12 @@ const char cDataSourceName[] = "DataSource/DataSourceName"; const char cDataTableName[] = "DataSource/DataTableName" ; const char cDataCommandType[] = "DataSource/DataCommandType"; -#define SECURE_PORT 587 -#define DEFAULT_PORT 25 -#define POP_PORT 110 -#define POP_SECURE_PORT 995 -#define IMAP_PORT 143 -#define IMAP_SECURE_PORT 993 +constexpr sal_Int16 SECURE_PORT = 587; +constexpr sal_Int16 DEFAULT_PORT = 25; +constexpr sal_Int16 POP_PORT = 110; +constexpr sal_Int16 POP_SECURE_PORT = 995; +constexpr sal_Int16 IMAP_PORT = 143; +constexpr sal_Int16 IMAP_SECURE_PORT = 993; namespace {