summaryrefslogtreecommitdiff
path: root/svl/inc
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat@free.fr>2012-11-25 15:24:42 +0100
committerCédric Bosdonnat <cedric.bosdonnat@free.fr>2012-11-30 18:07:12 +0100
commit2fd9c2bf9af0c50dae3af3dbe5e22965ccdb4ae7 (patch)
tree2a0438c371fbb51a3d2e919793802d6827e07fbd /svl/inc
parent36b7794d832dbc87c250ef02eee643c4ce68f87a (diff)
Allow to hide styles in the "Styles & Formating" dialog
In its current state, the feature only hides the styles. Things to sort out are: + Add some automatic filter to show hidden styles + Make the visibility persist in the file format Change-Id: I5904f41bb567add7b6bf501c6c5297f9f149a915
Diffstat (limited to 'svl/inc')
-rw-r--r--svl/inc/svl/style.hrc3
-rw-r--r--svl/inc/svl/style.hxx12
2 files changed, 10 insertions, 5 deletions
diff --git a/svl/inc/svl/style.hrc b/svl/inc/svl/style.hrc
index a4fea6d042c8..ae08df4c2c76 100644
--- a/svl/inc/svl/style.hrc
+++ b/svl/inc/svl/style.hrc
@@ -20,9 +20,10 @@
#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 0xFFFF // alle Vorlagen
+#define SFXSTYLEBIT_ALL 0xFDFF // alle Vorlagen
#endif
diff --git a/svl/inc/svl/style.hxx b/svl/inc/svl/style.hxx
index f0878c46967a..48557c5457d8 100644
--- a/svl/inc/svl/style.hxx
+++ b/svl/inc/svl/style.hxx
@@ -90,6 +90,7 @@ protected:
sal_uLong nHelpId; // Hilfe-ID
bool bMySet; // sal_True: Set loeschen im dtor
+ bool bHidden;
SfxStyleSheetBase( const UniString&, SfxStyleSheetBasePool*, SfxStyleFamily eFam, sal_uInt16 mask );
SfxStyleSheetBase( const SfxStyleSheetBase& );
@@ -133,6 +134,9 @@ public:
bool IsUserDefined() const
{ return ( nMask & SFXSTYLEBIT_USERDEF) != 0; }
+ virtual sal_Bool IsHidden() const { return bHidden; }
+ virtual void SetHidden( sal_Bool bValue );
+
virtual sal_uLong GetHelpId( String& rFile );
virtual void SetHelpId( const String& r, sal_uLong nId );
@@ -157,7 +161,7 @@ class SVL_DLLPUBLIC SfxStyleSheetIterator
{
public:
SfxStyleSheetIterator(SfxStyleSheetBasePool *pBase,
- SfxStyleFamily eFam, sal_uInt16 n=0xFFFF );
+ SfxStyleFamily eFam, sal_uInt16 n=SFXSTYLEBIT_ALL );
virtual sal_uInt16 GetSearchMask() const;
virtual SfxStyleFamily GetSearchFamily() const;
virtual sal_uInt16 Count();
@@ -229,7 +233,7 @@ public:
virtual SfxStyleSheetBase& Make(const UniString&,
SfxStyleFamily eFam,
- sal_uInt16 nMask = 0xffff ,
+ sal_uInt16 nMask = SFXSTYLEBIT_ALL ,
sal_uInt16 nPos = 0xffff);
virtual void Replace(
@@ -246,7 +250,7 @@ public:
const SfxStyles& GetStyles();
virtual SfxStyleSheetBase* First();
virtual SfxStyleSheetBase* Next();
- virtual SfxStyleSheetBase* Find( const UniString&, SfxStyleFamily eFam, sal_uInt16 n=0xFFFF );
+ virtual SfxStyleSheetBase* Find( const UniString&, SfxStyleFamily eFam, sal_uInt16 n=SFXSTYLEBIT_ALL );
virtual bool SetParent(SfxStyleFamily eFam,
const UniString &rStyle,
@@ -255,7 +259,7 @@ public:
SfxStyleSheetBase* Find(const UniString& rStr)
{ return Find(rStr, nSearchFamily, nMask); }
- void SetSearchMask(SfxStyleFamily eFam, sal_uInt16 n=0xFFFF );
+ void SetSearchMask(SfxStyleFamily eFam, sal_uInt16 n=SFXSTYLEBIT_ALL );
sal_uInt16 GetSearchMask() const;
SfxStyleFamily GetSearchFamily() const { return nSearchFamily; }
};