diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2021-11-22 10:50:03 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2021-11-23 15:53:29 +0100 |
commit | acaad9f08a9dc24b28eb634b1da9f3f4599635e8 (patch) | |
tree | c39c4cf2179a20c683a6fc430f0a21c2e217f7d4 /vcl | |
parent | a1571c111fb4bd8ba466dc9026c22e58351625f1 (diff) |
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.klos@collabora.com>
Change-Id: Icf33e26c48b78ab60030a7395e8c7ee5462fbf7c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125647
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/jsdialog/jsdialogbuilder.hxx | 3 | ||||
-rw-r--r-- | vcl/jsdialog/enabled.cxx | 5 | ||||
-rw-r--r-- | vcl/jsdialog/jsdialogbuilder.cxx | 15 |
3 files changed, 19 insertions, 4 deletions
diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index ccd2489d797b..12305d05d424 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -680,6 +680,9 @@ 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) override; + virtual void popdown() override; }; class JSBox : public JSWidget<SalInstanceBox, VclBox> diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx index 0004e673a5a6..e06e59a6c68b 100644 --- a/vcl/jsdialog/enabled.cxx +++ b/vcl/jsdialog/enabled.cxx @@ -50,8 +50,7 @@ bool isBuilderEnabled(const OUString& rUIFile, bool bMobile) || rUIFile == "modules/scalc/ui/datafielddialog.ui" || rUIFile == "modules/scalc/ui/pivotfielddialog.ui" || rUIFile == "modules/scalc/ui/datafieldoptionsdialog.ui" - || rUIFile == "svx/ui/fontworkgallerydialog.ui" - || rUIFile == "svx/ui/findreplacedialog.ui" + || rUIFile == "svx/ui/fontworkgallerydialog.ui" || rUIFile == "svx/ui/findreplacedialog.ui" || rUIFile == "cui/ui/macroselectordialog.ui" || rUIFile == "uui/ui/macrowarnmedium.ui" || rUIFile == "modules/scalc/ui/textimportcsv.ui" || rUIFile == "xmlsec/ui/digitalsignaturesdialog.ui" @@ -75,7 +74,7 @@ bool isBuilderEnabledForPopup(const OUString& rUIFile) || rUIFile == "svx/ui/floatinglineproperty.ui" || rUIFile == "svx/ui/floatinglinestyle.ui" || rUIFile == "svx/ui/floatinglineend.ui" || rUIFile == "svx/ui/fontworkalignmentcontrol.ui" || rUIFile == "svx/ui/fontworkcharacterspacingcontrol.ui" - || rUIFile == "svx/ui/floatingareastyle.ui") + || rUIFile == "svx/ui/floatingareastyle.ui" || rUIFile == "modules/scalc/ui/filterlist.ui") return true; return false; diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index 6bee71f4d71a..8268b3a6b524 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -380,7 +380,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 @@ -1709,6 +1709,19 @@ JSPopover::JSPopover(JSDialogSender* pSender, DockingWindow* pDockingWindow, { } +void JSPopover::popup_at_rect(weld::Widget* pParent, const tools::Rectangle& rRect) +{ + SalInstancePopover::popup_at_rect(pParent, rRect); + 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) |