From d33b4c311e3b9c0b8f50080cb38a31c19f587a16 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 20 Jan 2014 13:55:03 +0000 Subject: Related: #i56998# use locale rules to format percentage Change-Id: I4b744cf10165383153d2a71c05df0c0ed327c641 --- sc/CppunitTest_sc_ucalc.mk | 1 + sc/Library_sc.mk | 1 + sc/source/core/data/docpool.cxx | 11 ++++++++--- 3 files changed, 10 insertions(+), 3 deletions(-) (limited to 'sc') diff --git a/sc/CppunitTest_sc_ucalc.mk b/sc/CppunitTest_sc_ucalc.mk index b7370a23b7ef..20001e51276f 100644 --- a/sc/CppunitTest_sc_ucalc.mk +++ b/sc/CppunitTest_sc_ucalc.mk @@ -50,6 +50,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sc_ucalc, \ for \ forui \ i18nlangtag \ + i18nutil \ sal \ salhelper \ sax \ diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk index a7f15a9462df..d75ce95730b5 100644 --- a/sc/Library_sc.mk +++ b/sc/Library_sc.mk @@ -71,6 +71,7 @@ $(eval $(call gb_Library_use_libraries,sc,\ for \ forui \ i18nlangtag \ + i18nutil \ sal \ salhelper \ sax \ diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx index 098790ccca40..232a11407331 100644 --- a/sc/source/core/data/docpool.cxx +++ b/sc/source/core/data/docpool.cxx @@ -20,8 +20,10 @@ #include "scitems.hxx" #include +#include #include #include +#include #include #include #include @@ -743,7 +745,8 @@ static SfxItemPresentation lcl_HFPresentation aText = EE_RESSTR(RID_SVXITEMS_LRSPACE_LEFT); if ( 100 != nPropLeftMargin ) { - aText = aText + OUString::number( nPropLeftMargin ) + "%"; + aText = aText + unicode::formatPercent(nPropLeftMargin, + Application::GetSettings().GetUILanguageTag()); } else { @@ -758,7 +761,8 @@ static SfxItemPresentation lcl_HFPresentation aText += EE_RESSTR(RID_SVXITEMS_LRSPACE_RIGHT); if ( 100 != nPropRightMargin ) { - aText = aText + OUString::number( nPropLeftMargin ) + "%"; + aText = aText + unicode::formatPercent(nPropLeftMargin, + Application::GetSettings().GetUILanguageTag()); } else { @@ -974,7 +978,8 @@ SfxItemPresentation ScDocumentPool::GetPresentation( rText = ScGlobal::GetRscString(STR_SCATTR_PAGE_SCALE) + aStrSep; // break; // DURCHFALLEN!!! case SFX_ITEM_PRESENTATION_NAMELESS: - rText = rText + OUString::number( nPercent ) + "%"; + rText = rText + unicode::formatPercent(nPercent, + Application::GetSettings().GetUILanguageTag()); break; default: { -- cgit