[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - 2 commits - sc/source vcl/jsdialog vcl/source
sc/source/ui/cctrl/checklistmenu.cxx | 12 ++-- sc/source/ui/view/gridwin.cxx|8 +--- sc/source/ui/view/gridwin2.cxx |3 ++- sc/source/ui/view/tabview3.cxx |4 +++- vcl/jsdialog/jsdialogbuilder.cxx |1 - vcl/source/window/dockwin.cxx|5 - 6 files changed, 24 insertions(+), 9 deletions(-) New commits: commit 9419c2928a97d5c14be244dfdec51401b0487809 Author: Szymon Kłos AuthorDate: Mon Feb 28 19:34:22 2022 +0100 Commit: Szymon Kłos CommitDate: Fri Mar 4 12:29:21 2022 +0100 lok: run autofilter without timers so we are sure we will get correct position Change-Id: Idd218e19b8b3f3d6da67e325472e11b5661bc3b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130725 Tested-by: Jenkins CollaboraOffice Reviewed-by: Mert Tumer diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index c80c896f832f..e89fdbdb4df5 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -264,7 +264,10 @@ void ScCheckListMenuControl::queueLaunchSubMenu(size_t nPos, ScCheckListMenuWind maOpenTimer.mpSubMenu = pMenu; maOpenTimer.mnMenuPos = nPos; -maOpenTimer.maTimer.Start(); +if (comphelper::LibreOfficeKit::isActive()) +maOpenTimer.maTimer.Invoke(); +else +maOpenTimer.maTimer.Start(); } void ScCheckListMenuControl::queueCloseSubMenu() @@ -278,7 +281,10 @@ void ScCheckListMenuControl::queueCloseSubMenu() maCloseTimer.mpSubMenu = maOpenTimer.mpSubMenu; maCloseTimer.mnMenuPos = maOpenTimer.mnMenuPos; -maCloseTimer.maTimer.Start(); +if (comphelper::LibreOfficeKit::isActive()) +maOpenTimer.maTimer.Invoke(); +else +maCloseTimer.maTimer.Start(); } void ScCheckListMenuControl::launchSubMenu(bool bSetMenuPos) @@ -1403,6 +1409,8 @@ void ScCheckListMenuControl::launch(const tools::Rectangle& rRect) } StartPopupMode(aRect, FloatWinPopupFlags::Down); +if (comphelper::LibreOfficeKit::isActive()) +jsdialog::SendFullUpdate(std::to_string(mxFrame->GetLOKWindowId()), "toggle_all"); } void ScCheckListMenuControl::NotifyCloseLOK() diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index c449ad5b74ab..7608d722f237 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -618,7 +618,6 @@ JSInstanceBuilder::JSInstanceBuilder(vcl::Window* pParent, const OUString& rUIRo } initializeSender(GetNotifierWindow(), GetContentWindow(), GetTypeOfJSON()); -sendFullUpdate(); } JSInstanceBuilder* JSInstanceBuilder::CreateDialogBuilder(weld::Widget* pParent, commit 4b46b6376cbc1338ef18b6f85427a8c64c91ef87 Author: Szymon Kłos AuthorDate: Fri Feb 25 13:22:36 2022 +0100 Commit: Szymon Kłos CommitDate: Fri Mar 4 12:29:12 2022 +0100 lok: send logic autofilter position we need to show popup relative to the grid window Change-Id: Ib0cf66d2c0422b765a3b8035d5499b45e83f768d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130528 Tested-by: Jenkins CollaboraOffice Reviewed-by: Mert Tumer diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 826550e8f391..bd0cce8b5850 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -650,7 +650,7 @@ void ScGridWindow::LaunchAutoFilterMenu(SCCOL nCol, SCROW nRow) nSizeX = nSizeX / fZoomX; nSizeY = nSizeY / fZoomY; } -tools::Rectangle aCellRect(OutputToScreenPixel(aPos), Size(nSizeX, nSizeY)); +tools::Rectangle aCellRect(bLOKActive ? aPos : OutputToScreenPixel(aPos), Size(nSizeX, nSizeY)); ScDBData* pDBData = rDoc.GetDBAtCursor(nCol, nRow, nTab, ScDBDataPortion::AREA); if (!pDBData) @@ -905,7 +905,8 @@ void ScGridWindow::LaunchPageFieldMenu( SCCOL nCol, SCROW nRow ) Point aScrPos; Size aScrSize; getCellGeometry(aScrPos, aScrSize, mrViewData, nCol, nRow, eWhich); -DPLaunchFieldPopupMenu(OutputToScreenPixel(aScrPos), aScrSize, ScAddress(nCol-1, nRow, nTab), pDPObj); +bool bLOK = comphelper::LibreOfficeKit::isActive(); +DPLaunchFieldPopupMenu(bLOK ? aScrPos : OutputToScreenPixel(aScrPos), aScrSize, ScAddress(nCol-1, nRow, nTab), pDPObj); } void ScGridWindow::LaunchDPFieldMenu( SCCOL nCol, SCROW nRow ) @@ -918,7 +919,8 @@ void ScGridWindow::LaunchDPFieldMenu( SCCOL nCol, SCROW nRow ) Point aScrPos; Size aScrSize; getCellGeometry(aScrPos, aScrSize, mrViewData, nCol, nRow, eWhich); -DPLaunchFieldPopupMenu(OutputToScreenPixel(aScrPos), aScrSize, ScAddress(nCol, nRow, nTab), pDPObj); +bool bLOK = comphelper::LibreOfficeKit::isActive(); +DPLaunchFieldPopupMenu(bLOK ? aScrPos : OutputToScreenPixel(aScrPos), aScrSize, ScAddress(nCol, nRow, nTab), pDPObj); } void ScGridWindow::ShowFilterMenu(weld::Window* pParent, const tools::Rectangle& rCellRect,
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - 2 commits - sc/source vcl/jsdialog
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 AuthorDate: Thu Apr 22 10:16:55 2021 +0200 Commit: Szymon Kłos 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 Reviewed-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114749 Reviewed-by: Szymon Kłos 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 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::LongmnMaxY; boolbIsOkCancelMode; boolbInResize; -longnOldOutOffYPixel; }; class ScInputWindowWrapper : public SfxChildWindow commit 9b46e886acf8f77173dcdf15efdc846a351d061e Author: Szymon Kłos AuthorDate: Wed Apr 21 10:31:07 2021 +0200 Commit: Szymon Kłos 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 Reviewed-by: Mert Tumer Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114748 Reviewed-by: Szymon Kłos 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