diff options
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; |