[Libreoffice-commits] .: sc/sdi sc/source sd/sdi sd/source sfx2/inc sfx2/sdi sfx2/source sw/sdi sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Dec 4 03:44:30 PST 2012


 sc/sdi/drawsh.sdi               |    1 +
 sc/sdi/drtxtob.sdi              |    1 +
 sc/sdi/formatsh.sdi             |    2 +-
 sc/source/ui/view/formatsh.cxx  |    9 +++++++--
 sd/sdi/_drvwsh.sdi              |    7 +++++++
 sd/sdi/outlnvsh.sdi             |    7 +++++++
 sd/source/ui/func/futempl.cxx   |    4 +++-
 sd/source/ui/view/drviewsc.cxx  |    1 +
 sd/source/ui/view/outlnvsh.cxx  |    3 +++
 sfx2/inc/sfx2/sfxsids.hrc       |    1 +
 sfx2/sdi/sfx.sdi                |   25 +++++++++++++++++++++++++
 sfx2/source/dialog/dialog.hrc   |    1 +
 sfx2/source/dialog/dialog.src   |    7 ++++++-
 sfx2/source/dialog/templdlg.cxx |   23 +++++++++++++++++++++++
 sfx2/source/dialog/tplcitem.cxx |    3 +++
 sfx2/source/inc/templdgi.hxx    |    4 ++++
 sw/sdi/_docsh.sdi               |    6 ++++++
 sw/sdi/annotsh.sdi              |    6 ++++++
 sw/source/ui/app/docst.cxx      |    4 +++-
 19 files changed, 109 insertions(+), 6 deletions(-)

New commits:
commit 708447f2a5011ef76cb5ed6aa02bbac45e93a532
Author: Cédric Bosdonnat <cedric.bosdonnat at free.fr>
Date:   Tue Dec 4 10:31:35 2012 +0100

    Styles & Formatting: added Show menu item on hidden styles
    
    The command to show hidden styles again was missing.
    
    Change-Id: Ic25b0cfc4d021d949124b8c4ef4016d6dba7e39f

diff --git a/sc/sdi/drawsh.sdi b/sc/sdi/drawsh.sdi
index 97c8cd7..ab2337f 100644
--- a/sc/sdi/drawsh.sdi
+++ b/sc/sdi/drawsh.sdi
@@ -49,6 +49,7 @@ interface TableDraw
     SID_STYLE_EDIT              [ StateMethod = StateDisableItems; Export = FALSE; ]
     SID_STYLE_DELETE            [ StateMethod = StateDisableItems; Export = FALSE; ]
     SID_STYLE_HIDE              [ StateMethod = StateDisableItems; Export = FALSE; ]
+    SID_STYLE_SHOW              [ StateMethod = StateDisableItems; Export = FALSE; ]
 
      //----------------------------------------------------------------------------
     SID_TEXT_STANDARD       [ ExecMethod = ExecDrawAttr; StateMethod = NoState; Export = FALSE; ]
diff --git a/sc/sdi/drtxtob.sdi b/sc/sdi/drtxtob.sdi
index 11e38d4..0bb35fc 100644
--- a/sc/sdi/drtxtob.sdi
+++ b/sc/sdi/drtxtob.sdi
@@ -46,6 +46,7 @@ interface TableDrawText
     SID_STYLE_EDIT              [ StateMethod = StateDisableItems; Export = FALSE; ]
     SID_STYLE_DELETE            [ StateMethod = StateDisableItems; Export = FALSE; ]
     SID_STYLE_HIDE              [ StateMethod = StateDisableItems; Export = FALSE; ]
+    SID_STYLE_SHOW              [ StateMethod = StateDisableItems; Export = FALSE; ]
 
      //----------------------------------------------------------------------------
     SID_CUT             [ ExecMethod = Execute; StateMethod = GetState; Export = FALSE; ]
diff --git a/sc/sdi/formatsh.sdi b/sc/sdi/formatsh.sdi
index 3725917..13884ce 100644
--- a/sc/sdi/formatsh.sdi
+++ b/sc/sdi/formatsh.sdi
@@ -58,7 +58,7 @@ interface FormatForSelection
     SID_STYLE_FAMILY4           [ ExecMethod = ExecuteStyle; StateMethod = GetStyleState; ]
     SID_STYLE_EDIT              [ ExecMethod = ExecuteStyle; StateMethod = GetStyleState; ]
     SID_STYLE_DELETE            [ ExecMethod = ExecuteStyle; StateMethod = GetStyleState; ]
-    SID_STYLE_HIDE            [ ExecMethod = ExecuteStyle; StateMethod = GetStyleState; ]
+    SID_STYLE_SHOW              [ ExecMethod = ExecuteStyle; StateMethod = GetStyleState; ]
     // } Slot's die in der DrawShell disabled werden.
 
     SID_ATTR_ALIGN_HOR_JUSTIFY    [ ExecMethod = ExecuteAlignment; StateMethod = GetAttrState; ]
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index 1a76135..4a53e6a 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -225,6 +225,7 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
             case SID_STYLE_EDIT:
             case SID_STYLE_DELETE:
             case SID_STYLE_HIDE:
