office-gobmx/include/svx/dialog
Michael Weghorn 27c95bb445 svx: Simplify "Go to Page" dialog, let SpinButton do its job
Set the allowed range using weld::SpinButton::set_range
so that weld::SpinButton makes sure that a value within
the correct range is set, instead of having a custom
handler called when the text of the spinbutton changes
that effectively does the same thing (+ manually setting
cursor to the end of the edit, but sticking to the toolkit
default there instead makes sense to me for consistency).

Adjust the test case to no longer type invalid input
for the page number ("3a"), as SalInstanceSpinButton
doesn't parse the number then, but would set the value to
the minimum (here: 1) instead.
(If a different behavior were intended here, that
should be implemented in SalInstanceSpinButton or
the underlying VCL widgets to be consistent
across dialogs.)

In GotoPageDlg::GetPageSelection, use weld::SpinButton::get_value
to get the integer value right away, instead of
getting the text and converting that into an
integer manually.

All that custom handling provided an interesting test case
while implementing support for that dialog using native
Qt widgets, see commits up to

    commit 70825e677f
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Nov 28 00:30:10 2024 +0100

        tdf#130857 qt weld: Notify about spinbox combined value+text change

, but apart from that (which is done now), I think
that a more standard approach makes more sense.

Change-Id: I06492b6629a4210c6325d50467da8e195daa4c94
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177463
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-28 11:57:33 +01:00
..
gotodlg.hxx svx: Simplify "Go to Page" dialog, let SpinButton do its job 2024-11-28 11:57:33 +01:00
ThemeColorEditDialog.hxx use more UNLESS_MERGELIBS 2024-02-12 20:25:54 +01:00
ThemeColorValueSet.hxx
ThemeDialog.hxx tdf#146619 Recheck include/s* with IWYU 2023-10-02 21:32:00 +02:00