[Libreoffice-commits] core.git: sw/source
Mike Kaganski (via logerrit)
logerrit at kemper.freedesktop.org
Sun Sep 22 20:14:23 UTC 2019
sw/source/core/doc/docfmt.cxx | 18 ++++--------------
1 file changed, 4 insertions(+), 14 deletions(-)
New commits:
commit 438d7ee30809478d9bc790fedbf90b4b76cfeab8
Author: Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Sun Sep 22 21:30:16 2019 +0200
Commit: Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Sun Sep 22 22:13:36 2019 +0200
Simplify item set creation
Change-Id: I9ed4e3e2dcd36851f6f5263b55dc40324d31243a
Reviewed-on: https://gerrit.libreoffice.org/79357
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
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 )
More information about the Libreoffice-commits
mailing list