diff options
author | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-11-30 11:51:46 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-11-30 18:07:12 +0100 |
commit | 715d79bcc59d68c77dc84a1038998dd873df92e9 (patch) | |
tree | ea5d16b5cf2f62a3c252d6b559bc6f36ff1692d3 /svl | |
parent | 2fd9c2bf9af0c50dae3af3dbe5e22965ccdb4ae7 (diff) |
Styles & Formatting: added SFXSTYLEBIT_ALL_VISIBLE and show hidden styles
Change-Id: Ie74ec3c15ba270afd0a6864bd5824a5bc0e3ea8b
Diffstat (limited to 'svl')
-rw-r--r-- | svl/inc/svl/style.hrc | 13 | ||||
-rw-r--r-- | svl/source/items/style.cxx | 8 |
2 files changed, 12 insertions, 9 deletions
diff --git a/svl/inc/svl/style.hrc b/svl/inc/svl/style.hrc index ae08df4c2c76..d4988400083a 100644 --- a/svl/inc/svl/style.hrc +++ b/svl/inc/svl/style.hrc @@ -19,11 +19,12 @@ #ifndef _SFX_STYLE_HRC #define _SFX_STYLE_HRC -#define SFXSTYLEBIT_AUTO 0x0000 // automatisch; Flags kommen von der Applikation -#define SFXSTYLEBIT_HIDDEN 0x0200 // benutzte Vorlage (als Suchmaske) -#define SFXSTYLEBIT_READONLY 0x2000 // benutzte Vorlage (als Suchmaske) -#define SFXSTYLEBIT_USED 0x4000 // benutzte Vorlage (als Suchmaske) -#define SFXSTYLEBIT_USERDEF 0x8000 // benutzerdefinierte Vorlage -#define SFXSTYLEBIT_ALL 0xFDFF // alle Vorlagen +#define SFXSTYLEBIT_AUTO 0x0000 // automatisch; Flags kommen von der Applikation +#define SFXSTYLEBIT_HIDDEN 0x0200 // benutzte Vorlage (als Suchmaske) +#define SFXSTYLEBIT_READONLY 0x2000 // benutzte Vorlage (als Suchmaske) +#define SFXSTYLEBIT_USED 0x4000 // benutzte Vorlage (als Suchmaske) +#define SFXSTYLEBIT_USERDEF 0x8000 // benutzerdefinierte Vorlage +#define SFXSTYLEBIT_ALL_VISIBLE 0xFDFF // alle Vorlagen +#define SFXSTYLEBIT_ALL 0xFFFF // alle Vorlagen #endif diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx index 15deda60bdc8..153edb84240b 100644 --- a/svl/source/items/style.cxx +++ b/svl/source/items/style.cxx @@ -369,7 +369,8 @@ SfxStyleFamily SfxStyleSheetIterator::GetSearchFamily() const inline bool SfxStyleSheetIterator::IsTrivialSearch() { - return nMask == SFXSTYLEBIT_ALL && GetSearchFamily() == SFX_STYLE_FAMILY_ALL; + return ( nMask & SFXSTYLEBIT_ALL_VISIBLE ) == SFXSTYLEBIT_ALL_VISIBLE + && GetSearchFamily() == SFX_STYLE_FAMILY_ALL; } bool SfxStyleSheetIterator::DoesStyleMatch(SfxStyleSheetBase *pStyle) @@ -381,7 +382,7 @@ bool SfxStyleSheetIterator::DoesStyleMatch(SfxStyleSheetBase *pStyle) ( pStyle->GetFamily() == GetSearchFamily() )) && (( pStyle->GetMask() & ( GetSearchMask() & ~SFXSTYLEBIT_USED )) || ( bSearchUsed ? pStyle->IsUsed() : false ) || - GetSearchMask() == SFXSTYLEBIT_ALL ) + ( GetSearchMask() & SFXSTYLEBIT_ALL_VISIBLE ) == SFXSTYLEBIT_ALL_VISIBLE ) && bMatchVisibility; return bMatches; } @@ -393,7 +394,8 @@ SfxStyleSheetIterator::SfxStyleSheetIterator(SfxStyleSheetBasePool *pBase, pBasePool=pBase; nSearchFamily=eFam; bSearchUsed=sal_False; - if((n != SFXSTYLEBIT_ALL ) && ((n & SFXSTYLEBIT_USED) == SFXSTYLEBIT_USED)) + if( (( n & SFXSTYLEBIT_ALL_VISIBLE ) != SFXSTYLEBIT_ALL_VISIBLE ) + && ((n & SFXSTYLEBIT_USED) == SFXSTYLEBIT_USED)) { bSearchUsed = sal_True; n &= ~SFXSTYLEBIT_USED; |