summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-08-19 13:15:27 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-08-19 16:12:55 +0200
commiteb6eb8c6df2ae75f1525bdbb7e9c72262dd74c0f (patch)
tree7d5907136c350c334599a296c1fc19a282732bcb
parent3a95a2baee94e50e3f745990359fdeea65a422a8 (diff)
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 <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/source/control/field.cxx10
-rw-r--r--vcl/source/window/builder.cxx10
2 files changed, 16 insertions, 4 deletions
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;