diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-01-20 13:55:03 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-01-20 14:46:21 +0000 |
commit | d33b4c311e3b9c0b8f50080cb38a31c19f587a16 (patch) | |
tree | bbb66c18dfe5dcdffbfa7d358d6a111bf8e5f518 /svx | |
parent | c6c70c93461d5da4464ef38c8420b53ee609a4d1 (diff) |
Related: #i56998# use locale rules to format percentage
Change-Id: I4b744cf10165383153d2a71c05df0c0ed327c641
Diffstat (limited to 'svx')
-rw-r--r-- | svx/Library_svxcore.mk | 1 | ||||
-rw-r--r-- | svx/source/svdraw/svdattr.cxx | 7 | ||||
-rw-r--r-- | svx/source/xoutdev/xattr2.cxx | 8 |
3 files changed, 12 insertions, 4 deletions
diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk index 4b8914e2cca1..58eb5e9f4226 100644 --- a/svx/Library_svxcore.mk +++ b/svx/Library_svxcore.mk @@ -60,6 +60,7 @@ $(eval $(call gb_Library_use_libraries,svxcore,\ editeng \ fwe \ i18nlangtag \ + i18nutil \ lng \ sal \ salhelper \ diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index 620ec2709469..a7a23db5388e 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -38,6 +38,7 @@ #include <editeng/adjustitem.hxx> #include <editeng/editdata.hxx> #include <editeng/writingmodeitem.hxx> +#include <i18nutil/unicode.hxx> #include <svl/solar.hrc> #include <tools/bigint.hxx> #include <tools/stream.hxx> @@ -837,7 +838,8 @@ SfxItemPresentation SdrPercentItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const { - rText = OUString::number(GetValue()) + "%"; + rText = unicode::formatPercent(GetValue(), + Application::GetSettings().GetUILanguageTag()); if(ePres == SFX_ITEM_PRESENTATION_COMPLETE) { @@ -2056,7 +2058,8 @@ SfxItemPresentation SdrSignedPercentItem::GetPresentation( SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const { - rText = OUString::number(GetValue()) + "%"; + rText = unicode::formatPercent(GetValue(), + Application::GetSettings().GetUILanguageTag()); if(ePres == SFX_ITEM_PRESENTATION_COMPLETE) { diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx index 8a644acbe168..c931ae99437f 100644 --- a/svx/source/xoutdev/xattr2.cxx +++ b/svx/source/xoutdev/xattr2.cxx @@ -21,6 +21,7 @@ #include <com/sun/star/drawing/LineCap.hpp> #include <com/sun/star/uno/Any.hxx> +#include <i18nutil/unicode.hxx> #include <svx/dialogs.hrc> #include "svx/xattr.hxx" #include <svx/xtable.hxx> @@ -28,6 +29,7 @@ #include <editeng/itemtype.hxx> #include <svx/xdef.hxx> #include <svx/AffineMatrixItem.hxx> +#include <vcl/svapp.hxx> // class XLineTransparenceItem @@ -70,7 +72,8 @@ SfxItemPresentation XLineTransparenceItem::GetPresentation case SFX_ITEM_PRESENTATION_COMPLETE: rText = OUString( ResId( RID_SVXSTR_TRANSPARENCE, DIALOG_MGR() ) ) + ": "; case SFX_ITEM_PRESENTATION_NAMELESS: - rText = rText + OUString::number( GetValue() ) + "%"; + rText += unicode::formatPercent(GetValue(), + Application::GetSettings().GetUILanguageTag()); return ePres; default: return SFX_ITEM_PRESENTATION_NONE; @@ -459,7 +462,8 @@ SfxItemPresentation XFillTransparenceItem::GetPresentation case SFX_ITEM_PRESENTATION_COMPLETE: rText = OUString( ResId( RID_SVXSTR_TRANSPARENCE, DIALOG_MGR() ) ) + ": "; case SFX_ITEM_PRESENTATION_NAMELESS: - rText = rText + OUString::number( GetValue() ) + "%"; + rText += unicode::formatPercent(GetValue(), + Application::GetSettings().GetUILanguageTag()); return ePres; default: return SFX_ITEM_PRESENTATION_NONE; |