vcl/inc/jsdialog/jsdialogbuilder.hxx | 1 + vcl/jsdialog/jsdialogbuilder.cxx | 6 ++++++ 2 files changed, 7 insertions(+)
New commits: commit f0748eae8a4a64c84aa5aca69b10688d330f93eb Author: Jaume Pujantell <jaume.pujant...@collabora.com> AuthorDate: Mon Mar 18 15:40:20 2024 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Wed Mar 20 15:41:26 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> (cherry picked from commit c3227d33ef18f090d858e93e9dc516db25995ebe) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164997 diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx index 7884fe3f2ed2..0729b220d46b 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 a55c7b9fbf5b..a535d8b65e8e 100644 --- a/vcl/jsdialog/jsdialogbuilder.cxx +++ b/vcl/jsdialog/jsdialogbuilder.cxx @@ -1778,6 +1778,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,