diff options
author | Eike Rathke <erack@redhat.com> | 2017-10-27 18:18:10 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2017-10-27 18:29:45 +0200 |
commit | 7c5b9247c4425f1b733b62e365f15cf390c4bb63 (patch) | |
tree | ba648e4aaa4d6e93f7dcccfd6586572b08ab1383 /svx | |
parent | 7cf453c78ce67f17661bfc74d1df6073cfc9d2ad (diff) |
Handle decimalSeparatorAlternative in TakeRepresentation, tdf#81671
Change-Id: I552cb14fcb048d6c7da9043704c9941686a30993
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/svdraw/svdomeas.cxx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx index 5e472c7bc277..81eee47621f7 100644 --- a/svx/source/svdraw/svdomeas.cxx +++ b/svx/source/svdraw/svdomeas.cxx @@ -130,9 +130,12 @@ OUString SdrMeasureObj::TakeRepresentation(SdrMeasureFieldKind eMeasureFieldKind aStr = "?"; } - sal_Unicode cDec(SvtSysLocale().GetLocaleData().getNumDecimalSep()[0]); + SvtSysLocale aSysLocale; + const LocaleDataWrapper& rLocaleDataWrapper = aSysLocale.GetLocaleData(); + sal_Unicode cDec(rLocaleDataWrapper.getNumDecimalSep()[0]); + sal_Unicode cDecAlt(rLocaleDataWrapper.getNumDecimalSepAlt().toChar()); - if(aStr.indexOf(cDec) != -1) + if(aStr.indexOf(cDec) != -1 || (cDecAlt && aStr.indexOf(cDecAlt) != -1)) { sal_Int32 nLen2(aStr.getLength() - 1); @@ -142,7 +145,7 @@ OUString SdrMeasureObj::TakeRepresentation(SdrMeasureFieldKind eMeasureFieldKind nLen2--; } - if(aStr[nLen2] == cDec) + if(aStr[nLen2] == cDec || (cDecAlt && aStr[nLen2] == cDecAlt)) { aStr = aStr.copy(0, nLen2); nLen2--; |