diff options
author | Szymon Kłos <eszkadev@gmail.com> | 2016-08-06 23:31:18 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <s.mehrbrodt@gmail.com> | 2016-08-22 19:38:25 +0000 |
commit | dabb20ebd5fa3b0d4bdb063b32f6ffbe2f59c3a2 (patch) | |
tree | abea74259c8b66cb30037401e2718add4b32cb44 /sd/source | |
parent | fc185fd35360a84136dd834bfdcd2e522350999a (diff) |
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 <s.mehrbrodt@gmail.com>
Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/ui/docshell/docshel3.cxx | 10 | ||||
-rw-r--r-- | sd/source/ui/docshell/docshell.cxx | 4 |
2 files changed, 6 insertions, 8 deletions
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; |