include/vcl/weld.hxx          |    4 ++--
 vcl/source/window/builder.cxx |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit ecac024b906f90b4402be22fc0e9e994ece954dc
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Mon Feb 17 08:02:14 2025 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Mon Feb 17 12:59:19 2025 +0100

    vcl: Call MetricSpinButton::format_number directly
    
    Change-Id: I12d0b9b040a74365c061e8361d2812ac46802024
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181762
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    Tested-by: Jenkins

diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index e6d74e906dca..4a35e917dc65 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -2130,7 +2130,7 @@ public:
         m_xSpinButton->set_text_parser(LINK(this, MetricSpinButton, 
spin_button_input));
         m_xSpinButton->connect_value_changed(
             LINK(this, MetricSpinButton, spin_button_value_changed));
-        
m_xSpinButton->set_text(spin_button_output(m_xSpinButton->get_value()));
+        m_xSpinButton->set_text(format_number(m_xSpinButton->get_value()));
     }
 
     static OUString MetricToString(FieldUnit rUnit);
@@ -2164,7 +2164,7 @@ public:
     // formatted value and now you want to show it as formatted again
     void reformat()
     {
-        const OUString sText = spin_button_output(m_xSpinButton->get_value());
+        const OUString sText = format_number(m_xSpinButton->get_value());
         m_xSpinButton->set_text(sText);
     }
 
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 6163eafc3bb7..d626c63d506d 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -360,7 +360,7 @@ namespace weld
             m_eSrcUnit = eUnit;
             set_increments(step, page, m_eSrcUnit);
             set_value(value, m_eSrcUnit);
-            const OUString sText = 
spin_button_output(m_xSpinButton->get_value());
+            const OUString sText = format_number(m_xSpinButton->get_value());
             m_xSpinButton->set_text(sText);
             update_width_chars();
         }

Reply via email to