From b4558b508141af16d335f45a0f12bdd34521e944 Mon Sep 17 00:00:00 2001 From: Samuel Mehrbrodt Date: Fri, 22 Aug 2014 22:37:56 +0200 Subject: fdo#73151 Make better use of the sidebar The general idea is to encourage use of the sidebar instead of floating windows (for Navigator, Styles&Formatting and Gallery) Changes: * Show the sidebar by default in Writer & Impress * Remove the Gallery floating window (Gallery now always opens in the sidebar) * Remove all Gallery, Navigator and Styles&Formatting links from the default toolbar in Writer (since they have an icon in the sidebar and the sidebar is shown by default now) * When selecting "More" from the Styles dropdown, the Stylelist opens in the sidebar instead of the floating window This has all been discussed extensively here: https://bugs.freedesktop.org/show_bug.cgi?id=73151 Change-Id: I3a0461d1472711da7121801000af294b432fccb1 Reviewed-on: https://gerrit.libreoffice.org/11077 Reviewed-by: Thomas Arnhold Tested-by: Thomas Arnhold --- sc/source/ui/view/tabvwsh9.cxx | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) (limited to 'sc/source/ui/view/tabvwsh9.cxx') diff --git a/sc/source/ui/view/tabvwsh9.cxx b/sc/source/ui/view/tabvwsh9.cxx index 6283fd772efa..a7d7e498557e 100644 --- a/sc/source/ui/view/tabvwsh9.cxx +++ b/sc/source/ui/view/tabvwsh9.cxx @@ -26,6 +26,7 @@ #include #include #include +#include #include #include "imapwrap.hxx" @@ -48,24 +49,17 @@ void ScTabViewShell::ExecChildWin(SfxRequest& rReq) { case SID_GALLERY: { - SfxViewFrame* pThisFrame = GetViewFrame(); - pThisFrame->ToggleChildWindow( GalleryChildWindow::GetChildWindowId() ); - pThisFrame->GetBindings().Invalidate( SID_GALLERY ); - rReq.Ignore(); + // First make sure that the sidebar is visible + GetViewFrame()->ShowChildWindow(SID_SIDEBAR); + + ::sfx2::sidebar::Sidebar::ShowPanel( + "GalleryPanel", + GetViewFrame()->GetFrame().GetFrameInterface()); } break; } } -void ScTabViewShell::GetChildWinState( SfxItemSet& rSet ) -{ - if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_GALLERY ) ) - { - sal_uInt16 nId = GalleryChildWindow::GetChildWindowId(); - rSet.Put( SfxBoolItem( SID_GALLERY, GetViewFrame()->HasChildWindow( nId ) ) ); - } -} - void ScTabViewShell::ExecGallery( SfxRequest& rReq ) { const SfxItemSet* pArgs = rReq.GetArgs(); @@ -94,10 +88,6 @@ void ScTabViewShell::ExecGallery( SfxRequest& rReq ) } } -void ScTabViewShell::GetGalleryState( SfxItemSet& /* rSet */ ) -{ -} - OUString ScTabViewShell::GetDescription() const { return OUString(" ** Test ** "); -- cgit