dbaccess/source/ui/misc/dsmeta.cxx                |    2 +-
 linguistic/source/lngopt.cxx                      |    2 +-
 sc/source/ui/unoobj/servuno.cxx                   |    4 ++--
 sd/source/ui/controller/displaymodecontroller.cxx |    4 ++--
 sfx2/source/appl/appuno.cxx                       |    2 +-
 svl/source/misc/inettype.cxx                      |    2 +-
 sw/source/core/unocore/unocoll.cxx                |    2 +-
 unotools/source/misc/fontcvt.cxx                  |    2 +-
 8 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 5d5d63d8f52e82810124d7367d370100cd160c4e
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Fri Jul 25 11:46:22 2025 +0200
Commit:     Noel Grandin <noelgran...@gmail.com>
CommitDate: Mon Jul 28 15:36:46 2025 +0200

    use constexpr on various
    
    otherwise gcc will put this into the read/write section
    of the object file.
    
    Change-Id: I142eb7b3cbe1c50aa8274c7983f9773d148a5b09
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188329
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>
    (cherry picked from commit da2ad54565715b18b725d284fc9ca34e11e036ea)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188473
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/dbaccess/source/ui/misc/dsmeta.cxx 
b/dbaccess/source/ui/misc/dsmeta.cxx
index c25fb8eda16a..b2f207b0b04a 100644
--- a/dbaccess/source/ui/misc/dsmeta.cxx
+++ b/dbaccess/source/ui/misc/dsmeta.cxx
@@ -57,7 +57,7 @@ namespace dbaui
     };
 
     // global tables
