summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-09-09 13:20:11 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-09-09 16:23:41 +0100
commitdf3a588d3b604c301bc222b4ac1bde7d1dd855d0 (patch)
treecc8fcfede098256aac1028109808e9bb7ab3da8c /svx
parent470c9e31366619a3fdadee4e5506a9c2e0726f21 (diff)
no spaces between inch " and number and use double-prime for "
Change-Id: I462f532ff5a1abe08663c2ee2bc6c1329689dc5a
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/dlgunit.hxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/svx/source/dialog/dlgunit.hxx b/svx/source/dialog/dlgunit.hxx
index aab743480728..914e52d54388 100644
--- a/svx/source/dialog/dlgunit.hxx
+++ b/svx/source/dialog/dlgunit.hxx
@@ -32,8 +32,18 @@ inline OUString GetUnitString( long nVal_100, FieldUnit eFieldUnit, sal_Unicode
aVal.insert( 0, "0" );
aVal.insert( aVal.getLength() - 2, cSep );
- aVal.append(" ");
- aVal.append(SdrFormatter::GetUnitStr( eFieldUnit ));
+ OUString aSuffix = SdrFormatter::GetUnitStr(eFieldUnit);
+ if (eFieldUnit != FieldUnit::NONE && eFieldUnit != FieldUnit::DEGREE && eFieldUnit != FieldUnit::INCH)
+ aVal.append(" ");
+ if (eFieldUnit == FieldUnit::INCH)
+ {
+ OUString sDoublePrime = u"\u2033";
+ if (aSuffix != "\"" && aSuffix != sDoublePrime)
+ aVal.append(" ");
+ else
+ aSuffix = sDoublePrime;
+ }
+ aVal.append(aSuffix);
return aVal.makeStringAndClear();
}