diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2020-12-09 06:28:34 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2020-12-28 14:32:13 +0100 |
commit | d7f3e68f849d11f6e02019b4a788982cae71d37b (patch) | |
tree | aba0ad754bdf73a495e84a2530959cd7f87f77ef /vcl/jsdialog/executor.cxx | |
parent | 1a7ca9b41362068e5c19317b8e63ad0343960974 (diff) |
jsdialog: handle value change for spinfields
Change-Id: Ie9ef1017b959f5ef42abe6de4ac18e077d1ceb1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107446
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108397
Tested-by: Jenkins
Diffstat (limited to 'vcl/jsdialog/executor.cxx')
-rw-r--r-- | vcl/jsdialog/executor.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/vcl/jsdialog/executor.cxx b/vcl/jsdialog/executor.cxx index 933149efde05..cfb36dd858be 100644 --- a/vcl/jsdialog/executor.cxx +++ b/vcl/jsdialog/executor.cxx @@ -128,14 +128,24 @@ bool ExecuteAction(sal_uInt64 nWindowId, const OString& rWidget, StringMap& rDat auto pSpinField = dynamic_cast<weld::SpinButton*>(pWidget); if (pSpinField) { + if (sAction == "change") + { + OString sValue = OUStringToOString(rData["data"], RTL_TEXTENCODING_ASCII_US); + int nValue = std::atoi(sValue.getStr()); + pSpinField->set_value(nValue); + LOKTrigger::trigger_value_changed(*pSpinField); + return true; + } if (sAction == "plus") { pSpinField->set_value(pSpinField->get_value() + 1); + LOKTrigger::trigger_value_changed(*pSpinField); return true; } else if (sAction == "minus") { pSpinField->set_value(pSpinField->get_value() - 1); + LOKTrigger::trigger_value_changed(*pSpinField); return true; } } |