From 863de3f7c4031f3d583debeebe0fdd8ef1ac3911 Mon Sep 17 00:00:00 2001 From: Henry Castro Date: Thu, 16 Apr 2020 22:24:23 -0400 Subject: lok: fix wrong metric conversion of the metric input control The client side does not work well if the browser has different locale, and the input element conversion fails or change to a different value, so the value is converted to a neutral locale. Change-Id: I89f96844603a8552609d486590c7de752cb5a95c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92395 Reviewed-by: Henry Castro Tested-by: Jenkins CollaboraOffice Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93069 Tested-by: Jenkins --- svx/source/sidebar/possize/PosSizePropertyPanel.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'svx') diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx index 24737369d2db..38d49e88ec67 100644 --- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx +++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -800,7 +801,9 @@ void PosSizePropertyPanel::GetControlState(const sal_uInt16 nSID, boost::propert if (pControl && !pControl->get_text().isEmpty()) { - rState.put(pControl->get_buildable_name().getStr(), pControl->get_text().toUtf8().getStr()); + OUString sValue = Application::GetSettings().GetNeutroLocaleDataWrapper(). + getNum(pControl->get_value(pControl->get_unit()), pControl->get_digits(), false, false); + rState.put(pControl->get_buildable_name().getStr(), sValue.toUtf8().getStr()); } } -- cgit