include/vcl/weld.hxx | 2 +- vcl/source/window/builder.cxx | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-)
New commits: commit f90fda2eeeb319d04a52482f85fb161a6e9a7fef Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Nov 15 14:03:00 2018 +0000 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Nov 15 16:43:41 2018 +0100 reformat on set_digits change Change-Id: If69cee340e48d42b1be56ea6012e6686aa203f53 Reviewed-on: https://gerrit.libreoffice.org/63423 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index 13b127c9138a..9d78f808d6cc 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -926,7 +926,7 @@ public: bool has_focus() const { return m_xSpinButton->has_focus(); } void show(bool bShow = true) { m_xSpinButton->show(bShow); } void hide() { m_xSpinButton->hide(); } - void set_digits(unsigned int digits) { m_xSpinButton->set_digits(digits); } + void set_digits(unsigned int digits); void set_accessible_name(const OUString& rName) { m_xSpinButton->set_accessible_name(rName); } unsigned int get_digits() const { return m_xSpinButton->get_digits(); } void save_value() { m_xSpinButton->save_value(); } diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 2406b7a56cc8..270fef7c4aaf 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -242,6 +242,16 @@ namespace weld return aStr; } + void MetricSpinButton::set_digits(unsigned int digits) + { + int step, page; + get_increments(step, page, m_eSrcUnit); + int value = get_value(m_eSrcUnit); + m_xSpinButton->set_digits(digits); + set_increments(step, page, m_eSrcUnit); + set_value(value, m_eSrcUnit); + } + int MetricSpinButton::ConvertValue(int nValue, FieldUnit eInUnit, FieldUnit eOutUnit) const { return MetricField::ConvertValue(nValue, 0, m_xSpinButton->get_digits(), eInUnit, eOutUnit); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits