core.git: Branch 'distro/collabora/co-22.05' - vcl/jsdialog
vcl/jsdialog/enabled.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit e8ca2d11cf62d78ba1bc3aa9afb57b010a9002cf Author: Jaume Pujantell AuthorDate: Mon Jan 8 17:20:28 2024 +0100 Commit: Miklos Vajna CommitDate: Thu Jan 11 13:46:48 2024 +0100 cool#7996 enable jsdialog for font page in document properties The checkboxes of font page on the document properties dialog were not saving the changes after pressing ok. Change-Id: I5e7d16de267dd5d6874a84b518f6ec769db4fcc2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161795 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna (cherry picked from commit 545d512a5f7b866696b3a4dfc0e00748029d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161862 diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx index 6969dace6f58..986769af39e8 100644 --- a/vcl/jsdialog/enabled.cxx +++ b/vcl/jsdialog/enabled.cxx @@ -85,6 +85,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool bMobile) || rUIFile == u"sfx/ui/custominfopage.ui" || rUIFile == u"sfx/ui/descriptioninfopage.ui" || rUIFile == u"sfx/ui/documentinfopage.ui" +|| rUIFile == u"sfx/ui/documentfontspage.ui" || rUIFile == u"sfx/ui/documentpropertiesdialog.ui" || rUIFile == u"sfx/ui/editdurationdialog.ui" || rUIFile == u"sfx/ui/linefragment.ui"
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - vcl/jsdialog
vcl/jsdialog/jsdialogbuilder.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit 196079fe57de17ee5e635064f6eb9be30b6efb09 Author: Szymon Kłos AuthorDate: Thu Feb 2 11:57:48 2023 +0100 Commit: Aron Budea CommitDate: Fri Feb 3 04:00:19 2023 + jsdialog: weld all message boxes This fixes regression from: commit 9785cebe4cfdc296143757da6098a74b0252c618 jsdialog: fix validation error dialog in Calc When inserting autofilter without header data - message box should appear Change-Id: Id5d26604a67f43700310cc0f51954b886c9de0f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146495 Reviewed-by: Henry Castro Tested-by: Jenkins CollaboraOffice diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index 7d8579ba7483..3998ddf0e130 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -1184,8 +1184,7 @@ weld::MessageDialog* JSInstanceBuilder::CreateMessageDialog(weld::Widget* pParen else SAL_WARN("vcl", "No notifier in JSInstanceBuilder::CreateMessageDialog"); -// fallback -return new SalInstanceMessageDialog(xMessageDialog, nullptr, true); +return new JSMessageDialog(xMessageDialog, nullptr, true); } JSDialog::JSDialog(JSDialogSender* pSender, ::Dialog* pDialog, SalInstanceBuilder* pBuilder,
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - vcl/jsdialog
vcl/jsdialog/enabled.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 23e6f05a8ee80c33dd624dd6582f26b3dcf8f490 Author: Gökay Şatır AuthorDate: Fri Jan 20 12:06:47 2023 +0300 Commit: Gökay ŞATIR CommitDate: Fri Jan 20 17:48:55 2023 + Add dropdownfielddialog.ui to JSON dialogues. Signed-off-by: Gökay Şatır Change-Id: I4cfc792f0b1269936723285cc5ff1324bc22c161 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145871 Reviewed-by: Szymon Kłos Tested-by: Jenkins CollaboraOffice diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx index bc0a6f65f59b..bc53c8c3a45c 100644 --- a/vcl/jsdialog/enabled.cxx +++ b/vcl/jsdialog/enabled.cxx @@ -78,6 +78,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool bMobile) || rUIFile == u"modules/swriter/ui/splittable.ui" || rUIFile == u"modules/swriter/ui/translationdialog.ui" || rUIFile == u"modules/swriter/ui/pagenumberdlg.ui" +|| rUIFile == u"modules/swriter/ui/dropdownfielddialog.ui" // sfx || rUIFile == u"sfx/ui/cmisinfopage.ui" || rUIFile == u"sfx/ui/custominfopage.ui"
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - vcl/jsdialog
vcl/jsdialog/enabled.cxx |7 +++ 1 file changed, 7 insertions(+) New commits: commit d7e39e3eb50198f64d837d6b62f25a9942e9298c Author: Michael Meeks AuthorDate: Fri Nov 25 19:08:38 2022 + Commit: Michael Meeks CommitDate: Mon Nov 28 14:50:38 2022 +0100 jsdialog: white-list calc group/un-group & row/col metric dialogs. They're simple dialogs, and are testd. Change-Id: I5a34314f57e058bc66a718c1e85ed52b265752e2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143308 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx index dc339e469a95..d665557385a1 100644 --- a/vcl/jsdialog/enabled.cxx +++ b/vcl/jsdialog/enabled.cxx @@ -52,6 +52,13 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool bMobile) || rUIFile == u"modules/scalc/ui/datafieldoptionsdialog.ui" || rUIFile == u"modules/scalc/ui/insertcells.ui" || rUIFile == u"modules/scalc/ui/deletecells.ui" +|| rUIFile == u"modules/scalc/ui/deletecontents.ui" +|| rUIFile == u"modules/scalc/ui/ungroupdialog.ui" +|| rUIFile == u"modules/scalc/ui/groupdialog.ui" +|| rUIFile == u"modules/scalc/ui/rowheightdialog.ui" +|| rUIFile == u"modules/scalc/ui/optimalrowheightdialog.ui" +|| rUIFile == u"modules/scalc/ui/colwidthdialog.ui" +|| rUIFile == u"modules/scalc/ui/optimalcolwidthdialog.ui" || rUIFile == u"svx/ui/fontworkgallerydialog.ui" || rUIFile == u"svx/ui/findreplacedialog.ui" || rUIFile == u"cui/ui/macroselectordialog.ui" || rUIFile == u"uui/ui/macrowarnmedium.ui"
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - vcl/jsdialog
vcl/jsdialog/enabled.cxx | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) New commits: commit 35dee85dc00db664ea8d6c268b307f2ed5dcf3ce Author: Szymon Kłos AuthorDate: Sat Nov 19 15:59:08 2022 +0100 Commit: Pedro Silva CommitDate: Thu Nov 24 11:33:52 2022 +0100 jsdialogs: enable row/column dialogs in calc Change-Id: I920c29b3f5afef8f37224165e6b18335b3dd50d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142974 Tested-by: Jenkins CollaboraOffice Reviewed-by: Pedro Silva diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx index 249b18a05d67..dc339e469a95 100644 --- a/vcl/jsdialog/enabled.cxx +++ b/vcl/jsdialog/enabled.cxx @@ -72,10 +72,15 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool bMobile) || rUIFile == u"sfx/ui/linefragment.ui" || rUIFile == u"sfx/ui/editdurationdialog.ui" || rUIFile == u"modules/swriter/ui/insertcaption.ui" || rUIFile == u"modules/swriter/ui/captionoptions.ui" -|| rUIFile == u"cui/ui/formatnumberdialog.ui" -|| rUIFile == u"cui/ui/password.ui" +|| rUIFile == u"cui/ui/formatnumberdialog.ui" || rUIFile == u"cui/ui/password.ui" || rUIFile == u"cui/ui/numberingformatpage.ui" -|| rUIFile == u"modules/scalc/ui/deletecontents.ui") +|| rUIFile == u"modules/scalc/ui/deletecontents.ui" +|| rUIFile == u"modules/scalc/ui/groupdialog.ui" +|| rUIFile == u"modules/scalc/ui/ungroupdialog.ui" +|| rUIFile == u"modules/scalc/ui/rowheightdialog.ui" +|| rUIFile == u"modules/scalc/ui/optimalrowheightdialog.ui" +|| rUIFile == u"modules/scalc/ui/colwidthdialog.ui" +|| rUIFile == u"modules/scalc/ui/optimalcolwidthdialog.ui") { return true; }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - vcl/jsdialog
vcl/jsdialog/enabled.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit c55f174445db16252957a78a31ca911593f81dc0 Author: Skyler Grey AuthorDate: Thu Aug 4 11:24:19 2022 +0100 Commit: Szymon Kłos CommitDate: Fri Aug 5 08:56:17 2022 +0200 Enable JSDialogs on the split cells dialog - This dialog works properly when JSDialog rendering is enabled for it - This dialog is already async, so there aren't multi-user issues like there are on some other dialogs Signed-off-by: Skyler Grey Change-Id: I036ca7ab15e0ab472ff961ef643053f8f6771c0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137791 Reviewed-by: Szymon Kłos Tested-by: Jenkins CollaboraOffice diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx index f0d8ed530dcf..e17c93e574f3 100644 --- a/vcl/jsdialog/enabled.cxx +++ b/vcl/jsdialog/enabled.cxx @@ -61,7 +61,8 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool bMobile) || rUIFile == u"cui/ui/widgettestdialog.ui" || rUIFile == u"modules/swriter/ui/contentcontroldlg.ui" || rUIFile == u"modules/swriter/ui/contentcontrollistitemdlg.ui" -|| rUIFile == u"modules/swriter/ui/splittable.ui") +|| rUIFile == u"modules/swriter/ui/splittable.ui" +|| rUIFile == u"cui/ui/splitcellsdialog.ui") { return true; }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - vcl/jsdialog
vcl/jsdialog/executor.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 8742557ec4e4361fe726c6274cd01afa3a8ea080 Author: Szymon Kłos AuthorDate: Thu Jul 14 16:51:28 2022 +0200 Commit: Szymon Kłos CommitDate: Thu Jul 21 10:22:52 2022 +0200 jsdialog: handle grab_focus action Change-Id: I20ec0ac75dfb6260cdd603f9dec7cd5001cb5650 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137085 Tested-by: Jenkins CollaboraOffice Reviewed-by: Mert Tumer diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx index b0c350b76522..d23c1299ade2 100644 --- a/vcl/jsdialog/executor.cxx +++ b/vcl/jsdialog/executor.cxx @@ -74,6 +74,12 @@ bool ExecuteAction(const std::string& nWindowId, const OString& rWidget, StringM if (pWidget != nullptr) { +if (sAction == "grab_focus") +{ +pWidget->grab_focus(); +return true; +} + if (sControlType == "tabcontrol") { auto pNotebook = dynamic_cast(pWidget);
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - vcl/jsdialog
vcl/jsdialog/executor.cxx | 12 1 file changed, 12 insertions(+) New commits: commit 297abcd5e14ddeb017f2ea2fd39f9db33a069cae Author: Szymon Kłos AuthorDate: Tue Jun 28 13:11:42 2022 +0200 Commit: Szymon Kłos CommitDate: Fri Jul 1 10:46:08 2022 +0200 jsdialog: add open/close instead of toggle menu from dropdown it will make us sure we don't reopen popup when we just toggle so we will be in sync Change-Id: I014e824a29d91d5972a6840246bcd4c31d24ae48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136570 Tested-by: Jenkins CollaboraOffice Reviewed-by: Rashesh Padia Reviewed-by: Szymon Kłos diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx index 8e570ccbe2e4..b0c350b76522 100644 --- a/vcl/jsdialog/executor.cxx +++ b/vcl/jsdialog/executor.cxx @@ -330,6 +330,18 @@ bool ExecuteAction(const std::string& nWindowId, const OString& rWidget, StringM pToolbar->set_menu_item_active(sId, !bIsActive); return true; } +else if (sAction == "closemenu") +{ +OString sId = OUStringToOString(rData["data"], RTL_TEXTENCODING_ASCII_US); +pToolbar->set_menu_item_active(sId, false); +return true; +} +else if (sAction == "openmenu") +{ +OString sId = OUStringToOString(rData["data"], RTL_TEXTENCODING_ASCII_US); +pToolbar->set_menu_item_active(sId, true); +return true; +} } } else if (sControlType == "edit")
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - vcl/jsdialog
vcl/jsdialog/executor.cxx |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit 2f423a5feba085bad40ce53f512480507603c28c Author: Szymon Kłos AuthorDate: Thu Jun 9 17:41:15 2022 +0200 Commit: Szymon Kłos CommitDate: Mon Jun 27 13:45:01 2022 +0200 jsdialog: toggle toolbox buttons correctly Change-Id: Ic02f9ceab29257ebc4cb6261aae10c4f1a7ef176 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135562 Tested-by: Andras Timar Reviewed-by: Andras Timar (cherry picked from commit b6b7b3a5a46790baf2266aaeb10976753dfe0fce) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135539 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx index 2da2ab5b9608..8e570ccbe2e4 100644 --- a/vcl/jsdialog/executor.cxx +++ b/vcl/jsdialog/executor.cxx @@ -325,8 +325,9 @@ bool ExecuteAction(const std::string& nWindowId, const OString& rWidget, StringM } else if (sAction == "togglemenu") { -pToolbar->set_menu_item_active( -OUStringToOString(rData["data"], RTL_TEXTENCODING_ASCII_US), true); +OString sId = OUStringToOString(rData["data"], RTL_TEXTENCODING_ASCII_US); +bool bIsActive = pToolbar->get_menu_item_active(sId); +pToolbar->set_menu_item_active(sId, !bIsActive); return true; } }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - vcl/jsdialog
vcl/jsdialog/jsdialogbuilder.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit cea6679e11b8c18e4641f317831859c159cb8455 Author: Szymon Kłos AuthorDate: Wed Jun 8 14:56:46 2022 +0200 Commit: Szymon Kłos CommitDate: Thu Jun 9 23:28:34 2022 +0200 jsdialog: be sure we send close popup message when destroyed use different m_sTypeOfJSON for popups so we can later detect popup closing Change-Id: Id0086815317011b142b49f4e1421b76e1e663358 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135497 Reviewed-by: Szymon Kłos Tested-by: Jenkins CollaboraOffice diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index eb2fab02c0fc..11edcb26d94d 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -515,7 +515,10 @@ JSInstanceBuilder::JSInstanceBuilder(weld::Widget* pParent, const OUString& rUIR { // when it is a popup we initialize sender in weld_popover if (bPopup) +{ +m_sTypeOfJSON = "popup"; return; +} vcl::Window* pRoot = m_xBuilder->get_widget_root(); @@ -662,6 +665,9 @@ JSInstanceBuilder::CreateFormulabarBuilder(vcl::Window* pParent, const OUString& JSInstanceBuilder::~JSInstanceBuilder() { +if (m_sTypeOfJSON == "popup") +sendClosePopup(m_nWindowId); + if (m_aWindowToRelease) { m_aWindowToRelease->ReleaseLOKNotifier();
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - vcl/jsdialog
vcl/jsdialog/executor.cxx | 42 +++--- 1 file changed, 23 insertions(+), 19 deletions(-) New commits: commit 802571046793dd1090c94b598a085ac4b69c90df Author: Szymon Kłos AuthorDate: Wed Jun 1 14:52:33 2022 +0200 Commit: Szymon Kłos CommitDate: Thu Jun 2 09:37:16 2022 +0200 jsdialog: correctly parse click position for drawingarea Change-Id: I8f0739cea8d2a3472926682f205bc5f5227bdc4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135241 Tested-by: Jenkins CollaboraOffice Reviewed-by: Mert Tumer diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx index 130c48453815..4e8324eb9379 100644 --- a/vcl/jsdialog/executor.cxx +++ b/vcl/jsdialog/executor.cxx @@ -174,29 +174,33 @@ bool ExecuteAction(const std::string& nWindowId, const OString& rWidget, StringM { if (sAction == "click") { -int separatorPos = rData["data"].indexOf(';'); -if (separatorPos > 0) +int nSeparatorPos = rData["data"].indexOf(';'); +if (nSeparatorPos > 0) { // x;y -std::string_view clickPosX = OUStringToOString( -rData["data"].subView(0, separatorPos), RTL_TEXTENCODING_ASCII_US); -std::string_view clickPosY = OUStringToOString( -rData["data"].subView(separatorPos + 1), RTL_TEXTENCODING_ASCII_US); -if (!clickPosX.empty() && !clickPosY.empty()) -{ -double posX = std::atof(clickPosX.data()); -double posY = std::atof(clickPosY.data()); -OutputDevice& rRefDevice = pArea->get_ref_device(); -// We send OutPutSize for the drawing area bitmap -// get_size_request is not necessarily updated -// therefore it may be incorrect. -Size size = rRefDevice.GetOutputSize(); -posX = posX * size.Width(); -posY = posY * size.Height(); -LOKTrigger::trigger_click(*pArea, Point(posX, posY)); +std::u16string_view nClickPosX = rData["data"].subView(0, nSeparatorPos); +std::u16string_view nClickPosY = rData["data"].subView(nSeparatorPos + 1); + +if (nClickPosX.empty() || nClickPosY.empty()) return true; -} + +double posX = std::atof( +OUStringToOString(nClickPosX.data(), RTL_TEXTENCODING_ASCII_US) +.getStr()); +double posY = std::atof( +OUStringToOString(nClickPosY.data(), RTL_TEXTENCODING_ASCII_US) +.getStr()); +OutputDevice& rRefDevice = pArea->get_ref_device(); +// We send OutPutSize for the drawing area bitmap +// get_size_request is not necessarily updated +// therefore it may be incorrect. +Size size = rRefDevice.GetOutputSize(); +posX = posX * size.Width(); +posY = posY * size.Height(); +LOKTrigger::trigger_click(*pArea, Point(posX, posY)); +return true; } + LOKTrigger::trigger_click(*pArea, Point(10, 10)); return true; }
[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - vcl/jsdialog
vcl/jsdialog/enabled.cxx | 15 +++ 1 file changed, 15 insertions(+) New commits: commit 6402b065aef78f0b6533ebdb74d3a81bf954c625 Author: Szymon Kłos AuthorDate: Tue Mar 15 10:09:43 2022 +0100 Commit: Szymon Kłos CommitDate: Thu Mar 17 16:13:29 2022 +0100 jsdialog: enable dialog on demand by env var It will be possible to enable some dialogs by environment variable: SAL_JSDIALOG_ENABLE=modules/scalc/ui/validationdialog.ui:modules/scalc/ui/validationcriteriapage.ui (you can specify multiple items with ':' separator) Change-Id: Iba1e6b7ac77716f40c9073a8064206c420f2d081 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131600 Tested-by: Szymon Kłos Reviewed-by: Szymon Kłos diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx index 9aa8d19db108..99e20b17bb71 100644 --- a/vcl/jsdialog/enabled.cxx +++ b/vcl/jsdialog/enabled.cxx @@ -7,7 +7,9 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include #include +#include namespace jsdialog { @@ -60,6 +62,19 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool bMobile) return true; } +const char* pEnabledDialog = getenv("SAL_JSDIALOG_ENABLE"); +if (pEnabledDialog) +{ +OUString sAllEnabledDialogs(pEnabledDialog, strlen(pEnabledDialog), RTL_TEXTENCODING_UTF8); +std::vector aEnabledDialogsVector += comphelper::string::split(sAllEnabledDialogs, ':'); +for (const auto& rDialog : aEnabledDialogsVector) +{ +if (rUIFile == rDialog) +return true; +} +} + return false; }