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 /sw/source/uibase/app | |
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 'sw/source/uibase/app')
-rw-r--r-- | sw/source/uibase/app/docsh.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/app/docsh2.cxx | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 03ea367f5c7c..c12ed6c5aeaa 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -1073,7 +1073,9 @@ void SwDocShell::GetState(SfxItemSet& rSet) case SID_NOTEBOOKBAR: { SfxViewShell* pViewShell = GetView()? GetView(): SfxViewShell::Current(); - sfx2::SfxNotebookBar::StateMethod(pViewShell->GetViewFrame()->GetBindings(), "modules/swriter/ui/"); + bool bVisible = sfx2::SfxNotebookBar::StateMethod(pViewShell->GetViewFrame()->GetBindings(), + "modules/swriter/ui/"); + rSet.Put( SfxBoolItem( SID_NOTEBOOKBAR, bVisible ) ); } break; diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index d49a09f41e0e..6f2249dfc9aa 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -1164,13 +1164,11 @@ void SwDocShell::Execute(SfxRequest& rReq) SfxViewShell* pViewShell = GetView()? GetView(): SfxViewShell::Current(); SfxBindings& rBindings( pViewShell->GetViewFrame()->GetBindings() ); - if ( !pFile || ( pFile && !SfxNotebookBar::IsActive() ) ) - sfx2::SfxNotebookBar::ExecMethod( rBindings ); - else if ( pFile && pFile->GetValue().isEmpty() ) + if ( SfxNotebookBar::IsActive() ) + sfx2::SfxNotebookBar::ExecMethod( rBindings, pFile ? pFile->GetValue() : "" ); + else { sfx2::SfxNotebookBar::CloseMethod( rBindings ); - if ( sfx2::SfxNotebookBar::IsActive() ) - sfx2::SfxNotebookBar::ExecMethod( rBindings ); } } break; |