From dabb20ebd5fa3b0d4bdb063b32f6ffbe2f59c3a2 Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Sat, 6 Aug 2016 23:31:18 +0200 Subject: GSoC: tdf#101249 Toolbar Mode switching + added registry entry for storing current toolbar mode for each application + registry entries to store toolbar mode configuration, remember additional visible toolbars activated by user + changing toolbar mode hides and shows suitable toolbars + added menu controller for toolbar mode + notebookbar implementation entries are disabled when notebookbar mode is not active + each mode can open/collapse the sidebar Change-Id: I2b03f87c6dce53190d12102892d9ad30fbfd3bf6 Reviewed-on: https://gerrit.libreoffice.org/27991 Reviewed-by: Samuel Mehrbrodt Tested-by: Samuel Mehrbrodt --- sd/source/ui/docshell/docshel3.cxx | 10 +++------- sd/source/ui/docshell/docshell.cxx | 4 +++- 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'sd/source') diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx index 056d59b44ff0..5aa32ba9f24e 100644 --- a/sd/source/ui/docshell/docshel3.cxx +++ b/sd/source/ui/docshell/docshel3.cxx @@ -326,14 +326,10 @@ void DrawDocShell::Execute( SfxRequest& rReq ) { SfxBindings& rBindings( mpViewShell->GetFrame()->GetBindings() ); - if ( !pFile || ( pFile && !sfx2::SfxNotebookBar::IsActive() ) ) - sfx2::SfxNotebookBar::ExecMethod( rBindings ); - else if ( pFile && pFile->GetValue().isEmpty() ) - { + if ( sfx2::SfxNotebookBar::IsActive() ) + sfx2::SfxNotebookBar::ExecMethod( rBindings, pFile ? pFile->GetValue() : "" ); + else sfx2::SfxNotebookBar::CloseMethod( rBindings ); - if ( sfx2::SfxNotebookBar::IsActive() ) - sfx2::SfxNotebookBar::ExecMethod( rBindings ); - } } } break; diff --git a/sd/source/ui/docshell/docshell.cxx b/sd/source/ui/docshell/docshell.cxx index fc54b20373bc..2cd6107d1b26 100644 --- a/sd/source/ui/docshell/docshell.cxx +++ b/sd/source/ui/docshell/docshell.cxx @@ -274,7 +274,9 @@ void DrawDocShell::GetState(SfxItemSet &rSet) case SID_NOTEBOOKBAR: { - sfx2::SfxNotebookBar::StateMethod(mpViewShell->GetFrame()->GetBindings(), "modules/simpress/ui/"); + bool bVisible = sfx2::SfxNotebookBar::StateMethod(mpViewShell->GetFrame()->GetBindings(), + "modules/simpress/ui/"); + rSet.Put( SfxBoolItem( SID_NOTEBOOKBAR, bVisible ) ); } break; -- cgit