sc/inc/globalnames.hxx               |   12 ++++++------
 sc/source/core/tool/formulagroup.cxx |    2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit c380a45b5c6bbc1a3a22ccbb73f270d40e454200
Author:     Tomaž Vajngerl <[email protected]>
AuthorDate: Wed Oct 8 18:41:14 2025 +0900
Commit:     Tomaž Vajngerl <[email protected]>
CommitDate: Wed Oct 8 15:39:07 2025 +0200

    sc: convert defines to constexpr values in globalnames.hxx
    
    Change-Id: I3efc8c7c3ccf9fac68a9495cccedbb21a20018ca
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192066
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <[email protected]>

diff --git a/sc/inc/globalnames.hxx b/sc/inc/globalnames.hxx
index d336e254958c..9b9afabc5229 100644
--- a/sc/inc/globalnames.hxx
+++ b/sc/inc/globalnames.hxx
@@ -11,17 +11,17 @@
 
 #include <rtl/ustring.hxx>
 
-inline constexpr OUString STR_DB_LOCAL_NONAME = u"__Anonymous_Sheet_DB__"_ustr;
-inline constexpr OUString STR_DB_GLOBAL_NONAME = u"__Anonymous_DB__"_ustr;
+constexpr OUString STR_DB_LOCAL_NONAME = u"__Anonymous_Sheet_DB__"_ustr;
+constexpr OUString STR_DB_GLOBAL_NONAME = u"__Anonymous_DB__"_ustr;
 
-inline constexpr OUString STR_GLOBAL_RANGE_NAME = 
u"__Global_Range_Name__"_ustr;
+constexpr OUString STR_GLOBAL_RANGE_NAME = u"__Global_Range_Name__"_ustr;
 
-#define TEXTWIDTH_DIRTY 0xffff
+constexpr sal_uInt32 TEXTWIDTH_DIRTY = 0xffff;
 
-#define DATE_TIME_FACTOR 86400.0
+constexpr double DATE_TIME_FACTOR = 86400.0;
 
 // Device name used to represent the software group interpreter for OpenCL
 // mode. This string gets stored in use configuration as the device name.
-#define OPENCL_SOFTWARE_DEVICE_CONFIG_NAME "Software"
+constexpr std::u16string_view OPENCL_SOFTWARE_DEVICE_CONFIG_NAME(u"Software");
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/formulagroup.cxx 
b/sc/source/core/tool/formulagroup.cxx
index 7b1965c2eb79..b17b2aa1aebd 100644
--- a/sc/source/core/tool/formulagroup.cxx
+++ b/sc/source/core/tool/formulagroup.cxx
@@ -181,7 +181,7 @@ void 
FormulaGroupInterpreter::fillOpenCLInfo(std::vector<OpenCLPlatformInfo>& rP
 bool FormulaGroupInterpreter::switchOpenCLDevice(std::u16string_view 
rDeviceId, bool bAutoSelect, bool bForceEvaluation)
 {
     bool bOpenCLEnabled = ScCalcConfig::isOpenCLEnabled();
-    if (!bOpenCLEnabled || (rDeviceId == u"" 
OPENCL_SOFTWARE_DEVICE_CONFIG_NAME))
+    if (!bOpenCLEnabled || (rDeviceId == OPENCL_SOFTWARE_DEVICE_CONFIG_NAME))
     {
         delete msInstance;
         msInstance = nullptr;

Reply via email to