vcl/source/control/field.cxx | 10 ++++++++-- vcl/source/window/builder.cxx | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-)
New commits: commit eb6eb8c6df2ae75f1525bdbb7e9c72262dd74c0f Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Aug 19 13:15:27 2019 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Aug 19 16:12:55 2019 +0200 There should not be a space between the number and the prime mark e.g. The Art of Type and Typography: Explorations in Use and Practice Change-Id: Iddb08fce2efa8a5614d9afc4f96c3f609e8aa0fb Reviewed-on: https://gerrit.libreoffice.org/77717 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index be87437c06a2..fadd02f7eeae 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -1384,10 +1384,16 @@ OUString MetricFormatter::CreateFieldText( sal_Int64 nValue ) const aStr += maCustomUnitText; else { - if (meUnit != FieldUnit::NONE && meUnit != FieldUnit::DEGREE) + OUString aSuffix = ImplMetricToString( meUnit ); + if (meUnit != FieldUnit::NONE && meUnit != FieldUnit::DEGREE && meUnit != FieldUnit::INCH) aStr += " "; + if (meUnit == FieldUnit::INCH) + { + if (aSuffix != "\"") + aStr += " "; + } assert(meUnit != FieldUnit::PERCENT); - aStr += ImplMetricToString( meUnit ); + aStr += aSuffix; } return aStr; } diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index b2eb2c65142c..502ae061367f 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -242,10 +242,16 @@ namespace weld else { aStr = rLocaleData.getNum(nValue, nDecimalDigits, true, true); - if (m_eSrcUnit != FieldUnit::NONE && m_eSrcUnit != FieldUnit::DEGREE) + OUString aSuffix = MetricToString(m_eSrcUnit); + if (m_eSrcUnit != FieldUnit::NONE && m_eSrcUnit != FieldUnit::DEGREE && m_eSrcUnit != FieldUnit::INCH) aStr += " "; + if (m_eSrcUnit == FieldUnit::INCH) + { + if (aSuffix != "\"") + aStr += " "; + } assert(m_eSrcUnit != FieldUnit::PERCENT); - aStr += MetricToString(m_eSrcUnit); + aStr += aSuffix; } return aStr; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits