summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorSzymon Kłos <eszkadev@gmail.com>2016-06-01 21:47:27 +0200
committerJan Holesovsky <kendy@collabora.com>2016-06-03 10:26:21 +0000
commit599f6db17c4d2e23496fbd23b1dec53c2402e4b1 (patch)
treeace2dc2a2521e2fc794c215c5fa8e918ebd5de05 /sfx2
parent0216b8dc6179fad02a9cbbc99898eef81f679f4f (diff)
notebookbar: load ui for the start center
Change-Id: Iaf0e46436524e081edb287efd4074becaf02a98f Reviewed-on: https://gerrit.libreoffice.org/25799 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/backingcomp.cxx8
-rw-r--r--sfx2/source/notebookbar/SfxNotebookBar.cxx12
2 files changed, 17 insertions, 3 deletions
diff --git a/sfx2/source/dialog/backingcomp.cxx b/sfx2/source/dialog/backingcomp.cxx
index 7569830a6a0f..937501b4efa4 100644
--- a/sfx2/source/dialog/backingcomp.cxx
+++ b/sfx2/source/dialog/backingcomp.cxx
@@ -59,6 +59,7 @@
#include <unotools/bootstrap.hxx>
+#include <sfx2/notebookbar/SfxNotebookBar.hxx>
namespace {
@@ -429,6 +430,13 @@ void SAL_CALL BackingComp::attachFrame( /*IN*/ const css::uno::Reference< css::f
if( pBack )
pBack->setOwningFrame( m_xFrame );
+ // set NotebookBar
+ SystemWindow* pSysWindow = static_cast<SystemWindow*>(pParent);
+ if (pSysWindow)
+ {
+ sfx2::SfxNotebookBar::StateMethod(pSysWindow, m_xFrame, "sfx/ui/notebookbar.ui");
+ }
+
// Set a minimum size for Start Center
if( pParent && pBack )
{
diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx
index d2d9409fc6f0..6888c5fe896e 100644
--- a/sfx2/source/notebookbar/SfxNotebookBar.cxx
+++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx
@@ -29,17 +29,23 @@ void SfxNotebookBar::ExecMethod(SfxBindings& rBindings)
void SfxNotebookBar::StateMethod(SfxBindings& rBindings, const OUString& rUIFile)
{
SfxFrame& rFrame = rBindings.GetDispatcher_Impl()->GetFrame()->GetFrame();
+ StateMethod(rFrame.GetSystemWindow(), rFrame.GetFrameInterface(), rUIFile);
+}
+void SfxNotebookBar::StateMethod(SystemWindow* pSysWindow,
+ const css::uno::Reference<css::frame::XFrame> xFrame,
+ const OUString& rUIFile)
+{
SvtViewOptions aViewOpt(E_WINDOW, "notebookbar");
if (aViewOpt.IsVisible())
{
// setup if necessary
- rFrame.GetSystemWindow()->SetNotebookBar(rUIFile, rFrame.GetFrameInterface());
+ pSysWindow->SetNotebookBar(rUIFile, xFrame);
- rFrame.GetSystemWindow()->GetNotebookBar()->Show();
+ pSysWindow->GetNotebookBar()->Show();
}
- else if (auto pNotebookBar = rFrame.GetSystemWindow()->GetNotebookBar())
+ else if (auto pNotebookBar = pSysWindow->GetNotebookBar())
pNotebookBar->Hide();
}