diff options
author | Jan Holesovsky <kendy@collabora.com> | 2016-03-30 10:28:10 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2016-03-30 11:01:30 +0200 |
commit | d150cc71a37f11c6e47cc528a74782722bff048c (patch) | |
tree | ed82c05e97b9403e0fd58c48ae098121cacea24d /sw/source/uibase/app/docsh.cxx | |
parent | d039c4812db5ba4beed72deb44fe6b04137af6e5 (diff) |
notebookbar: Trying to use the SfxChildWindow for it does not work too well.
The notebookbar is not a child window, so trying to graft it on the
SfxChildWindow infrastructure is more pain than gain, unfortunately...
Instead, it's enough to create the appropriate functions for ExecMethod and
StateMethod, and call them from Writer / Calc / etc. with the appropriate .ui
file; that's easier & works equally well.
Change-Id: I08d98d4f481bd02e90ba11df0bd1c1149697a7fa
Diffstat (limited to 'sw/source/uibase/app/docsh.cxx')
-rw-r--r-- | sw/source/uibase/app/docsh.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 7c097d88818b..6a7db05c9fa1 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -40,6 +40,7 @@ #include <sfx2/docfile.hxx> #include <sfx2/evntconf.hxx> #include <sfx2/docfilt.hxx> +#include <sfx2/notebookbar/SfxNotebookBar.hxx> #include <sfx2/printer.hxx> #include <sfx2/linkmgr.hxx> #include <svl/srchitem.hxx> @@ -1070,6 +1071,12 @@ void SwDocShell::GetState(SfxItemSet& rSet) rSet.Put( SfxBoolItem( nWhich, bRet ) ); } break; + case SID_NOTEBOOKBAR: + { + SfxViewShell* pViewShell = GetView()? GetView(): SfxViewShell::Current(); + sfx2::SfxNotebookBar::StateMethod(pViewShell->GetViewFrame()->GetBindings(), "vcl/ui/notebookbar.ui"); + } + break; default: OSL_ENSURE(false,"You cannot get here!"); |