summaryrefslogtreecommitdiff
path: root/vcl/jsdialog/jsdialogbuilder.cxx
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2022-08-22 18:27:27 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2022-09-26 10:23:36 +0200
commitdb106346a9797565e406cf9c26e762327446f59a (patch)
treea3ef88b2c6ba8abd790f4f6c642357e40b5aa1fd /vcl/jsdialog/jsdialogbuilder.cxx
parentc4c664e1413b9d4f830a994ee9fa44c1b002f45f (diff)
jsdialog: send action not update for spin button value
This will help us to reduce payload and fix bug where in Chrome regenerated spin field always focused "arrow down" button after click on the "arrow up". Use value from formatter - the same as generated in widget update JSON. Change-Id: I6ace90eb532e894daacb563bc9fb93332fd755ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138700 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Rashesh Padia <rashesh.padia@collabora.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140579 Tested-by: Jenkins
Diffstat (limited to 'vcl/jsdialog/jsdialogbuilder.cxx')
-rw-r--r--vcl/jsdialog/jsdialogbuilder.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx
index 662caaf6a9f2..da30834b0568 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -1368,7 +1368,11 @@ JSSpinButton::JSSpinButton(JSDialogSender* pSender, ::FormattedField* pSpin,
void JSSpinButton::set_value(sal_Int64 value)
{
SalInstanceSpinButton::set_value(value);
- sendUpdate(true); // if input is limited we can receive the same JSON
+
+ std::unique_ptr<jsdialog::ActionDataMap> pMap = std::make_unique<jsdialog::ActionDataMap>();
+ (*pMap)[ACTION_TYPE] = "setText";
+ (*pMap)["text"] = OUString::number(m_rFormatter.GetValue());
+ sendAction(std::move(pMap));
}
JSMessageDialog::JSMessageDialog(JSDialogSender* pSender, ::MessageDialog* pDialog,