vcl/inc/jsdialog/jsdialogbuilder.hxx | 4 ++++ vcl/jsdialog/enabled.cxx | 6 ++++-- vcl/jsdialog/jsdialogbuilder.cxx | 16 +++++++++++++++- 3 files changed, 23 insertions(+), 3 deletions(-)
New commits: commit 2a5f0acacad765f2e25f2b9974b979b2b3a9d0cb Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Mon Nov 22 10:50:03 2021 +0100 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Tue Feb 1 10:27:08 2022 +0100 jsdialog: send popup when launched using Popover widget - enable validity listbox in online - flush when sending close popup to be sure it is sent Signed-off-by: Szymon Kłos <szymon.k...@collabora.com> Change-Id: Icf33e26c48b78ab60030a7395e8c7ee5462fbf7c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125647 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Jan Holesovsky <ke...@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129168 diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index 5495aeb306fb..6c773312c3d0 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -683,6 +683,10 @@ class JSPopover : public JSWidget<SalInstancePopover, DockingWindow> public: JSPopover(JSDialogSender* pSender, DockingWindow* pPopover, SalInstanceBuilder* pBuilder, bool bTakeOwnership); + + virtual void popup_at_rect(weld::Widget* pParent, const tools::Rectangle& rRect, + weld::Placement ePlace = weld::Placement::Under) override; + virtual void popdown() override; }; class JSBox : public JSWidget<SalInstanceBox, VclBox> diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx index e51b44493527..d39833c71d84 100644 --- a/vcl/jsdialog/enabled.cxx +++ b/vcl/jsdialog/enabled.cxx @@ -49,7 +49,8 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool bMobile) || rUIFile == u"modules/scalc/ui/pivotfielddialog.ui" || rUIFile == u"modules/scalc/ui/datafieldoptionsdialog.ui" || rUIFile == u"svx/ui/fontworkgallerydialog.ui" - || rUIFile == u"cui/ui/macroselectordialog.ui" || rUIFile == u"uui/ui/macrowarnmedium.ui" + || rUIFile == u"svx/ui/findreplacedialog.ui" || rUIFile == u"cui/ui/macroselectordialog.ui" + || rUIFile == u"uui/ui/macrowarnmedium.ui" || rUIFile == u"modules/scalc/ui/textimportcsv.ui" || rUIFile == u"xmlsec/ui/digitalsignaturesdialog.ui" || rUIFile == u"xmlsec/ui/viewcertdialog.ui" || rUIFile == u"xmlsec/ui/certgeneral.ui" @@ -73,7 +74,8 @@ bool isBuilderEnabledForPopup(std::u16string_view rUIFile) || rUIFile == u"svx/ui/floatinglineend.ui" || rUIFile == u"svx/ui/fontworkalignmentcontrol.ui" || rUIFile == u"svx/ui/fontworkcharacterspacingcontrol.ui" - || rUIFile == u"svx/ui/floatingareastyle.ui") + || rUIFile == u"svx/ui/floatingareastyle.ui" + || rUIFile == u"modules/scalc/ui/filterlist.ui") return true; return false; diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index c7d4c1e69dea..8c15f50ba78d 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -373,7 +373,7 @@ void JSDialogSender::sendClosePopup(vcl::LOKWindowId nWindowId) std::unique_ptr<ActionDataMap> pData = std::make_unique<ActionDataMap>(); (*pData)[WINDOW_ID] = OUString::number(nWindowId); mpIdleNotify->sendMessage(jsdialog::MessageType::PopupClose, nullptr, std::move(pData)); - mpIdleNotify->Start(); + flush(); } namespace @@ -1704,6 +1704,20 @@ JSPopover::JSPopover(JSDialogSender* pSender, DockingWindow* pDockingWindow, { } +void JSPopover::popup_at_rect(weld::Widget* pParent, const tools::Rectangle& rRect, + weld::Placement ePlace) +{ + SalInstancePopover::popup_at_rect(pParent, rRect, ePlace); + sendPopup(getWidget()->GetChild(0), "_POPOVER_", "_POPOVER_"); +} + +void JSPopover::popdown() +{ + if (getWidget() && getWidget()->GetChild(0)) + sendClosePopup(getWidget()->GetChild(0)->GetLOKWindowId()); + SalInstancePopover::popdown(); +} + JSBox::JSBox(JSDialogSender* pSender, VclBox* pBox, SalInstanceBuilder* pBuilder, bool bTakeOwnership) : JSWidget<SalInstanceBox, VclBox>(pSender, pBox, pBuilder, bTakeOwnership)