diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-02-14 09:38:50 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-02-14 14:31:50 +0100 |
commit | 8389dc88a48b366ad7f3dd84129467175e18ab40 (patch) | |
tree | 2de192eab43601ee8b145215504ed6aa2b9db243 /svtools | |
parent | f67e5ef9a5c71f3b35b1c67eb72794e44cc15410 (diff) |
split out MetricField value conversion functions
Change-Id: I67a33bd2a5cb06dc66e471918b5c378044a2eff2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88679
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/ctrlbox.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index f1b0c7e7ba3c..cbb8f349f0d7 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -26,6 +26,7 @@ #include <vcl/event.hxx> #include <vcl/svapp.hxx> #include <vcl/field.hxx> +#include <vcl/fieldvalues.hxx> #include <vcl/settings.hxx> #include <vcl/image.hxx> #include <vcl/virdev.hxx> @@ -1135,7 +1136,7 @@ OUString FontSizeBox::format_number(int nValue) const void FontSizeBox::SetValue(int nNewValue, FieldUnit eInUnit) { - auto nTempValue = MetricField::ConvertValue(nNewValue, 0, GetDecimalDigits(), eInUnit, GetUnit()); + auto nTempValue = vcl::ConvertValue(nNewValue, 0, GetDecimalDigits(), eInUnit, GetUnit()); if (nTempValue < nMin) nTempValue = nMin; else if (nTempValue > nMax) @@ -1173,7 +1174,7 @@ int FontSizeBox::get_value() const FontSizeNames aFontSizeNames(Application::GetSettings().GetUILanguageTag().getLanguageType()); auto nValue = aFontSizeNames.Name2Size(aStr); if (nValue) - return MetricField::ConvertValue(nValue, 0, GetDecimalDigits(), GetUnit(), GetUnit()); + return vcl::ConvertValue(nValue, 0, GetDecimalDigits(), GetUnit(), GetUnit()); } const SvtSysLocale aSysLocale; |