jsdialogs: shortcut legacy mobile-sidebar update

In the past we used UI testing not welding for user interaction
and updates so it was needed to send full update after every change.
Use shortcut to avoid unnecessary operations.

Change-Id: Ib3715e2287d6cc8b70db495b93cf09dd9aa20b14
(cherry picked from commit 6fd6fc9d351527059d7a7ded3155f772c5e0982a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183188
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
This commit is contained in:
Szymon Kłos 2025-03-20 08:16:12 +01:00
parent 13575ca0fb
commit 49b71f818d

View File

@ -5059,7 +5059,17 @@ static void lcl_sendDialogEvent(unsigned long long int nWindowId, const char* pA
// special values for window id
if (nWindowId == static_cast<unsigned long long int>(-1))
{
sWindowId = sCurrentShellId + "sidebar";
// force sidebar resend - for legacy mobile-wizard: {"id":"-1"}
if (aMap.size() == 1)
{
// force resend - used in mobile-wizard
jsdialog::SendFullUpdate(sCurrentShellId + "sidebar", u"Panel"_ustr);
return;
}
}
if (nWindowId == static_cast<unsigned long long int>(-2))
sWindowId = sCurrentShellId + "notebookbar";
if (nWindowId == static_cast<unsigned long long int>(-3))
@ -5083,10 +5093,6 @@ static void lcl_sendDialogEvent(unsigned long long int nWindowId, const char* pA
// these dialogs are created with WindowId "0"
if (!SfxViewShell::Current() && jsdialog::ExecuteAction(u"0"_ustr, sControlId, aMap))
return;
// force resend - used in mobile-wizard
jsdialog::SendFullUpdate(sCurrentShellId + "sidebar", u"Panel"_ustr);
}
catch (std::out_of_range& e)
{