diff options
Diffstat (limited to 'editeng/source/accessibility')
-rw-r--r-- | editeng/source/accessibility/AccessibleEditableTextPara.cxx | 62 |
1 files changed, 25 insertions, 37 deletions
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx index 709a229f0932..0faf064416b7 100644 --- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx +++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx @@ -831,43 +831,31 @@ namespace accessibility static uno::Sequence< OUString > const & getAttributeNames() { - static uno::Sequence< OUString >* pNames = nullptr; - - if( pNames == nullptr ) - { - uno::Sequence< OUString >* pSeq = new uno::Sequence< OUString >( 21 ); - OUString* pStrings = pSeq->getArray(); - sal_Int32 i = 0; - #define STR(x) pStrings[i++] = x - STR("CharColor"); - STR("CharContoured"); - STR("CharEmphasis"); - STR("CharEscapement"); - STR("CharFontName"); - STR("CharHeight"); - STR("CharPosture"); - STR("CharShadowed"); - STR("CharStrikeout"); - STR("CharCaseMap"); - STR("CharUnderline"); - STR("CharUnderlineColor"); - STR("CharWeight"); - STR("NumberingLevel"); - STR("NumberingRules"); - STR("ParaAdjust"); - STR("ParaBottomMargin"); - STR("ParaFirstLineIndent"); - STR("ParaLeftMargin"); - STR("ParaLineSpacing"); - STR("ParaRightMargin"); - STR("ParaTabStops"); - #undef STR - DBG_ASSERT( i == pSeq->getLength(), "Please adjust length" ); - if( i != pSeq->getLength() ) - pSeq->realloc( i ); - pNames = pSeq; - } - return *pNames; + static const uno::Sequence<OUString> aNames{ + "CharColor", + "CharContoured", + "CharEmphasis", + "CharEscapement", + "CharFontName", + "CharHeight", + "CharPosture", + "CharShadowed", + "CharStrikeout", + "CharCaseMap", + "CharUnderline", + "CharUnderlineColor", + "CharWeight", + "NumberingLevel", + "NumberingRules", + "ParaAdjust", + "ParaBottomMargin", + "ParaFirstLineIndent", + "ParaLeftMargin", + "ParaLineSpacing", + "ParaRightMargin", + "ParaTabStops"}; + + return aNames; } struct IndexCompare |