vcl/inc/jsdialog/jsdialogbuilder.hxx | 1 + vcl/jsdialog/jsdialogbuilder.cxx | 6 ++++++ 2 files changed, 7 insertions(+)
New commits: commit c3227d33ef18f090d858e93e9dc516db25995ebe Author: Jaume Pujantell <jaume.pujant...@collabora.com> AuthorDate: Mon Mar 18 15:40:20 2024 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Tue Mar 19 13:50:15 2024 +0100 jsdialog: send update on spin button range change On Online, on the Table Properties dialog, when changing mesures from absolute to relative, the browser whould complain about values being out range since it still expected absolute values. Change-Id: I2a3ae844b4f4f874ea2140dec313794a87d9f2cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164973 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index 7ef9c1cfc833..066dcddfcfc8 100644 --- a/vcl/inc/jsdialog/jsdialogbuilder.hxx +++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx @@ -656,6 +656,7 @@ public: bool bTakeOwnership); virtual void set_value(sal_Int64 value) override; + virtual void set_range(sal_Int64 min, sal_Int64 max) override; }; class JSFormattedSpinButton final diff --git a/vcl/jsdialog/jsdialogbuilder.cxx b/vcl/jsdialog/jsdialogbuilder.cxx index 7eda7861fc8d..97675b6267c1 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -1751,6 +1751,12 @@ void JSSpinButton::set_value(sal_Int64 value) sendAction(std::move(pMap)); } +void JSSpinButton::set_range(sal_Int64 min, sal_Int64 max) +{ + SalInstanceSpinButton::set_range(min, max); + sendUpdate(); +} + JSFormattedSpinButton::JSFormattedSpinButton(JSDialogSender* pSender, ::FormattedField* pSpin, SalInstanceBuilder* pBuilder, bool bTakeOwnership) : JSWidget<SalInstanceFormattedSpinButton, ::FormattedField>(pSender, pSpin, pBuilder,