summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2020-06-18 12:15:13 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2020-06-24 11:36:44 +0200
commit0c61db374f90c78f5cb6984fae643437bc77541a (patch)
treeadb271fe552a4e52c13b2bf8035581b5665467a7 /include
parentc20025db4a7e57f26562e6b70b2a6e8263588568 (diff)
notebookbar: allow to create multiple instances for online
Change-Id: Ic8a3d07ec6ec5a5d6d56a3958e91d3074ce1493e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96936 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/sfx2/notebookbar/SfxNotebookBar.hxx7
-rw-r--r--include/vcl/notebookbar.hxx6
2 files changed, 9 insertions, 4 deletions
diff --git a/include/sfx2/notebookbar/SfxNotebookBar.hxx b/include/sfx2/notebookbar/SfxNotebookBar.hxx
index 4fbda295cace..53d028bcd9b8 100644
--- a/include/sfx2/notebookbar/SfxNotebookBar.hxx
+++ b/include/sfx2/notebookbar/SfxNotebookBar.hxx
@@ -12,12 +12,14 @@
#include <sfx2/dllapi.h>
#include <rtl/ustring.hxx>
+#include <map>
namespace com::sun::star::frame { class XFrame; }
namespace com::sun::star::uno { template <typename > class Reference; }
class SfxBindings;
class SfxViewFrame;
+class SfxViewShell;
class SystemWindow;
class WeldedTabbedNotebookbar;
@@ -60,9 +62,10 @@ public:
private:
static bool m_bLock;
static bool m_bHide;
- static std::unique_ptr<WeldedTabbedNotebookbar> m_pNotebookBarWeldedWrapper;
- DECL_STATIC_LINK(SfxNotebookBar, VclDisposeHdl, const void*, void);
+ static std::map<const SfxViewShell*, std::shared_ptr<WeldedTabbedNotebookbar>> m_pNotebookBarWeldedWrapper;
+
+ DECL_STATIC_LINK(SfxNotebookBar, VclDisposeHdl, const SfxViewShell*, void);
};
} // namespace sfx2
diff --git a/include/vcl/notebookbar.hxx b/include/vcl/notebookbar.hxx
index 3b4fa740e779..b4a75e3325dc 100644
--- a/include/vcl/notebookbar.hxx
+++ b/include/vcl/notebookbar.hxx
@@ -21,6 +21,7 @@ namespace com { namespace sun { namespace star { namespace ui { class XContextCh
class NotebookbarContextControl;
class SystemWindow;
+class SfxViewShell;
/// This implements Widget Layout-based notebook-like menu bar.
class VCL_DLLPUBLIC NotebookBar final : public Control, public VclBuilderContainer
@@ -50,7 +51,7 @@ public:
bool IsWelded() { return m_bIsWelded; }
VclPtr<vcl::Window>& GetMainContainer() { return m_xVclContentArea; }
OUString GetUIFilePath() { return m_sUIXMLDescription; }
- void SetDisposeCallback(const Link<const void*, void> rDisposeCallback);
+ void SetDisposeCallback(const Link<const SfxViewShell*, void> rDisposeCallback, const SfxViewShell* pViewShell);
private:
VclPtr<SystemWindow> m_pSystemWindow;
@@ -58,11 +59,12 @@ private:
std::set<css::uno::Reference<css::frame::XController>> m_alisteningControllers;
std::vector<NotebookbarContextControl*> m_pContextContainers;
css::uno::Reference<css::frame::XFrame> mxFrame;
+ const SfxViewShell* m_pViewShell;
VclPtr<vcl::Window> m_xVclContentArea;
bool m_bIsWelded;
OUString m_sUIXMLDescription;
- Link<const void*, void> m_rDisposeLink;
+ Link<const SfxViewShell*, void> m_rDisposeLink;
AllSettings DefaultSettings;
AllSettings PersonaSettings;