Files
odfstudio/framework
Michael Weghorn 20e1c3d2f3 tdf#130857 Let Formatter:m_aOutputHdl convert double to text
So far, the Formatter:m_aOutputHdl output handler set via
Formatter::SetOutputHdl did not receive any parameter
and had the responsibility to set the text based on
the current value, i.e. first retrieve the current
value, then convert it to a text representation, and
then set that text in the formatter.

Change semantics so that the method instead receives
the (double) value to format as a parameter and
returns the formatted string.

Passing the current value as a double and using the
returned string to update the text is now the responsibility
of the only caller, Formatter::ImplSetValue.

Adjust the naming accordingly:

* Formatter:m_aOutputHdl -> Formatter::m_aFormatValueHdl
* Formatter::SetOutputHdl -> Formatter::SetFormatValueHdl

This is similar to the change done elsewhere in

    commit 76396a371e
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Sat Feb 15 13:44:50 2025 +0100

        tdf#130857 weld: Abstract from "input"/"output" SpinButton signals

(and changes referenced from its commit message)
and is one step towards supporting value <-> text
conversion in QtInstanceFormattedSpinButton as well.

No change in behavior is intended by this commit.

Change-Id: I6b3fbccc89b89446a1ea367a80aeed3a7b583298
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181911
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-02-19 22:41:50 +01:00
..
…
…
…
…

UNO Framework

Toolbars, menus, UNO stuff, including accelerators and interaction, etc.

See Also

http://wiki.openoffice.org/wiki/Framework