diff options
author | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-11-25 15:24:42 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat@free.fr> | 2012-11-30 18:07:12 +0100 |
commit | 2fd9c2bf9af0c50dae3af3dbe5e22965ccdb4ae7 (patch) | |
tree | 2a0438c371fbb51a3d2e919793802d6827e07fbd /sd/source/ui/func/futempl.cxx | |
parent | 36b7794d832dbc87c250ef02eee643c4ce68f87a (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 'sd/source/ui/func/futempl.cxx')
-rw-r--r-- | sd/source/ui/func/futempl.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx index 1326e5102576..f1d9feae1487 100644 --- a/sd/source/ui/func/futempl.cxx +++ b/sd/source/ui/func/futempl.cxx @@ -128,13 +128,14 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) } String aStyleName; - sal_uInt16 nRetMask = 0xffff; + sal_uInt16 nRetMask = SFXSTYLEBIT_ALL; switch( nSId ) { case SID_STYLE_APPLY: case SID_STYLE_EDIT: case SID_STYLE_DELETE: + case SID_STYLE_HIDE: case SID_STYLE_FAMILY: case SID_STYLE_NEW_BY_EXAMPLE: { @@ -225,6 +226,12 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) } break; + case SID_STYLE_HIDE: + pStyleSheet = pSSPool->Find( aStyleName, (SfxStyleFamily) nFamily); + pStyleSheet->SetHidden( true ); + nRetMask = sal_True; + break; + case SID_STYLE_APPLY: // Anwenden der Vorlage auf das Dokument pStyleSheet = pSSPool->Find( aStyleName, (SfxStyleFamily) nFamily); @@ -666,7 +673,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq ) break; } - if( nRetMask != 0xffff ) + if( nRetMask != SFXSTYLEBIT_ALL ) rReq.SetReturnValue( SfxUInt16Item( nSId, nRetMask ) ); } |