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 --- svx/sdi/svx.sdi | 2 +- svx/source/gallery2/galbrws.cxx | 18 ------------------ svx/source/tbxctrls/tbcontrl.cxx | 13 ++++--------- 3 files changed, 5 insertions(+), 28 deletions(-) (limited to 'svx') diff --git a/svx/sdi/svx.sdi b/svx/sdi/svx.sdi index 88885bbb3b6a..10b254ff6554 100644 --- a/svx/sdi/svx.sdi +++ b/svx/sdi/svx.sdi @@ -4885,7 +4885,7 @@ SfxBoolItem AutoColorInvalid SID_ATTR_AUTO_COLOR_INVALID ] -SfxBoolItem Gallery SID_GALLERY +SfxVoidItem Gallery SID_GALLERY [ /* flags: */ diff --git a/svx/source/gallery2/galbrws.cxx b/svx/source/gallery2/galbrws.cxx index bb5c7fb450a1..7bec886eff94 100644 --- a/svx/source/gallery2/galbrws.cxx +++ b/svx/source/gallery2/galbrws.cxx @@ -34,24 +34,6 @@ #include -GalleryChildWindow::GalleryChildWindow( Window* _pParent, sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo ) : - SfxChildWindow( _pParent, nId ) -{ - - pWindow = new GalleryBrowser( pBindings, this, _pParent, GAL_RES( RID_SVXDLG_GALLERYBROWSER ) ); - eChildAlignment = SFX_ALIGN_TOP; - ( (GalleryBrowser*) pWindow )->Initialize( pInfo ); -}; - -GalleryChildWindow::~GalleryChildWindow() -{ -} - -SFX_IMPL_DOCKINGWINDOW_WITHID( GalleryChildWindow, SID_GALLERY ) - -// - GalleryBrowser - - - GalleryBrowser::GalleryBrowser( SfxBindings* _pBindings, SfxChildWindow* pCW, diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 5124dc199ef3..4c2e985c6942 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -57,6 +57,7 @@ #include #include "helpid.hrc" #include +#include #include #include #include @@ -363,15 +364,9 @@ void SvxStyleBox_Impl::Select() { SfxViewFrame* pViewFrm = SfxViewFrame::Current(); DBG_ASSERT( pViewFrm, "SvxStyleBox_Impl::Select(): no viewframe" ); - pViewFrm->ShowChildWindow( SID_STYLE_DESIGNER ); - SfxChildWindow* pChildWin = pViewFrm->GetChildWindow( SID_STYLE_DESIGNER ); - if ( pChildWin && pChildWin->GetWindow() ) - { - static_cast< SfxTemplateDialogWrapper* >( pChildWin )->SetParagraphFamily(); - static_cast< SfxDockingWindow* >( pChildWin->GetWindow() )->AutoShow( true ); - Application::PostUserEvent( - STATIC_LINK( 0, SvxStyleBox_Impl, FocusHdl_Impl ), pChildWin->GetWindow() ); - } + pViewFrm->ShowChildWindow( SID_SIDEBAR ); + ::sfx2::sidebar::Sidebar::ShowPanel("StyleListPanel", + pViewFrm->GetFrame().GetFrameInterface()); bDoIt = false; } } -- cgit