summaryrefslogtreecommitdiff
path: root/sw/source/ui/ribbar
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 /sw/source/ui/ribbar
parentc6c70c93461d5da4464ef38c8420b53ee609a4d1 (diff)
Related: #i56998# use locale rules to format percentage
Change-Id: I4b744cf10165383153d2a71c05df0c0ed327c641
Diffstat (limited to 'sw/source/ui/ribbar')
-rw-r--r--sw/source/ui/ribbar/workctrl.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx
index 8e660dc829e4..2833fef429cb 100644
--- a/sw/source/ui/ribbar/workctrl.cxx
+++ b/sw/source/ui/ribbar/workctrl.cxx
@@ -19,6 +19,7 @@
#include <string>
#include <comphelper/string.hxx>
+#include <i18nutil/unicode.hxx>
#include <svl/eitem.hxx>
#include <sfx2/htmlmode.hxx>
#include <sfx2/dispatch.hxx>
@@ -643,7 +644,8 @@ SwZoomBox_Impl::SwZoomBox_Impl(
{ 25, 50, 75, 100, 150, 200 };
for(sal_uInt16 i = 0; i < sizeof(aZoomValues)/sizeof(sal_uInt16); i++)
{
- OUString sEntry = OUString::number(aZoomValues[i]) + "%";
+ OUString sEntry = unicode::formatPercent(aZoomValues[i],
+ Application::GetSettings().GetUILanguageTag());
InsertEntry(sEntry);
}
}
@@ -758,8 +760,8 @@ void SwPreviewZoomControl::StateChanged( sal_uInt16 /*nSID*/,
SwZoomBox_Impl* pBox = (SwZoomBox_Impl*)GetToolBox().GetItemWindow( GetId() );
if(SFX_ITEM_AVAILABLE <= eState)
{
- OUString sZoom(OUString::number(((const SfxUInt16Item*)pState)->GetValue()));
- sZoom += "%";
+ OUString sZoom(unicode::formatPercent(((const SfxUInt16Item*)pState)->GetValue(),
+ Application::GetSettings().GetUILanguageTag()));
pBox->SetText(sZoom);
pBox->SaveValue();
}