cui/source/options/optgenrl.cxx                             |    4 ++--
 scripting/source/vbaevents/eventhelper.cxx                  |    4 ++--
 starmath/source/parse5.cxx                                  |    2 +-
 svx/source/toolbars/extrusionbar.cxx                        |    2 +-
 svx/source/toolbars/fontworkbar.cxx                         |    2 +-
 svx/source/unodraw/unoshap2.cxx                             |    2 +-
 sw/source/filter/ww8/docxattributeoutput.cxx                |    2 +-
 sw/source/writerfilter/dmapper/DomainMapperTableHandler.cxx |    2 +-
 8 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 737e37d5175ae431c09884cdbc0c25cbd6de492a
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Fri Jul 11 12:40:34 2025 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Wed Jul 16 11:04:51 2025 +0200

    use more constexpr
    
    Change-Id: Ifc319bdc9ed0cf095a99f6ea7cac068f52bc31b1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187748
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187893
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx
index acecb3de9a3a..015ecf63181b 100644
--- a/cui/source/options/optgenrl.cxx
+++ b/cui/source/options/optgenrl.cxx
@@ -91,7 +91,7 @@ struct
     // which language is this row for?
     unsigned nLangFlags;
 }
-const vRowInfo[] =
+constexpr vRowInfo[] =
 {
     { u"lockcompanyft"_ustr,  u"companyft"_ustr,   Lang::All },
     { u"locknameft"_ustr,     u"nameft"_ustr,      Lang::All & ~Lang::Russian 
& ~Lang::Eastern },
@@ -122,7 +122,7 @@ struct
     // id for settings the focus (defined in svx/optgenrl.hxx)
     EditPosition nGrabFocusId;
 }
-const vFieldInfo[] =
+constexpr vFieldInfo[] =
 {
     // Company
     { Row_Company, u"company"_ustr, UserOptToken::Company, 
EditPosition::COMPANY },
diff --git a/scripting/source/vbaevents/eventhelper.cxx 
b/scripting/source/vbaevents/eventhelper.cxx
index 7c02c658a134..a5cfedf5bd98 100644
--- a/scripting/source/vbaevents/eventhelper.cxx
+++ b/scripting/source/vbaevents/eventhelper.cxx
@@ -200,7 +200,7 @@ TypeList const comboBoxList = {&typeXComboBox, 1};
 TypeList const listBoxList = {&typeXListBox, 1};
 
 //this array stores the OO event to VBA event translation info
-static TranslatePropMap aTranslatePropMap_Impl[] =
+constexpr TranslatePropMap aTranslatePropMap_Impl[] =
 {
     { u"actionPerformed"_ustr, { u"_Change"_ustr, nullptr, DenyType, 
static_cast<void const *>(&radioButtonList) } },
     // actionPerformed ooo event
@@ -253,7 +253,7 @@ static EventInfoHash& getEventTransInfo()
     {
         EventInfoHash tmp;
         OUString sEventInfo;
-        TranslatePropMap* pTransProp = aTranslatePropMap_Impl;
+        const TranslatePropMap* pTransProp = aTranslatePropMap_Impl;
         int nCount = SAL_N_ELEMENTS(aTranslatePropMap_Impl);
 
         int i = 0;
diff --git a/starmath/source/parse5.cxx b/starmath/source/parse5.cxx
index 5c18d9e32e5e..f4891407497d 100644
--- a/starmath/source/parse5.cxx
+++ b/starmath/source/parse5.cxx
@@ -39,7 +39,7 @@
 using namespace ::com::sun::star::i18n;
 
 //Definition of math keywords
-const SmTokenTableEntry aTokenTable[]
+constexpr SmTokenTableEntry aTokenTable[]
     = { { u"abs"_ustr, TABS, '
         { u"acute"_ustr, TACUTE, MS_ACUTE, TG::Attribute, 5 },
         { u"aleph"_ustr, TALEPH, MS_ALEPH, TG::Standalone, 5 },
diff --git a/svx/source/toolbars/extrusionbar.cxx 
b/svx/source/toolbars/extrusionbar.cxx
index c4832775a5a7..dfd8c4a72780 100644
--- a/svx/source/toolbars/extrusionbar.cxx
+++ b/svx/source/toolbars/extrusionbar.cxx
@@ -53,7 +53,7 @@ using namespace ::com::sun::star::uno;
 
 // Declare the default interface. (The slotmap must not be empty, so
 // we enter something which never occurs here (hopefully).)
-static SfxSlot aExtrusionBarSlots_Impl[] =
+constexpr SfxSlot aExtrusionBarSlots_Impl[] =
 {
     { 0, SfxGroupId::NONE, SfxSlotMode::NONE, 0, 0, nullptr, nullptr, nullptr, 
nullptr, nullptr, 0, SfxDisableFlags::NONE, u""_ustr }
 };
diff --git a/svx/source/toolbars/fontworkbar.cxx 
b/svx/source/toolbars/fontworkbar.cxx
index f30b43d66250..740f93c278f5 100644
--- a/svx/source/toolbars/fontworkbar.cxx
+++ b/svx/source/toolbars/fontworkbar.cxx
@@ -175,7 +175,7 @@ static void SetFontWorkShapeTypeState( SdrView const * 
pSdrView, SfxItemSet& rSe
 
 // Declare the default interface. (The slotmap must not be empty, so
 // we enter something which never occurs here (hopefully).)
-static SfxSlot aFontworkBarSlots_Impl[] =
+constexpr SfxSlot aFontworkBarSlots_Impl[] =
 {
     { 0, SfxGroupId::NONE, SfxSlotMode::NONE, 0, 0, nullptr, nullptr, nullptr, 
nullptr, nullptr, 0, SfxDisableFlags::NONE, u""_ustr }
 };
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index 668a76c05b52..d1a8c86d0f6c 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -571,7 +571,7 @@ struct
     OUString msAPIName;
     OUString msFormName;
 }
-const SvxShapeControlPropertyMapping[] =
+constexpr SvxShapeControlPropertyMapping[] =
 {
     // Warning: The first entry must be FontSlant because the any needs to be 
converted
     { UNO_NAME_EDIT_CHAR_POSTURE, u"FontSlant"_ustr  }, //  const sal_Int16 => 
css::awt::FontSlant
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 77023858b809..891ebdd4579d 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -3436,7 +3436,7 @@ struct NameToId
     sal_Int32 maId;
 };
 
-const NameToId constNameToIdMapping[] =
+constexpr NameToId constNameToIdMapping[] =
 {
     { u"glow"_ustr,         FSNS( XML_w14, XML_glow ) },
     { u"shadow"_ustr,       FSNS( XML_w14, XML_shadow ) },
diff --git a/sw/source/writerfilter/dmapper/DomainMapperTableHandler.cxx 
b/sw/source/writerfilter/dmapper/DomainMapperTableHandler.cxx
index 74c25f9ad9ea..0fe0ef1aef84 100644
--- a/sw/source/writerfilter/dmapper/DomainMapperTableHandler.cxx
+++ b/sw/source/writerfilter/dmapper/DomainMapperTableHandler.cxx
@@ -1293,7 +1293,7 @@ static void lcl_convertFormulaRanges(const 
rtl::Reference<SwXTextTable> & xTable
                             sal_Int16 m_nCol;
                             sal_Int16 m_nRow;
                         };
-                        static const RangeDirection pDirections[] =
+                        static constexpr RangeDirection pDirections[] =
                         {
                             { u" LEFT "_ustr, -1, 0},
                             { u" RIGHT "_ustr, 1, 0},

Reply via email to