summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorSzymon Kłos <eszkadev@gmail.com>2016-03-18 13:55:24 +0100
committerJan Holesovsky <kendy@collabora.com>2016-03-30 11:01:30 +0200
commit1fb314832ebd14cde6457feb2bf4f19e1bfcaa82 (patch)
treeda734f97c69385c0864c42249de09f2d5a3754a6 /sfx2
parent2c29716d349353997bf7cdde63cd9f867c5baeb6 (diff)
notebookbar: Instantiate the notebookbar via sfx2 infrastructure.
Change-Id: Iaed4596246245560e646d9086e717d5fb516897e
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/Library_sfx.mk1
-rw-r--r--sfx2/sdi/frmslots.sdi5
-rw-r--r--sfx2/sdi/sfx.sdi18
-rw-r--r--sfx2/source/dialog/dialog.src5
-rw-r--r--sfx2/source/inc/helpid.hrc1
-rw-r--r--sfx2/source/notebookbar/NotebookBarChildWindow.cxx31
6 files changed, 61 insertions, 0 deletions
diff --git a/sfx2/Library_sfx.mk b/sfx2/Library_sfx.mk
index 5ab2bb336903..a537e02cd50e 100644
--- a/sfx2/Library_sfx.mk
+++ b/sfx2/Library_sfx.mk
@@ -237,6 +237,7 @@ $(eval $(call gb_Library_add_exception_objects,sfx,\
sfx2/source/doc/templatedlg \
sfx2/source/explorer/nochaos \
sfx2/source/inet/inettbc \
+ sfx2/source/notebookbar/NotebookBarChildWindow \
sfx2/source/notify/eventsupplier \
sfx2/source/notify/globalevents \
sfx2/source/notify/hintpost \
diff --git a/sfx2/sdi/frmslots.sdi b/sfx2/sdi/frmslots.sdi
index 3d41c1c72d6a..03d52bb39fd6 100644
--- a/sfx2/sdi/frmslots.sdi
+++ b/sfx2/sdi/frmslots.sdi
@@ -43,6 +43,11 @@ interface Window
ExecMethod = ChildWindowExecute ;
StateMethod = ChildWindowState ;
]
+ SID_NOTEBOOKBAR // status(final|play)
+ [
+ ExecMethod = ChildWindowExecute ;
+ StateMethod = ChildWindowState ;
+ ]
SID_SHOW_BROWSER // ole(no) api(final/play/rec)
[
ExecMethod = ChildWindowExecute ;
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index b69f94d116c7..d41c7141338d 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -2606,6 +2606,24 @@ SfxBoolItem Sidebar SID_SIDEBAR
]
+SfxBoolItem Notebookbar SID_NOTEBOOKBAR
+[
+ AutoUpdate = TRUE,
+ FastCall = FALSE,
+ ReadOnlyDoc = TRUE,
+ Toggle = FALSE,
+ Container = FALSE,
+ RecordAbsolute = FALSE,
+ RecordPerSet;
+ Asynchron;
+
+ AccelConfig = TRUE,
+ MenuConfig = TRUE,
+ ToolBoxConfig = TRUE,
+ GroupId = GID_VIEW;
+]
+
+
SfxVoidItem RestoreEditingView SID_RESTORE_EDITING_VIEW
[
diff --git a/sfx2/source/dialog/dialog.src b/sfx2/source/dialog/dialog.src
index a3ed837987c8..1ed960d861bd 100644
--- a/sfx2/source/dialog/dialog.src
+++ b/sfx2/source/dialog/dialog.src
@@ -98,6 +98,11 @@ String SID_SIDEBAR
Text [ en-US ] = "Sidebar";
};
+String SID_NOTEBOOKBAR
+{
+ Text [ en-US ] = "Notebookbar";
+};
+
String STR_ERROR_WRONG_CONFIRM
{
Text [ en-US ] = "Faulty password confirmation";
diff --git a/sfx2/source/inc/helpid.hrc b/sfx2/source/inc/helpid.hrc
index 1794246c1be2..81e2dd00197e 100644
--- a/sfx2/source/inc/helpid.hrc
+++ b/sfx2/source/inc/helpid.hrc
@@ -61,6 +61,7 @@
#define HID_TASKPANE_VIEW_MENU "SFX2_HID_TASKPANE_VIEW_MENU"
#define HID_SIDEBAR_WINDOW "SFX2_HID_SIDEBAR_WINDOW"
+#define HID_NOTEBOOKBAR_WINDOW "SFX2_HID_NOTEBOOKBAR_WINDOW"
#endif // #ifndef _SFX_HELPID_HRC
diff --git a/sfx2/source/notebookbar/NotebookBarChildWindow.cxx b/sfx2/source/notebookbar/NotebookBarChildWindow.cxx
new file mode 100644
index 000000000000..7c5609bea793
--- /dev/null
+++ b/sfx2/source/notebookbar/NotebookBarChildWindow.cxx
@@ -0,0 +1,31 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include <sfx2/bindings.hxx>
+#include <sfx2/notebookbar/NotebookBarChildWindow.hxx>
+#include <sfx2/sfxsids.hrc>
+#include "helpid.hrc"
+#include <sfx2/dockwin.hxx>
+#include <sfx2/dispatch.hxx>
+
+using namespace sfx2;
+
+SFX_IMPL_DOCKINGWINDOW_WITHID(NotebookBarChildWindow, SID_NOTEBOOKBAR);
+
+NotebookBarChildWindow::NotebookBarChildWindow (vcl::Window* pParentWindow, sal_uInt16 nId,
+ SfxBindings* pBindings, SfxChildWinInfo*)
+ : SfxChildWindow(pParentWindow, nId)
+{
+ SfxFrame& rFrame = pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame();
+ VclPtr<vcl::Window> pNotebookBarWindow = rFrame.GetSystemWindow()->CreateNotebookBar("vcl/ui/notebookbar.ui", rFrame.GetFrameInterface());
+
+ pNotebookBarWindow->SetHelpId(HID_NOTEBOOKBAR_WINDOW);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */