summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-11-08 11:52:43 +0000
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2018-11-27 12:47:28 +0100
commit07542b44e7f86efacbe9427802b2fd4829ffbb49 (patch)
tree716a0ee134ba3ae61e5167398a114ea00d12eb41
parenteb99f1174950e7a9752830264fc393d533d61891 (diff)
Resolves: tdf#121238 format welded metricspinbuttons the same as historically
i.e. not with the UI Language, but with the Locale setting. Change-Id: I5146ece3356fdb67c3c715c6d17e608ec92e739a Reviewed-on: https://gerrit.libreoffice.org/63089 Tested-by: Jenkins Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r--vcl/source/window/builder.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index f45d2cd2aff5..8aa9d46f876d 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -216,7 +216,7 @@ namespace weld
{
OUString aStr;
- const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetUILocaleDataWrapper();
+ const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetLocaleDataWrapper();
unsigned int nDecimalDigits = m_xSpinButton->get_digits();
//pawn percent off to icu to decide whether percent is separated from its number for this locale
@@ -245,7 +245,7 @@ namespace weld
IMPL_LINK(MetricSpinButton, spin_button_input, int*, result, bool)
{
- const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetUILocaleDataWrapper();
+ const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetLocaleDataWrapper();
double fResult(0.0);
bool bRet = MetricFormatter::TextToValue(get_text(), fResult, 0, m_xSpinButton->get_digits(), rLocaleData, m_eSrcUnit);
if (bRet)
@@ -258,7 +258,7 @@ namespace weld
int nStartPos, nEndPos;
m_xSpinButton->get_selection_bounds(nStartPos, nEndPos);
- const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetUILocaleDataWrapper();
+ const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetLocaleDataWrapper();
const int nTimeArea = TimeFormatter::GetTimeArea(m_eFormat, m_xSpinButton->get_text(), nEndPos,
rLocaleData);
@@ -292,7 +292,7 @@ namespace weld
int nStartPos, nEndPos;
m_xSpinButton->get_selection_bounds(nStartPos, nEndPos);
- const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetUILocaleDataWrapper();
+ const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetLocaleDataWrapper();
tools::Time aResult(0);
bool bRet = TimeFormatter::TextToTime(m_xSpinButton->get_text(), aResult, m_eFormat, true, rLocaleData);
if (bRet)
@@ -324,7 +324,7 @@ namespace weld
OUString TimeSpinButton::format_number(int nValue) const
{
- const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetUILocaleDataWrapper();
+ const LocaleDataWrapper& rLocaleData = Application::GetSettings().GetLocaleDataWrapper();
return TimeFormatter::FormatTime(ConvertValue(nValue), m_eFormat, TimeFormat::Hour24, true, rLocaleData);
}
}