diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-11-22 14:44:29 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-11-22 17:56:57 +0100 |
commit | e227d96bbc500afd810064eee64175b800bfc11f (patch) | |
tree | e4a62855fadd4da2f89035196330061c658e2d4c /vcl/source/control | |
parent | 922a8bd4ae026ca33c634023703b551cd465491e (diff) |
use prime symbol for foot
Change-Id: Ieb1743b89a3c069d7b24cab0869294522ae2a6d7
Reviewed-on: https://gerrit.libreoffice.org/83503
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/control')
-rw-r--r-- | vcl/source/control/field.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index 6307b9ae49d7..2aa7e85a402f 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -1045,7 +1045,7 @@ static OUString ImplMetricGetUnitText(const OUString& rStr) for (sal_Int32 i = rStr.getLength()-1; i >= 0; --i) { sal_Unicode c = rStr[i]; - if ( (c == '\'') || (c == '\"') || (c == '%') || (c == 0x2033) || unicode::isAlpha(c) || unicode::isControl(c) ) + if ( (c == '\'') || (c == '\"') || (c == '%') || (c == 0x2032) || (c == 0x2033) || unicode::isAlpha(c) || unicode::isControl(c) ) aStr.insert(0, c); else { @@ -1464,7 +1464,7 @@ OUString MetricFormatter::CreateFieldText( sal_Int64 nValue ) const else { OUString aSuffix = ImplMetricToString( meUnit ); - if (meUnit != FieldUnit::NONE && meUnit != FieldUnit::DEGREE && meUnit != FieldUnit::INCH) + if (meUnit != FieldUnit::NONE && meUnit != FieldUnit::DEGREE && meUnit != FieldUnit::INCH && meUnit != FieldUnit::FOOT) aStr += " "; if (meUnit == FieldUnit::INCH) { @@ -1474,6 +1474,15 @@ OUString MetricFormatter::CreateFieldText( sal_Int64 nValue ) const else aSuffix = sDoublePrime; } + else if (meUnit == FieldUnit::FOOT) + { + OUString sPrime = u"\u2032"; + if (aSuffix != "'" && aSuffix != sPrime) + aStr += " "; + else + aSuffix = sPrime; + } + assert(meUnit != FieldUnit::PERCENT); aStr += aSuffix; } |