summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorJaume Pujantell <jaume.pujantell@collabora.com>2024-03-18 15:40:20 +0100
committerMiklos Vajna <vmiklos@collabora.com>2024-03-20 15:41:08 +0100
commitd94288a6f26a6f0d58901732c562dfad861ec4c5 (patch)
treef45465c927d30fb1c4ea64c3c9a4a81d453871d0 /vcl
parentf056f4d45080febc6c912bd623b5df8fa06f87a1 (diff)
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 <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit c3227d33ef18f090d858e93e9dc516db25995ebe) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164998 Tested-by: Jenkins
Diffstat (limited to 'vcl')
-rw-r--r--vcl/inc/jsdialog/jsdialogbuilder.hxx1
-rw-r--r--vcl/jsdialog/jsdialogbuilder.cxx6
2 files changed, 7 insertions, 0 deletions
diff --git a/vcl/inc/jsdialog/jsdialogbuilder.hxx b/vcl/inc/jsdialog/jsdialogbuilder.hxx
index 315b8605582f..34fdb7a068d5 100644
--- a/vcl/inc/jsdialog/jsdialogbuilder.hxx
+++ b/vcl/inc/jsdialog/jsdialogbuilder.hxx
@@ -659,6 +659,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 08a3f53b6059..1f56bda71bba 100644
--- a/vcl/jsdialog/jsdialogbuilder.cxx
+++ b/vcl/jsdialog/jsdialogbuilder.cxx
@@ -1746,6 +1746,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,