summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-09-22 21:30:16 +0200
committerMike Kaganski <mike.kaganski@collabora.com>2019-09-22 22:13:36 +0200
commit438d7ee30809478d9bc790fedbf90b4b76cfeab8 (patch)
tree5caa72cbc285e954632286d70cd9d9cdc11b0280 /sw
parenta8fde93e351c47df8d275a67056a65eb51c43663 (diff)
Simplify item set creation
Change-Id: I9ed4e3e2dcd36851f6f5263b55dc40324d31243a Reviewed-on: https://gerrit.libreoffice.org/79357 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/docfmt.cxx18
1 files changed, 4 insertions, 14 deletions
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index be514788ec6a..12d1cad9563e 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -333,20 +333,10 @@ void SwDoc::ResetAttrs( const SwPaM &rRg,
pStt, pEnd, pHst, nullptr, pLayout);
// mst: not including META here; it seems attrs with CH_TXTATR are omitted
- sal_uInt16 const aResetableSetRange[] {
- RES_FRMATR_BEGIN, RES_FRMATR_END-1,
- RES_CHRATR_BEGIN, RES_CHRATR_END-1,
- RES_PARATR_BEGIN, RES_PARATR_END-1,
- RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1,
- RES_TXTATR_INETFMT, RES_TXTATR_INETFMT,
- RES_TXTATR_CHARFMT, RES_TXTATR_CHARFMT,
- RES_TXTATR_CJK_RUBY, RES_TXTATR_CJK_RUBY,
- RES_TXTATR_UNKNOWN_CONTAINER, RES_TXTATR_UNKNOWN_CONTAINER,
- RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END-1,
- 0
- };
-
- SfxItemSet aDelSet( GetAttrPool(), aResetableSetRange );
+ SfxItemSet aDelSet(GetAttrPool(), svl::Items<RES_CHRATR_BEGIN, RES_CHRATR_END - 1,
+ RES_TXTATR_INETFMT, RES_TXTATR_UNKNOWN_CONTAINER,
+ RES_PARATR_BEGIN, RES_FRMATR_END - 1,
+ RES_UNKNOWNATR_BEGIN, RES_UNKNOWNATR_END - 1>{});
if( !rAttrs.empty() )
{
for( std::set<sal_uInt16>::const_reverse_iterator it = rAttrs.rbegin(); it != rAttrs.rend(); ++it )