summaryrefslogtreecommitdiff
path: root/desktop/source
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-07-03 12:13:39 +0200
commit9eaaf3b7e1d55d064c0518cbbb7bb724e219e10a (patch)
tree89f24ef15a4c0cf3e3707b2f305eb01d7454c60e /desktop/source
parent645021ad49628319423ad29d866d7adb3aee9d97 (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> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97816 Tested-by: Jenkins
Diffstat (limited to 'desktop/source')
-rw-r--r--desktop/source/lib/init.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 2f14c8ab2518..6e25e8c71b7a 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3623,6 +3623,10 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nWin
{
OString sControlId = OUStringToOString(aMap["id"], RTL_TEXTENCODING_ASCII_US);
weld::Widget* pWidget = jsdialog::FindWeldWidgetsMap(nWindowId, sControlId);
+ if (!pWidget && nWindowId == 0)
+ {
+ pWidget = jsdialog::FindWeldWidgetsMap(reinterpret_cast<sal_uInt64>(SfxViewShell::Current()), sControlId);
+ }
bIsWeldedDialog = pWidget != nullptr;
bool bContinueWithLOKWindow = false;