diff options
author | John Zhang <mywtfmp3@gmail.com> | 2019-09-23 14:57:59 +0800 |
---|---|---|
committer | Michael Stahl <michael.stahl@cib.de> | 2019-10-10 11:13:33 +0200 |
commit | 31adc5ef8f9b8f3a69b95037dcbabc691aa4f373 (patch) | |
tree | 081e7088b4c8eae331ee99431d111a26ae14d775 /sw/source | |
parent | 88ddeed17d5a7caca407f892a094a3dcb0aff501 (diff) |
remove redundant empty check
Change-Id: I5ea0410e9cba2e78ecb9aa2bbeeb6b307a522ae5
Reviewed-on: https://gerrit.libreoffice.org/79373
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/doc/docfmt.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 83ba56a91948..f2e9b105e355 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -333,16 +333,13 @@ void SwDoc::ResetAttrs( const SwPaM &rRg, 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 ) { - for( std::set<sal_uInt16>::const_reverse_iterator it = rAttrs.rbegin(); it != rAttrs.rend(); ++it ) - { - if( POOLATTR_END > *it ) - aDelSet.Put( *GetDfltAttr( *it )); - } - if( aDelSet.Count() ) - aPara.pDelSet = &aDelSet; + if( POOLATTR_END > *it ) + aDelSet.Put( *GetDfltAttr( *it )); } + if( aDelSet.Count() ) + aPara.pDelSet = &aDelSet; bool bAdd = true; SwNodeIndex aTmpStt( pStt->nNode ); |