-    const FeatureMapping s_aMappings[] = {
+    constexpr FeatureMapping s_aMappings[] = {
         { DSID_AUTORETRIEVEENABLED,     u"GeneratedValues"_ustr },
         { DSID_AUTOINCREMENTVALUE,      u"GeneratedValues"_ustr },
         { DSID_AUTORETRIEVEVALUE,       u"GeneratedValues"_ustr },
diff --git a/linguistic/source/lngopt.cxx b/linguistic/source/lngopt.cxx
index 6f70aae74724..3c845b2b9d3d 100644
--- a/linguistic/source/lngopt.cxx
+++ b/linguistic/source/lngopt.cxx
@@ -89,7 +89,7 @@ struct WID_Name
 
 //! order of entries is import (see LinguOptions::GetName)
 //! since the WID is used as index in this table!
-WID_Name const aWID_Name[] =
+constexpr WID_Name aWID_Name[] =
 {
     { 0,                                  u""_ustr },
     { UPH_IS_USE_DICTIONARY_LIST,         UPN_IS_USE_DICTIONARY_LIST },
diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx
index 0671da468022..d06af2e78b5d 100644
--- a/sc/source/ui/unoobj/servuno.cxx
+++ b/sc/source/ui/unoobj/servuno.cxx
@@ -249,7 +249,7 @@ struct ProvNamesId_Type
     ScServiceProvider::Type nType;
 };
 
-const ProvNamesId_Type aProvNamesId[] =
+constexpr ProvNamesId_Type aProvNamesId[] =
 {
     { u"com.sun.star.sheet.Spreadsheet"_ustr,                 Type::SHEET },
     { u"com.sun.star.text.TextField.URL"_ustr,                Type::URLFIELD },
@@ -322,7 +322,7 @@ const ProvNamesId_Type aProvNamesId[] =
 
 //  old service names that were in 567 still work in createInstance,
 //  in case some macro is still using them
-const ProvNamesId_Type aOldNames[] =
+constexpr ProvNamesId_Type aOldNames[] =
 {
     { u"stardiv.one.text.TextField.URL"_ustr,           Type::URLFIELD },
     { u"stardiv.one.text.TextField.PageNumber"_ustr,    Type::PAGEFIELD },
diff --git a/sd/source/ui/controller/displaymodecontroller.cxx 
b/sd/source/ui/controller/displaymodecontroller.cxx
index 1e50cc90cbcd..ffc8571efb59 100644
--- a/sd/source/ui/controller/displaymodecontroller.cxx
+++ b/sd/source/ui/controller/displaymodecontroller.cxx
@@ -80,7 +80,7 @@ struct snew_slide_value_info
 
 }
 
-const snew_slide_value_info editmodes[] =
+constexpr snew_slide_value_info editmodes[] =
 {
     {1,
         BMP_DISPLAYMODE_SLIDE,
@@ -101,7 +101,7 @@ const snew_slide_value_info editmodes[] =
     {0, u""_ustr, {}, "" }
 };
 
-const snew_slide_value_info mastermodes[] =
+constexpr snew_slide_value_info mastermodes[] =
 {
     {5,
         BMP_DISPLAYMODE_SLIDE_MASTER,
diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx
index 46ca28982fec..e5d4ee14c74e 100644
--- a/sfx2/source/appl/appuno.cxx
+++ b/sfx2/source/appl/appuno.cxx
@@ -59,7 +59,7 @@ using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::io;
 
 // needs to be converted to a better data structure
-SfxFormalArgument const aFormalArgs[] = {
+constexpr SfxFormalArgument aFormalArgs[] = {
     { static_cast<const SfxType*>(&aSfxStringItem_Impl), 
u"SuggestedSaveAsName"_ustr, SID_DEFAULTFILENAME },
     { static_cast<const SfxType*>(&aSfxStringItem_Impl), 
u"SuggestedSaveAsDir"_ustr, SID_DEFAULTFILEPATH },
     { static_cast<const SfxType*>(&aSfxStringItem_Impl), 
u"VersionAuthor"_ustr, SID_DOCINFO_AUTHOR },
diff --git a/svl/source/misc/inettype.cxx b/svl/source/misc/inettype.cxx
index a6a24ef92de8..ac9330a39092 100644
--- a/svl/source/misc/inettype.cxx
+++ b/svl/source/misc/inettype.cxx
@@ -135,7 +135,7 @@ constexpr MediaTypeEntry aStaticTypeNameMap[]
 
 /** A mapping from extensions to type IDs.  Sorted by extension.
  */
-MediaTypeEntry const aStaticExtensionMap[]
+constexpr MediaTypeEntry aStaticExtensionMap[]
     = { { u"aif"_ustr, CONTENT_TYPE_AUDIO_AIFF },
         { u"aiff"_ustr, CONTENT_TYPE_AUDIO_AIFF },
         { u"appt"_ustr, CONTENT_TYPE_APP_CDE_CALENDAR_APP },
diff --git a/sw/source/core/unocore/unocoll.cxx 
b/sw/source/core/unocore/unocoll.cxx
index 54c8416771b6..dc5f75fb0760 100644
--- a/sw/source/core/unocore/unocoll.cxx
+++ b/sw/source/core/unocore/unocoll.cxx
@@ -282,7 +282,7 @@ struct  ProvNamesId_Type
 }
 
 // note: this thing is indexed as an array, so do not insert/remove entries!
-const ProvNamesId_Type aProvNamesId[] =
+constexpr ProvNamesId_Type aProvNamesId[] =
 {
     { "com.sun.star.text.TextTable",                          
SwServiceType::TypeTextTable },
     { "com.sun.star.text.TextFrame",                          
SwServiceType::TypeTextFrame },
diff --git a/unotools/source/misc/fontcvt.cxx b/unotools/source/misc/fontcvt.cxx
index df15d9fcdc6e..e6f3648be3e3 100644
--- a/unotools/source/misc/fontcvt.cxx
+++ b/unotools/source/misc/fontcvt.cxx
@@ -1304,7 +1304,7 @@ struct RecodeTable { const char* pOrgName; ConvertChar 
aCvt;};
 
 }
 
-const RecodeTable aStarSymbolRecodeTable[] =
+constexpr RecodeTable aStarSymbolRecodeTable[] =
 {
     // the first two entries must be StarMath and StarBats; do not reorder!
     // reason: see CreateFontToSubsFontConverter method

Reply via email to