use more constexpr
Change-Id: Ifc319bdc9ed0cf095a99f6ea7cac068f52bc31b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187748 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
@@ -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 },
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
using namespace ::com::sun::star::i18n;
|
||||
|
||||
//Definition of math keywords
|
||||
const SmTokenTableEntry aTokenTable[]
|
||||
constexpr SmTokenTableEntry aTokenTable[]
|
||||
= { { u"abs"_ustr, TABS, '\0', TG::UnOper, 13 },
|
||||
{ u"acute"_ustr, TACUTE, MS_ACUTE, TG::Attribute, 5 },
|
||||
{ u"aleph"_ustr, TALEPH, MS_ALEPH, TG::Standalone, 5 },
|
||||
|
||||
@@ -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 }
|
||||
};
|
||||
|
||||
@@ -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 }
|
||||
};
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -3433,7 +3433,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 ) },
|
||||
|
||||
@@ -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},
|
||||
|
||||
Reference in New Issue
Block a user