summaryrefslogtreecommitdiff
path: root/desktop
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 /desktop
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 'desktop')
-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 a0767ad4c301..f5631188a841 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -3604,6 +3604,10 @@ static void doc_sendDialogEvent(LibreOfficeKitDocument* /*pThis*/, unsigned nWin
{
OString sControlId = OUStringToOString(aMap["id"], RTL_TEXTENCODING_ASCII_US);
weld::Widget* pWidget = JSInstanceBuilder::FindWeldWidgetsMap(nWindowId, sControlId);
+ if (!pWidget && nWindowId == 0)
+ {
+ pWidget = JSInstanceBuilder::FindWeldWidgetsMap(reinterpret_cast<sal_uInt64>(SfxViewShell::Current()), sControlId);
+ }
bIsWeldedDialog = pWidget != nullptr;
bool bContinueWithLOKWindow = false;