summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2020-04-16 22:24:23 -0400
committerHenry Castro <hcastro@collabora.com>2020-04-28 03:12:25 +0200
commit5d6c71151e8c3ae710e4f57dccebf5f1073a399c (patch)
tree7f017c2df8162f20501177af970065ad97261c07 /svx
parent51d192a3bfa24dc979f7ad6178803d3262290b46 (diff)
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 <hcastro@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/sidebar/possize/PosSizePropertyPanel.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
index 120b753a29d6..dc94e0d8603f 100644
--- a/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
+++ b/svx/source/sidebar/possize/PosSizePropertyPanel.cxx
@@ -846,7 +846,7 @@ void PosSizePropertyPanel::NotifyItemUpdate(
void PosSizePropertyPanel::GetControlState(const sal_uInt16 nSID, boost::property_tree::ptree& rState)
{
- VclPtr<vcl::Window> pControl;
+ VclPtr<MetricField> pControl;
switch (nSID)
{
case SID_ATTR_TRANSFORM_POS_X:
@@ -865,7 +865,9 @@ void PosSizePropertyPanel::GetControlState(const sal_uInt16 nSID, boost::propert
if (pControl && !pControl->GetText().isEmpty())
{
- rState.put(pControl->get_id().toUtf8().getStr(),pControl->GetText().toUtf8().getStr());
+ OUString sValue = Application::GetSettings().GetNeutroLocaleDataWrapper().
+ getNum(pControl->GetValue(), pControl->GetDecimalDigits(), false, false);
+ rState.put(pControl->get_id().toUtf8().getStr(), sValue.toUtf8().getStr());
}
}