diff options
author | Samuel Mehrbrodt <s.mehrbrodt@gmail.com> | 2014-08-22 22:37:56 +0200 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2014-08-24 06:26:17 -0500 |
commit | b4558b508141af16d335f45a0f12bdd34521e944 (patch) | |
tree | f8479fe8131a0d1677100e2cc16c244e860189cb /sc/source/ui/view/tabvwsh9.cxx | |
parent | a75e0f8e4e5f0baa5805d01c5f8edc7b40fceb0f (diff) |
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 <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
Diffstat (limited to 'sc/source/ui/view/tabvwsh9.cxx')
-rw-r--r-- | sc/source/ui/view/tabvwsh9.cxx | 24 |
1 files changed, 7 insertions, 17 deletions
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 <sfx2/request.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/dispatch.hxx> +#include <sfx2/sidebar/Sidebar.hxx> #include <svl/whiter.hxx> #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 ** "); |