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 --- sw/source/ui/ribbar/workctrl.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sw/source/ui/ribbar') 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 #include +#include #include #include #include @@ -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(); } -- cgit