diff options
author | Szymon Kłos <eszkadev@gmail.com> | 2016-08-11 13:53:20 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <s.mehrbrodt@gmail.com> | 2016-08-16 07:11:25 +0000 |
commit | af97c180983e5a8ac147b97f7773d483bba8cfef (patch) | |
tree | dc16d54bdb452b7ce2a18aa83bd1585ed6ea76e4 /sd/source | |
parent | 5b1095fc03e90506cb8ed956fafb528d4f6b0044 (diff) |
GSoC notebookbar: multiple .ui implementations
+ added menu controller for .uno:Notebookbar showing
all implementations
+ switching between .ui files
+ officecfg stores implementation description
+ added second implementation file notebookbar_groups.ui
Change-Id: I9f406daced7a111793f61a2e9f939cba27d92184
Reviewed-on: https://gerrit.libreoffice.org/28067
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 | 17 | ||||
-rw-r--r-- | sd/source/ui/docshell/docshell.cxx | 2 |
2 files changed, 16 insertions, 3 deletions
diff --git a/sd/source/ui/docshell/docshel3.cxx b/sd/source/ui/docshell/docshel3.cxx index 142e38184426..056d59b44ff0 100644 --- a/sd/source/ui/docshell/docshel3.cxx +++ b/sd/source/ui/docshell/docshel3.cxx @@ -320,8 +320,21 @@ void DrawDocShell::Execute( SfxRequest& rReq ) case SID_NOTEBOOKBAR: { - if (mpViewShell) - sfx2::SfxNotebookBar::ExecMethod(mpViewShell->GetFrame()->GetBindings()); + const SfxStringItem* pFile = rReq.GetArg<SfxStringItem>( SID_NOTEBOOKBAR ); + + if ( mpViewShell ) + { + SfxBindings& rBindings( mpViewShell->GetFrame()->GetBindings() ); + + if ( !pFile || ( pFile && !sfx2::SfxNotebookBar::IsActive() ) ) + sfx2::SfxNotebookBar::ExecMethod( rBindings ); + else if ( pFile && pFile->GetValue().isEmpty() ) + { + 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 9a0698234420..fc54b20373bc 100644 --- a/sd/source/ui/docshell/docshell.cxx +++ b/sd/source/ui/docshell/docshell.cxx @@ -274,7 +274,7 @@ void DrawDocShell::GetState(SfxItemSet &rSet) case SID_NOTEBOOKBAR: { - sfx2::SfxNotebookBar::StateMethod(mpViewShell->GetFrame()->GetBindings(), "modules/simpress/ui/notebookbar.ui"); + sfx2::SfxNotebookBar::StateMethod(mpViewShell->GetFrame()->GetBindings(), "modules/simpress/ui/"); } break; |