+            case SID_STYLE_SHOW:
             {
                 ISfxTemplateCommon* pDesigner = SFX_APP()->
                         GetCurrentTemplateCommon(pTabViewShell->GetViewFrame()->GetBindings());
@@ -271,6 +272,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
         || (nSlotId == SID_STYLE_EDIT)
         || (nSlotId == SID_STYLE_DELETE)
         || (nSlotId == SID_STYLE_HIDE)
+        || (nSlotId == SID_STYLE_SHOW)
         || (nSlotId == SID_STYLE_APPLY)
         || (nSlotId == SID_STYLE_WATERCAN)
         || (nSlotId == SID_STYLE_FAMILY)
@@ -356,6 +358,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
             case SID_STYLE_EDIT:
             case SID_STYLE_DELETE:
             case SID_STYLE_HIDE:
+            case SID_STYLE_SHOW:
             case SID_STYLE_NEW_BY_EXAMPLE:
                 {
                     const SfxPoolItem* pNameItem;
@@ -440,10 +443,11 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
                     break;
 
                     case SID_STYLE_HIDE:
+                    case SID_STYLE_SHOW:
                     {
                         if ( pStyleSheet )
                         {
-                            pStyleSheet->SetHidden( true );
+                            pStyleSheet->SetHidden( nSlotId == SID_STYLE_HIDE );
                             pTabViewShell->InvalidateAttribs();
                             rReq.Done();
                         }
@@ -610,11 +614,12 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
                     break;
 
                     case SID_STYLE_HIDE:
+                    case SID_STYLE_SHOW:
                     {
                         nRetMask = ( NULL != pStyleSheet );
                         if ( pStyleSheet )
                         {
-                            pStyleSheet->SetHidden( true );
+                            pStyleSheet->SetHidden( nSlotId == SID_STYLE_HIDE );
                             rBindings.Invalidate( SID_STYLE_FAMILY4 );
                             pDocSh->SetDocumentModified();
                             rReq.Done();
diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi
index 0fabae4..5cbbefa 100644
--- a/sd/sdi/_drvwsh.sdi
+++ b/sd/sdi/_drvwsh.sdi
@@ -1373,6 +1373,13 @@ interface DrawView
         GroupId = GID_DOCUMENT ;
         Cachable ;
     ]
+    SID_STYLE_SHOW
+    [
+        ExecMethod = FuTemporary ;
+        StateMethod = GetAttrState ;
+        GroupId = GID_DOCUMENT ;
+        Cachable ;
+    ]
     SID_STYLE_APPLY // ole : no, status : ?
     [
         ExecMethod = FuTemporary ;
diff --git a/sd/sdi/outlnvsh.sdi b/sd/sdi/outlnvsh.sdi
index 6632f09..82e5fb7 100644
--- a/sd/sdi/outlnvsh.sdi
+++ b/sd/sdi/outlnvsh.sdi
@@ -333,6 +333,13 @@ interface OutlineView
         GroupId = GID_DOCUMENT ;
         Cachable ;
     ]
+    SID_STYLE_SHOW
+    [
+        ExecMethod = FuTemporary ;
+        StateMethod = GetAttrState ;
+        GroupId = GID_DOCUMENT ;
+        Cachable ;
+    ]
     SID_AUTOSPELL_CHECK // ole : no, status : play rec
     [
         ExecMethod = FuSupport ;
diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx
index f1d9fea..80f5749 100644
--- a/sd/source/ui/func/futempl.cxx
+++ b/sd/source/ui/func/futempl.cxx
@@ -136,6 +136,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
         case SID_STYLE_EDIT:
         case SID_STYLE_DELETE:
         case SID_STYLE_HIDE:
+        case SID_STYLE_SHOW:
         case SID_STYLE_FAMILY:
         case SID_STYLE_NEW_BY_EXAMPLE:
         {
@@ -227,8 +228,9 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
         break;
 
         case SID_STYLE_HIDE:
+        case SID_STYLE_SHOW:
             pStyleSheet = pSSPool->Find( aStyleName, (SfxStyleFamily) nFamily);
-            pStyleSheet->SetHidden( true );
+            pStyleSheet->SetHidden( nSId == SID_STYLE_HIDE );
             nRetMask = sal_True;
         break;
 
diff --git a/sd/source/ui/view/drviewsc.cxx b/sd/source/ui/view/drviewsc.cxx
index 9074fc2..e4f1be1 100644
--- a/sd/source/ui/view/drviewsc.cxx
+++ b/sd/source/ui/view/drviewsc.cxx
@@ -540,6 +540,7 @@ void DrawViewShell::FuTemp03(SfxRequest& rReq)
         case SID_STYLE_EDIT:
         case SID_STYLE_DELETE:
         case SID_STYLE_HIDE:
+        case SID_STYLE_SHOW:
         case SID_STYLE_FAMILY:
         case SID_STYLE_WATERCAN:
         case SID_STYLE_UPDATE_BY_EXAMPLE:
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index 881722d..5fbb6f3 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -1519,6 +1519,7 @@ sal_Bool OutlineViewShell::KeyInput(const KeyEvent& rKEvt, ::sd::Window* pWin)
     Invalidate(SID_STYLE_NEW);
     Invalidate(SID_STYLE_DELETE);
     Invalidate(SID_STYLE_HIDE);
+    Invalidate(SID_STYLE_SHOW);
     Invalidate(SID_STYLE_UPDATE_BY_EXAMPLE);
     Invalidate(SID_STYLE_NEW_BY_EXAMPLE);
     Invalidate(SID_STYLE_WATERCAN);
@@ -1712,6 +1713,7 @@ void OutlineViewShell::GetAttrState( SfxItemSet& rSet )
             case SID_STYLE_NEW:
             case SID_STYLE_DELETE:
             case SID_STYLE_HIDE:
+            case SID_STYLE_SHOW:
             case SID_STYLE_NEW_BY_EXAMPLE:
             case SID_STYLE_WATERCAN:
             {
@@ -1743,6 +1745,7 @@ void OutlineViewShell::MouseButtonUp(const MouseEvent& rMEvt, ::sd::Window* pWin
     Invalidate(SID_STYLE_NEW);
     Invalidate(SID_STYLE_DELETE);
     Invalidate(SID_STYLE_HIDE);
+    Invalidate(SID_STYLE_SHOW);
     Invalidate(SID_STYLE_UPDATE_BY_EXAMPLE);
     Invalidate(SID_STYLE_NEW_BY_EXAMPLE);
     Invalidate(SID_STYLE_WATERCAN);
diff --git a/sfx2/inc/sfx2/sfxsids.hrc b/sfx2/inc/sfx2/sfxsids.hrc
index 34bc07f..0dee088 100644
--- a/sfx2/inc/sfx2/sfxsids.hrc
+++ b/sfx2/inc/sfx2/sfxsids.hrc
@@ -360,6 +360,7 @@
 #define SID_STYLE_DRAGHIERARCHIE            (SID_SFX_START + 565)
 #define SID_STYLE_MASK                      (SID_SFX_START + 562)
 #define SID_STYLE_HIDE                      (SID_SFX_START + 1603)
+#define SID_STYLE_SHOW                      (SID_SFX_START + 1604)
 #define SID_STYLE_UPD_BY_EX_NAME            (SID_SFX_START + 1585)
 #define SID_STYLE_REFERENCE                 (SID_SFX_START + 1602)
 
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index c269dea..7c19226 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -1686,6 +1686,31 @@ SfxUInt16Item HideStyle SID_STYLE_HIDE
 ]
 
 //--------------------------------------------------------------------------
+SfxUInt16Item ShowStyle SID_STYLE_SHOW
+(SfxStringItem Param SID_STYLE_SHOW,SfxUInt16Item Family SID_STYLE_FAMILY)
+[
+    /* flags: */
+    AutoUpdate = FALSE,
+    Cachable = Cachable,
+    FastCall = FALSE,
+    HasCoreId = FALSE,
+    HasDialog = FALSE,
+    ReadOnlyDoc = FALSE,
+    Toggle = FALSE,
+    Container = FALSE,
+    RecordAbsolute = FALSE,
+    RecordPerSet;
+    Synchron;
+
+    /* config: */
+    AccelConfig = FALSE,
+    MenuConfig = FALSE,
+    StatusBarConfig = FALSE,
+    ToolBoxConfig = FALSE,
+    GroupId = GID_TEMPLATE;
+]
+
+//--------------------------------------------------------------------------
 SfxVoidItem ExecuteSearch FID_SEARCH_NOW
 (SvxSearchItem SearchItem SID_SEARCH_ITEM, SfxBoolItem Quiet SID_SEARCH_QUIET )
 [
diff --git a/sfx2/source/dialog/dialog.hrc b/sfx2/source/dialog/dialog.hrc
index 80e04d8..2cc86da 100644
--- a/sfx2/source/dialog/dialog.hrc
+++ b/sfx2/source/dialog/dialog.hrc
@@ -27,6 +27,7 @@
 #define ID_EDIT                         2
 #define ID_DELETE                       3
 #define ID_HIDE                         4
+#define ID_SHOW                         5
 
 #define RC_DIALOG_BEGIN                 RID_SFX_DIALOG_START
 
diff --git a/sfx2/source/dialog/dialog.src b/sfx2/source/dialog/dialog.src
index 4bcd140..27f50e0 100644
--- a/sfx2/source/dialog/dialog.src
+++ b/sfx2/source/dialog/dialog.src
@@ -82,7 +82,12 @@ Menu MN_CONTEXT_TEMPLDLG
         MenuItem
         {
             Identifier = ID_HIDE ;
-            Text [ en-US ] = "Hide..." ;
+            Text [ en-US ] = "Hide" ;
+        };
+        MenuItem
+        {
+            Identifier = ID_SHOW ;
+            Text [ en-US ] = "Show" ;
         };
         MenuItem
         {
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index cb19f50..d497711 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -764,6 +764,7 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, Sfx
     bCanDel                 ( sal_False ),
     bCanNew                 ( sal_True ),
     bCanHide                ( sal_True ),
+    bCanShow                ( sal_False ),
     bWaterDisabled          ( sal_False ),
     bNewByExampleDisabled   ( sal_False ),
     bUpdateByExampleDisabled( sal_False ),
@@ -810,6 +811,7 @@ SfxCommonTemplateDialog_Impl::SfxCommonTemplateDialog_Impl( SfxBindings* pB, Mod
     bCanDel                 ( sal_False ),
     bCanNew                 ( sal_True ),
     bCanHide                ( sal_True ),
+    bCanShow                ( sal_False ),
     bWaterDisabled          ( sal_False ),
     bNewByExampleDisabled   ( sal_False ),
     bUpdateByExampleDisabled( sal_False ),
@@ -1070,11 +1072,13 @@ void SfxCommonTemplateDialog_Impl::SelectStyle(const String &rStr)
         bool bReadWrite = !(pStyle->GetMask() & SFXSTYLEBIT_READONLY);
         EnableEdit( bReadWrite );
         EnableHide( bReadWrite && !pStyle->IsHidden( ) && !pStyle->IsUsed( ) );
+        EnableShow( bReadWrite && pStyle->IsHidden( ) );
     }
     else
     {
         EnableEdit( sal_False );
         EnableHide( sal_False );
+        EnableShow( sal_False );
     }
 
     if ( pTreeBox )
@@ -1120,6 +1124,7 @@ void SfxCommonTemplateDialog_Impl::SelectStyle(const String &rStr)
             aFmtLb.SelectAll( sal_False );
             EnableEdit(sal_False);
             EnableHide( sal_False );
+            EnableShow( sal_False );
         }
     }
 }
@@ -1595,11 +1600,13 @@ void SfxCommonTemplateDialog_Impl::Notify(SfxBroadcaster& /*rBC*/, const SfxHint
                             bool bReadWrite = !(pStyle->GetMask() & SFXSTYLEBIT_READONLY);
                             EnableEdit( bReadWrite );
                             EnableHide( bReadWrite && !pStyle->IsUsed( ) && !pStyle->IsHidden( ) );
+                            EnableShow( bReadWrite && pStyle->IsHidden( ) );
                         }
                         else
                         {
                             EnableEdit(sal_False);
                             EnableHide(sal_False);
+                            EnableShow(sal_False);
                         }
                     }
                 }
@@ -2074,6 +2081,20 @@ void SfxCommonTemplateDialog_Impl::HideHdl(void *)
     }
 }
 
+void SfxCommonTemplateDialog_Impl::ShowHdl(void *)
+{
+    if ( IsInitialized() && HasSelectedStyle() )
+    {
+        const String aTemplName( GetSelectedEntry() );
+        SfxStyleSheetBase* pStyle = GetSelectedStyle();
+        if ( pStyle )
+        {
+            Execute_Impl( SID_STYLE_SHOW, aTemplName,
+                          String(), (sal_uInt16)GetFamilyItem_Impl()->GetFamily() );
+        }
+    }
+}
+
 //-------------------------------------------------------------------------
 
 void    SfxCommonTemplateDialog_Impl::EnableDelete()
@@ -2191,6 +2212,7 @@ IMPL_LINK( SfxCommonTemplateDialog_Impl, MenuSelectHdl, Menu *, pMenu )
     case ID_EDIT: EditHdl(0); break;
     case ID_DELETE: DeleteHdl(0); break;
     case ID_HIDE: HideHdl(0); break;
+    case ID_SHOW: ShowHdl(0); break;
     default: return sal_False;
     }
     return sal_True;
@@ -2250,6 +2272,7 @@ PopupMenu* SfxCommonTemplateDialog_Impl::CreateContextMenu( void )
     pMenu->EnableItem( ID_DELETE, bCanDel );
     pMenu->EnableItem( ID_NEW, bCanNew );
     pMenu->EnableItem( ID_HIDE, bCanHide );
+    pMenu->EnableItem( ID_SHOW, bCanShow );
 
     return pMenu;
 }
