diff options
-rw-r--r-- | include/sfx2/notebookbar/SfxNotebookBar.hxx | 2 | ||||
-rw-r--r-- | include/vcl/WeldedTabbedNotebookbar.hxx | 4 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/notebookbar_online.ui | 12 | ||||
-rw-r--r-- | sd/uiconfig/sdraw/ui/notebookbar_online.ui | 16 | ||||
-rw-r--r-- | sd/uiconfig/simpress/ui/notebookbar_online.ui | 16 | ||||
-rw-r--r-- | sfx2/source/notebookbar/SfxNotebookBar.cxx | 13 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/notebookbar_online.ui | 16 | ||||
-rw-r--r-- | vcl/source/control/WeldedTabbedNotebookbar.cxx | 1 |
8 files changed, 76 insertions, 4 deletions
diff --git a/include/sfx2/notebookbar/SfxNotebookBar.hxx b/include/sfx2/notebookbar/SfxNotebookBar.hxx index 7bf34d1cbf7e..cd94ddad7b1e 100644 --- a/include/sfx2/notebookbar/SfxNotebookBar.hxx +++ b/include/sfx2/notebookbar/SfxNotebookBar.hxx @@ -33,6 +33,7 @@ class SfxBindings; class SfxViewFrame; class SfxViewShell; class SystemWindow; +class ToolbarUnoDispatcher; class WeldedTabbedNotebookbar; namespace sfx2 @@ -74,6 +75,7 @@ public: private: static bool m_bLock; static bool m_bHide; + static std::unique_ptr<ToolbarUnoDispatcher> m_xCalcToolboxDispatcher; static std::map<const SfxViewShell*, std::shared_ptr<WeldedTabbedNotebookbar>> m_pNotebookBarWeldedWrapper; diff --git a/include/vcl/WeldedTabbedNotebookbar.hxx b/include/vcl/WeldedTabbedNotebookbar.hxx index 073902f2d166..a1fffdd6dd39 100644 --- a/include/vcl/WeldedTabbedNotebookbar.hxx +++ b/include/vcl/WeldedTabbedNotebookbar.hxx @@ -23,12 +23,16 @@ class VCL_DLLPUBLIC WeldedTabbedNotebookbar std::unique_ptr<weld::Builder> m_xBuilder; std::unique_ptr<weld::Container> m_xContainer; + std::unique_ptr<weld::Toolbar> m_xWeldedToolbar; public: WeldedTabbedNotebookbar(const VclPtr<vcl::Window>& pContainerWindow, const OUString& rUIFilePath, const css::uno::Reference<css::frame::XFrame>& rFrame, sal_uInt64 nWindowId); + + weld::Toolbar& getWeldedToolbar() { return *m_xWeldedToolbar; } + weld::Builder& getBuilder() { return *m_xBuilder; } }; #endif // INCLUDED_SFX2_NOTEBOOKBAR_SFXNOTEBOOKBAR_HXX diff --git a/sc/uiconfig/scalc/ui/notebookbar_online.ui b/sc/uiconfig/scalc/ui/notebookbar_online.ui index adf29a1ab43c..599bef675503 100644 --- a/sc/uiconfig/scalc/ui/notebookbar_online.ui +++ b/sc/uiconfig/scalc/ui/notebookbar_online.ui @@ -58,7 +58,7 @@ </packing> </child> <child> - <object class="sfxlo-NotebookbarToolBox" id="SectionBottom127"> + <object class="GtkToolbar" id="WeldedToolbar"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="toolbar_style">icons</property> @@ -73,6 +73,16 @@ <property name="homogeneous">True</property> </packing> </child> + <child> + <object class="GtkMenuToolButton" id="NumberFormatCurrency"> + <property name="visible">True</property> + <property name="action_name">.uno:NumberFormatCurrency</property> + </object> + <packing> + <property name="expand">True</property> + <property name="homogeneous">True</property> + </packing> + </child> </object> <packing> <property name="expand">False</property> diff --git a/sd/uiconfig/sdraw/ui/notebookbar_online.ui b/sd/uiconfig/sdraw/ui/notebookbar_online.ui index 223eedce4c97..7fe79d180a0f 100644 --- a/sd/uiconfig/sdraw/ui/notebookbar_online.ui +++ b/sd/uiconfig/sdraw/ui/notebookbar_online.ui @@ -57,6 +57,22 @@ <property name="position">1</property> </packing> </child> + <child> + <object class="GtkToolbar" id="WeldedToolbar"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="toolbar_style">icons</property> + <property name="show_arrow">False</property> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> </object> <packing> <property name="left_attach">0</property> diff --git a/sd/uiconfig/simpress/ui/notebookbar_online.ui b/sd/uiconfig/simpress/ui/notebookbar_online.ui index 223eedce4c97..7fe79d180a0f 100644 --- a/sd/uiconfig/simpress/ui/notebookbar_online.ui +++ b/sd/uiconfig/simpress/ui/notebookbar_online.ui @@ -57,6 +57,22 @@ <property name="position">1</property> </packing> </child> + <child> + <object class="GtkToolbar" id="WeldedToolbar"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="toolbar_style">icons</property> + <property name="show_arrow">False</property> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> </object> <packing> <property name="left_attach">0</property> diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx index 8e9c2c9ca494..9c33b3ef5fb9 100644 --- a/sfx2/source/notebookbar/SfxNotebookBar.cxx +++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx @@ -14,6 +14,7 @@ #include <vcl/syswin.hxx> #include <sfx2/viewfrm.hxx> #include <sfx2/sfxsids.hrc> +#include <sfx2/weldutils.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/lok.hxx> #include <com/sun/star/frame/UnknownModuleException.hpp> @@ -41,6 +42,7 @@ const char MERGE_NOTEBOOKBAR_URL[] = "URL"; bool SfxNotebookBar::m_bLock = false; bool SfxNotebookBar::m_bHide = false; +std::unique_ptr<ToolbarUnoDispatcher> SfxNotebookBar::m_xCalcToolboxDispatcher; std::map<const SfxViewShell*, std::shared_ptr<WeldedTabbedNotebookbar>> SfxNotebookBar::m_pNotebookBarWeldedWrapper; std::map<const SfxViewShell*, VclPtr<NotebookBar>> SfxNotebookBar::m_pNotebookBarInstance; @@ -440,13 +442,18 @@ bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow, assert(pNotebookBar->IsWelded()); sal_uInt64 nWindowId = reinterpret_cast<sal_uInt64>(pViewShell); - m_pNotebookBarWeldedWrapper.emplace(std::make_pair(pViewShell, - new WeldedTabbedNotebookbar(pNotebookBar->GetMainContainer(), + WeldedTabbedNotebookbar* pWrapper = new WeldedTabbedNotebookbar(pNotebookBar->GetMainContainer(), pNotebookBar->GetUIFilePath(), xFrame, - nWindowId))); + nWindowId); + m_pNotebookBarWeldedWrapper.emplace(std::make_pair(pViewShell, pWrapper)); pNotebookBar->SetDisposeCallback(LINK(nullptr, SfxNotebookBar, VclDisposeHdl), pViewShell); + // TODO: this has to be per instance!!! like m_pNotebookBarWeldedWrapper + // TODO: create LOK Notebookbar Instance manager which will encapsulate in single place all of these... + SfxNotebookBar::m_xCalcToolboxDispatcher.reset( + new ToolbarUnoDispatcher(pWrapper->getWeldedToolbar(), pWrapper->getBuilder(), xFrame)); + return true; } diff --git a/sw/uiconfig/swriter/ui/notebookbar_online.ui b/sw/uiconfig/swriter/ui/notebookbar_online.ui index 86930c1e79ba..9a42f38d151c 100644 --- a/sw/uiconfig/swriter/ui/notebookbar_online.ui +++ b/sw/uiconfig/swriter/ui/notebookbar_online.ui @@ -82,6 +82,22 @@ <property name="position">0</property> </packing> </child> + <child> + <object class="GtkToolbar" id="WeldedToolbar"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="toolbar_style">icons</property> + <property name="show_arrow">False</property> + <child> + <placeholder/> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> </object> <packing> <property name="left_attach">0</property> diff --git a/vcl/source/control/WeldedTabbedNotebookbar.cxx b/vcl/source/control/WeldedTabbedNotebookbar.cxx index 1a3311de9f5b..1b9eef3756e0 100644 --- a/vcl/source/control/WeldedTabbedNotebookbar.cxx +++ b/vcl/source/control/WeldedTabbedNotebookbar.cxx @@ -18,6 +18,7 @@ WeldedTabbedNotebookbar::WeldedTabbedNotebookbar( pContainerWindow, AllSettings::GetUIRootDir(), rUIFilePath, rFrame, nWindowId)) { m_xContainer = m_xBuilder->weld_container("NotebookBar"); + m_xWeldedToolbar = m_xBuilder->weld_toolbar("WeldedToolbar"); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |