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 | |
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')
-rw-r--r-- | sw/source/uibase/app/docsh.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/app/docsh2.cxx | 8 | ||||
-rw-r--r-- | sw/uiconfig/swriter/menubar/menubar.xml | 2 |
3 files changed, 8 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; diff --git a/sw/uiconfig/swriter/menubar/menubar.xml b/sw/uiconfig/swriter/menubar/menubar.xml index e29239fd0fd9..1c6da9018dc8 100644 --- a/sw/uiconfig/swriter/menubar/menubar.xml +++ b/sw/uiconfig/swriter/menubar/menubar.xml @@ -146,7 +146,9 @@ <menu:menuitem menu:id=".uno:PrintLayout" menu:style="radio"/> <menu:menuitem menu:id=".uno:BrowseView" menu:style="radio"/> <menu:menuseparator/> + <menu:menuitem menu:id=".uno:ToolbarMode"/> <menu:menuitem menu:id=".uno:AvailableToolbars"/> + <menu:menuitem menu:id=".uno:Notebookbar"/> <menu:menuitem menu:id=".uno:StatusBarVisible"/> <menu:menu menu:id=".uno:RulerMenu"> <menu:menupopup> |