From 2baf13e903164e92af6c87346e368043bbd09b28 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 24 Feb 2022 13:24:04 +0200 Subject: use more TypedWhichId Change-Id: I6ab3ca829bc08e672736dd8dd41ba714d7172090 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130498 Tested-by: Jenkins Reviewed-by: Noel Grandin --- editeng/source/rtf/svxrtf.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'editeng/source/rtf') diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx index 0822b3522817..f60c14cdbafa 100644 --- a/editeng/source/rtf/svxrtf.cxx +++ b/editeng/source/rtf/svxrtf.cxx @@ -899,7 +899,7 @@ void SvxRTFParser::BuildWhichTable() // Here are the IDs for all paragraph attributes, which can be detected by // SvxParser and can be set in a SfxItemSet. The IDs are set correctly through // the SlotIds from POOL. - for (sal_uInt16 nWid : { + static constexpr sal_uInt16 WIDS1[] { SID_ATTR_PARA_LINESPACE, SID_ATTR_PARA_ADJUST, SID_ATTR_TABSTOP, @@ -917,7 +917,8 @@ void SvxRTFParser::BuildWhichTable() SID_ATTR_PARA_HANGPUNCTUATION, SID_ATTR_PARA_FORBIDDEN_RULES, SID_ATTR_FRAMEDIRECTION, - }) + }; + for (sal_uInt16 nWid : WIDS1) { sal_uInt16 nTrueWid = pAttrPool->GetTrueWhich(nWid, false); aPardMap[nWid] = nTrueWid; @@ -929,7 +930,7 @@ void SvxRTFParser::BuildWhichTable() // Here are the IDs for all character attributes, which can be detected by // SvxParser and can be set in a SfxItemSet. The IDs are set correctly through // the SlotIds from POOL. - constexpr sal_uInt16 WIDS[] { + static constexpr sal_uInt16 WIDS[] { SID_ATTR_CHAR_CASEMAP, SID_ATTR_BRUSH_CHAR, SID_ATTR_CHAR_COLOR, SID_ATTR_CHAR_CONTOUR, SID_ATTR_CHAR_STRIKEOUT, SID_ATTR_CHAR_ESCAPEMENT, SID_ATTR_CHAR_FONT, SID_ATTR_CHAR_FONTHEIGHT, SID_ATTR_CHAR_KERNING, -- cgit