summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-01-20 13:55:03 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-20 14:46:21 +0000
commitd33b4c311e3b9c0b8f50080cb38a31c19f587a16 (patch)
treebbb66c18dfe5dcdffbfa7d358d6a111bf8e5f518 /sc
parentc6c70c93461d5da4464ef38c8420b53ee609a4d1 (diff)
Related: #i56998# use locale rules to format percentage
Change-Id: I4b744cf10165383153d2a71c05df0c0ed327c641
Diffstat (limited to 'sc')
-rw-r--r--sc/CppunitTest_sc_ucalc.mk1
-rw-r--r--sc/Library_sc.mk1
-rw-r--r--sc/source/core/data/docpool.cxx11
3 files changed, 10 insertions, 3 deletions
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 <comphelper/string.hxx>
+#include <i18nutil/unicode.hxx>
#include <tools/shl.hxx>
#include <vcl/outdev.hxx>
+#include <vcl/svapp.hxx>
#include <svl/aeitem.hxx>
#include <svl/itemiter.hxx>
#include <svl/stritem.hxx>
@@ -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:
{