summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2020-06-25 12:48:51 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2020-07-03 14:49:46 +0200
commit16ab6e5b162641e5dc0ba6c0664aa8de50bf8e53 (patch)
tree3f6fd411a17ef6e064074271425f8779d95b5a3f /vcl/source
parent126c5e57d732359788010d6a364a5011d2e4a8c8 (diff)
notebookbar: remember LOKWindowId in interim builders
In case of notebookbar we need to remember the same id in every builder for each view to be able to use interim widgets. Then widgets are added to the same map as main notebookbar widgets. SfxViewShell is used as a common id as it is easily accessible. Change-Id: I4fbf2da320396efc80b08bcee9e341c165b1a290 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97199 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97834 Tested-by: Jenkins
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/app/salvtables.cxx2
-rw-r--r--vcl/source/control/InterimItemWindow.cxx5
-rw-r--r--vcl/source/window/builder.cxx6
3 files changed, 7 insertions, 6 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 4ea4d1b568d9..6e1bac5e91b3 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -6768,7 +6768,7 @@ weld::Builder* SalInstance::CreateBuilder(weld::Widget* pParent, const OUString&
}
weld::Builder* SalInstance::CreateInterimBuilder(vcl::Window* pParent, const OUString& rUIRoot,
- const OUString& rUIFile)
+ const OUString& rUIFile, sal_uInt64)
{
return new SalInstanceBuilder(pParent, rUIRoot, rUIFile);
}
diff --git a/vcl/source/control/InterimItemWindow.cxx b/vcl/source/control/InterimItemWindow.cxx
index f9f54d757fd5..67554e226b5b 100644
--- a/vcl/source/control/InterimItemWindow.cxx
+++ b/vcl/source/control/InterimItemWindow.cxx
@@ -11,12 +11,13 @@
#include <vcl/layout.hxx>
InterimItemWindow::InterimItemWindow(vcl::Window* pParent, const OUString& rUIXMLDescription,
- const OString& rID)
+ const OString& rID, sal_uInt64 nLOKWindowId)
: Control(pParent, WB_TABSTOP | WB_DIALOGCONTROL)
{
m_xVclContentArea = VclPtr<VclVBox>::Create(this);
m_xVclContentArea->Show();
- m_xBuilder.reset(Application::CreateInterimBuilder(m_xVclContentArea, rUIXMLDescription));
+ m_xBuilder.reset(
+ Application::CreateInterimBuilder(m_xVclContentArea, rUIXMLDescription, nLOKWindowId));
m_xContainer = m_xBuilder->weld_container(rID);
SetBackground();
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 3e1b71105a2c..422babaae27a 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -172,16 +172,16 @@ weld::Builder* Application::CreateBuilder(weld::Widget* pParent, const OUString
return ImplGetSVData()->mpDefInst->CreateBuilder(pParent, VclBuilderContainer::getUIRootDir(), rUIFile);
}
-weld::Builder* Application::CreateInterimBuilder(vcl::Window* pParent, const OUString &rUIFile)
+weld::Builder* Application::CreateInterimBuilder(vcl::Window* pParent, const OUString &rUIFile, sal_uInt64 nLOKWindowId)
{
if (comphelper::LibreOfficeKit::isActive()
&& (rUIFile == "svx/ui/stylespreview.ui"
|| rUIFile == "modules/scalc/ui/numberbox.ui"))
{
- return new JSInstanceBuilder(pParent, VclBuilderContainer::getUIRootDir(), rUIFile, css::uno::Reference<css::frame::XFrame>());
+ return new JSInstanceBuilder(pParent, VclBuilderContainer::getUIRootDir(), rUIFile, css::uno::Reference<css::frame::XFrame>(), nLOKWindowId);
}
- return ImplGetSVData()->mpDefInst->CreateInterimBuilder(pParent, VclBuilderContainer::getUIRootDir(), rUIFile);
+ return ImplGetSVData()->mpDefInst->CreateInterimBuilder(pParent, VclBuilderContainer::getUIRootDir(), rUIFile, nLOKWindowId);
}
weld::MessageDialog* Application::CreateMessageDialog(weld::Widget* pParent, VclMessageType eMessageType,