summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2020-06-23 12:49:17 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2020-06-25 12:52:50 +0200
commite9123adc14068b57943da087f377a5c60e82c9c7 (patch)
tree28c3353c9c4b2ee54405a3011654a51c18a7d2ed /sfx2
parent58750ad38fc1e9809cc4febebf218c95845dfe05 (diff)
jsdialog: get widget depending on viewshell
Notebookbar always gets window id 0 what causes conflict in map and some widgets doesn't work Change-Id: I15b4e83d385e83bcf898148a871ddf540257cc81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97099 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/notebookbar/SfxNotebookBar.cxx4
-rw-r--r--sfx2/source/notebookbar/WeldedTabbedNotebookbar.cxx4
2 files changed, 5 insertions, 3 deletions
diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx
index 1d01cabcb968..1e33810e552d 100644
--- a/sfx2/source/notebookbar/SfxNotebookBar.cxx
+++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx
@@ -392,10 +392,12 @@ bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow,
bool hasWeldedWrapper = m_pNotebookBarWeldedWrapper.find(pViewShell) != m_pNotebookBarWeldedWrapper.end();
if ((!hasWeldedWrapper || bReloadNotebookbar) && pNotebookBar->IsWelded())
{
+ sal_uInt64 nWindowId = reinterpret_cast<sal_uInt64>(pViewShell);
m_pNotebookBarWeldedWrapper.emplace(std::make_pair(pViewShell,
new WeldedTabbedNotebookbar(pNotebookBar->GetMainContainer(),
pNotebookBar->GetUIFilePath(),
- xFrame)));
+ xFrame,
+ nWindowId)));
pNotebookBar->SetDisposeCallback(LINK(nullptr, SfxNotebookBar, VclDisposeHdl), pViewShell);
}
diff --git a/sfx2/source/notebookbar/WeldedTabbedNotebookbar.cxx b/sfx2/source/notebookbar/WeldedTabbedNotebookbar.cxx
index f5bb4ee99a6e..baa4e598a554 100644
--- a/sfx2/source/notebookbar/WeldedTabbedNotebookbar.cxx
+++ b/sfx2/source/notebookbar/WeldedTabbedNotebookbar.cxx
@@ -13,9 +13,9 @@
WeldedTabbedNotebookbar::WeldedTabbedNotebookbar(
VclPtr<vcl::Window>& pContainerWindow, const OUString& rUIFilePath,
- const css::uno::Reference<css::frame::XFrame>& rFrame)
+ const css::uno::Reference<css::frame::XFrame>& rFrame, sal_uInt64 nWindowId)
: m_xBuilder(new JSInstanceBuilder(pContainerWindow, VclBuilderContainer::getUIRootDir(),
- rUIFilePath, rFrame))
+ rUIFilePath, rFrame, nWindowId))
{
m_xContainer = m_xBuilder->weld_container("NotebookBar");
m_xNotebook = m_xBuilder->weld_notebook("ContextContainer");