summaryrefslogtreecommitdiff
path: root/sw
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
parentc6c70c93461d5da4464ef38c8420b53ee609a4d1 (diff)
Related: #i56998# use locale rules to format percentage
Change-Id: I4b744cf10165383153d2a71c05df0c0ed327c641
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/ribbar/workctrl.cxx8
-rw-r--r--sw/source/ui/utlui/unotools.cxx5
2 files changed, 9 insertions, 4 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();
}
diff --git a/sw/source/ui/utlui/unotools.cxx b/sw/source/ui/utlui/unotools.cxx
index ebc2affdc408..d685b564d0af 100644
--- a/sw/source/ui/utlui/unotools.cxx
+++ b/sw/source/ui/utlui/unotools.cxx
@@ -26,8 +26,10 @@
#include <unotools.hrc>
#include <unotools.hxx>
#include <unoprnms.hxx>
+#include <i18nutil/unicode.hxx>
#include <osl/diagnose.h>
#include <vcl/msgbox.hxx>
+#include <vcl/svapp.hxx>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
#include <com/sun/star/view/XScreenCursor.hpp>
#include <com/sun/star/view/DocumentZoomType.hpp>
@@ -471,7 +473,8 @@ void SwOneExampleFrame::CreatePopup(const Point& rPt)
for (sal_uInt16 i = 0;
i < (sizeof(nZoomValues)/sizeof(nZoomValues[0])); ++i)
{
- OUString sTemp = OUString::number(nZoomValues[i]) + " %";
+ OUString sTemp = unicode::formatPercent(nZoomValues[i],
+ Application::GetSettings().GetUILanguageTag());
aSubPop1.InsertItem( ITEM_ZOOM + i + 1, sTemp);
if(nZoom == nZoomValues[i])
aSubPop1.CheckItem(ITEM_ZOOM + i + 1);