diff options
author | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-11-30 14:27:56 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-11-30 18:07:12 +0100 |
commit | 1d6b6298199c2809de49f68714834aa94fb0143e (patch) | |
tree | 50906e391b1740adbb9d0735b3cde9496e9dea08 /sw | |
parent | 715d79bcc59d68c77dc84a1038998dd873df92e9 (diff) |
Fixed style iterators filters to show only hidden styles when required
Change-Id: I60d4dff4fc6eabc3882361457e19ae66f148d114
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/app/docstyle.cxx | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/sw/source/ui/app/docstyle.cxx b/sw/source/ui/app/docstyle.cxx index f6f96f879be2..cae4c506b10f 100644 --- a/sw/source/ui/app/docstyle.cxx +++ b/sw/source/ui/app/docstyle.cxx @@ -2532,6 +2532,9 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() if( ( !bSearchHidden && pFmt->IsHidden() && !bUsed ) || ( pFmt->IsDefault() && pFmt != rDoc.GetDfltCharFmt() ) ) continue; + if ( nSrchMask == SFXSTYLEBIT_HIDDEN && !pFmt->IsHidden( ) ) + continue; + if( !bUsed ) { // Standard is no User template @@ -2609,6 +2612,9 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() if ( ( !bSearchHidden && pColl->IsHidden( ) && !bUsed ) || pColl->IsDefault() ) continue; + if ( nSMask == SFXSTYLEBIT_HIDDEN && !pColl->IsHidden( ) ) + continue; + if( !(bIsSearchUsed && bUsed )) { const sal_uInt16 nId = pColl->GetPoolFmtId(); @@ -2750,9 +2756,10 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(*pFmt)); if( ( !bSearchHidden && pFmt->IsHidden( ) && !bUsed ) || pFmt->IsDefault() || pFmt->IsAuto() ) - { continue; - } + + if ( nSrchMask == SFXSTYLEBIT_HIDDEN && !pFmt->IsHidden( ) ) + continue; const sal_uInt16 nId = pFmt->GetPoolFmtId(); if( !bUsed ) @@ -2795,6 +2802,9 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() continue; } + if ( nSrchMask == SFXSTYLEBIT_HIDDEN && !rDesc.IsHidden( ) ) + continue; + aLst.Append( cPAGE, rDesc.GetName() ); } if ( bAll ) @@ -2811,6 +2821,9 @@ SfxStyleSheetBase* SwStyleSheetIterator::First() const SwNumRule& rRule = *rNumTbl[ i ]; if( !rRule.IsAutoRule() ) { + if ( nSrchMask == SFXSTYLEBIT_HIDDEN && !rRule.IsHidden( ) ) + continue; + bool bUsed = bIsSearchUsed && ( bOrganizer || rDoc.IsUsed(rRule) ); if( !bUsed ) { |