diff --git a/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx
index 314a39a..064435e 100644
--- a/sfx2/source/dialog/tplcitem.cxx
+++ b/sfx2/source/dialog/tplcitem.cxx
@@ -121,6 +121,9 @@ void SfxTemplateControllerItem::StateChanged( sal_uInt16 nSID, SfxItemState eSta
         case SID_STYLE_HIDE:
             rTemplateDlg.EnableHide( SFX_ITEM_DISABLED != eState );
             break;
+        case SID_STYLE_SHOW:
+            rTemplateDlg.EnableShow( SFX_ITEM_DISABLED != eState );
+            break;
         case SID_STYLE_NEW_BY_EXAMPLE:
 
             rTemplateDlg.EnableExample_Impl(
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index 821695a..3363e58 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -159,6 +159,7 @@ protected:
                                 bCanDel                 :1,
                                 bCanNew                 :1,
                                 bCanHide                :1,
+                                bCanShow                :1,
                                 bWaterDisabled          :1,
                                 bNewByExampleDisabled   :1,
                                 bUpdateByExampleDisabled:1,
@@ -188,6 +189,7 @@ protected:
     void                EditHdl( void* );
     void                DeleteHdl( void* );
     void                HideHdl( void* );
+    void                ShowHdl( void* );
 
     sal_Bool                Execute_Impl( sal_uInt16 nId, const String& rStr, const String& rRefStr,
                                       sal_uInt16 nFamily, sal_uInt16 nMask = 0,
@@ -237,6 +239,7 @@ public:
     virtual void        EnableDel( sal_Bool b = sal_True )  { bCanDel = b; }
     virtual void        EnableNew( sal_Bool b = sal_True )  { bCanNew = b; }
     virtual void        EnableHide( sal_Bool b = sal_True )  { bCanHide = b; }
+    virtual void        EnableShow( sal_Bool b = sal_True )  { bCanShow = b; }
 
     ISfxTemplateCommon* GetISfxTemplateCommon() { return &aISfxTemplateCommon; }
     Window*             GetWindow() { return pWindow; }
@@ -254,6 +257,7 @@ public:
     inline sal_Bool         CanDel( void ) const    { return bCanDel; }
     inline sal_Bool         CanNew( void ) const    { return bCanNew; }
     inline sal_Bool         CanHide( void ) const    { return bCanHide; }
+    inline sal_Bool         CanShow( void ) const    { return bCanShow; }
 
     // normaly for derivates from SvTreeListBoxes, but in this case the dialog handles context menus
     virtual PopupMenu*  CreateContextMenu( void );
diff --git a/sw/sdi/_docsh.sdi b/sw/sdi/_docsh.sdi
index cfc3337..ed84731 100644
--- a/sw/sdi/_docsh.sdi
+++ b/sw/sdi/_docsh.sdi
@@ -56,6 +56,12 @@ interface BaseTextDocument
         StateMethod = NoState ;
     ]
 
+    SID_STYLE_SHOW
+    [
+        ExecMethod = ExecStyleSheet ;
+        StateMethod = NoState ;
+    ]
+
     SID_TEMPLATE_LOAD
     [
         ExecMethod = Execute ;
diff --git a/sw/sdi/annotsh.sdi b/sw/sdi/annotsh.sdi
index 9e566b2..0506fd2 100644
--- a/sw/sdi/annotsh.sdi
+++ b/sw/sdi/annotsh.sdi
@@ -351,6 +351,12 @@ interface Annotation : _Annotation
     [
         StateMethod = StateDisableItems ;
     ]
+
+    SID_STYLE_SHOW
+    [
+        StateMethod = StateDisableItems ;
+    ]
+
     FN_STAT_SELMODE
     [
         StateMethod = StateStatusLine ;
diff --git a/sw/source/ui/app/docst.cxx b/sw/source/ui/app/docst.cxx
index 14144c2..3685eb1 100644
--- a/sw/source/ui/app/docst.cxx
+++ b/sw/source/ui/app/docst.cxx
@@ -326,6 +326,7 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
         case SID_STYLE_EDIT:
         case SID_STYLE_DELETE:
         case SID_STYLE_HIDE:
+        case SID_STYLE_SHOW:
         case SID_STYLE_WATERCAN:
         case SID_STYLE_FAMILY:
         case SID_STYLE_UPDATE_BY_EXAMPLE:
@@ -452,7 +453,8 @@ void SwDocShell::ExecStyleSheet( SfxRequest& rReq )
                         nRet = Delete(aParam, nFamily);
                         break;
                     case SID_STYLE_HIDE:
-                        nRet = Hide(aParam, nFamily, true);
+                    case SID_STYLE_SHOW:
+                        nRet = Hide(aParam, nFamily, nSlot == SID_STYLE_HIDE);
                         break;
                     case SID_STYLE_APPLY:
                         // Shell-switch in ApplyStyles


More information about the Libreoffice-commits mailing list