sc/source/ui/app/inputwin.cxx | 10 +--------- sc/source/ui/inc/inputwin.hxx | 1 - vcl/jsdialog/executor.cxx | 22 +++++++++++++++++++--- 3 files changed, 20 insertions(+), 13 deletions(-)
New commits: commit a04b8138e27b086e7c7ae29f7b4d42251a71426e Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Thu Apr 22 10:16:55 2021 +0200 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Tue Apr 27 17:22:34 2021 +0200 Revert ScInputWindow::setPosSizePixel() early returns Revert changes that were introduced to fix CollaboraOnline/online#1988 because it should be fixed in online The root cause was that online was sending "resizewindow" even when size was not changed what was triggering many times ScInputWindow::setPosSizePixel(). (before online fix "resizewindow" message was sent on every sidebar refresh) "Fix early return in ScInputWindow::setPosSizePixel" reverts commit a9e0bbadb151d6cfe652fad1d49147f559a6d83c. "Early return from ScInputWindow::setPosSizePixel() if no-op" reverts commit 0ad467d9abd27197bc5f7f22db5a25b3246e6808. Change-Id: Iad1c3d427a5feefdbb2bac912710847addf4ee02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114474 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Tor Lillqvist <t...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114749 Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 6c6fd824e8e6..17412e85521b 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -159,8 +159,7 @@ ScInputWindow::ScInputWindow( vcl::Window* pParent, const SfxBindings* pBind ) : mpViewShell ( nullptr ), mnMaxY (0), bIsOkCancelMode ( false ), - bInResize ( false ), - nOldOutOffYPixel( GetOutOffYPixel() ) + bInResize ( false ) { // #i73615# don't rely on SfxViewShell::Current while constructing the input line // (also for GetInputHdl below) @@ -478,11 +477,6 @@ void ScInputWindow::SetSizePixel( const Size& rNewSize ) void ScInputWindow::setPosSizePixel(tools::Long nX, tools::Long nY, tools::Long nWidth, tools::Long nHeight, PosSizeFlags nFlags) { ToolBox::setPosSizePixel(nX, nY, nWidth, nHeight, nFlags); - - // send update only when position changed eg. when notebookbar was opened - if (nOldOutOffYPixel == GetOutOffYPixel()) - return; - if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier()) { std::vector<vcl::LOKPayloadItem> aItems; @@ -491,8 +485,6 @@ void ScInputWindow::setPosSizePixel(tools::Long nX, tools::Long nY, tools::Long aItems.emplace_back("lines", OString::number(mxTextWindow->GetNumLines())); pNotifier->notifyWindow(GetLOKWindowId(), "size_changed", aItems); } - - nOldOutOffYPixel = GetOutOffYPixel(); } void ScInputWindow::Resize() diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx index e8efe9187b82..db4da6e6b691 100644 --- a/sc/source/ui/inc/inputwin.hxx +++ b/sc/source/ui/inc/inputwin.hxx @@ -352,7 +352,6 @@ private: tools::Long mnMaxY; bool bIsOkCancelMode; bool bInResize; - long nOldOutOffYPixel; }; class ScInputWindowWrapper : public SfxChildWindow commit 9b46e886acf8f77173dcdf15efdc846a351d061e Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Wed Apr 21 10:31:07 2021 +0200 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Tue Apr 27 17:22:25 2021 +0200 jsdialog: handle response buttons Change-Id: I4e8efc4ef2d27e655208ff505167da8360f91a6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114379 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Mert Tumer <mert.tu...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114748 Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx index 5578efbf20a8..32a257580a90 100644 --- a/vcl/jsdialog/executor.cxx +++ b/vcl/jsdialog/executor.cxx @@ -49,11 +49,27 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& rWidget, StringMap& rDat { weld::Widget* pWidget = JSInstanceBuilder::FindWeldWidgetsMap(nWindowId, rWidget); - if (pWidget != nullptr) + OUString sControlType = rData["type"]; + OUString sAction = rData["cmd"]; + + if (sControlType == "responsebutton") { - OUString sControlType = rData["type"]; - OUString sAction = rData["cmd"]; + if (pWidget == nullptr) + { + // welded wrapper not found - use response code instead + pWidget = JSInstanceBuilder::FindWeldWidgetsMap(nWindowId, "__DIALOG__"); + sControlType = "dialog"; + sAction = "response"; + } + else + { + // welded wrapper for button found - use it + sControlType = "pushbutton"; + } + } + if (pWidget != nullptr) + { if (sControlType == "tabcontrol") { auto pNotebook = dynamic_cast<weld::Notebook*>(pWidget); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits