From 35d99caff4c624285a246e7c76a2660205a1d715 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 18 Mar 2014 16:34:22 +0000 Subject: Related: #i56998# use locale rules to format percentage Change-Id: I9d27359fe2c343593455eebf69bca6efdb7c5079 --- sw/Library_swui.mk | 1 + sw/source/ui/dbui/mmlayoutpage.cxx | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sw/Library_swui.mk b/sw/Library_swui.mk index 6c7f3559126c..af18cfe8f1f7 100644 --- a/sw/Library_swui.mk +++ b/sw/Library_swui.mk @@ -48,6 +48,7 @@ $(eval $(call gb_Library_use_libraries,swui,\ cppuhelper \ editeng \ i18nlangtag \ + i18nutil \ msfilter \ sal \ sfx \ diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx index 186326392739..813766220782 100644 --- a/sw/source/ui/dbui/mmlayoutpage.cxx +++ b/sw/source/ui/dbui/mmlayoutpage.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -51,6 +52,7 @@ #include #include #include +#include #include #include @@ -126,9 +128,10 @@ SwMailMergeLayoutPage::SwMailMergeLayoutPage( SwMailMergeWizard* _pParent) : m_pLeftMF->SetValue(m_pLeftMF->Normalize(DEFAULT_LEFT_DISTANCE), FUNIT_TWIP); m_pTopMF->SetValue(m_pTopMF->Normalize(DEFAULT_TOP_DISTANCE), FUNIT_TWIP); - m_pZoomLB->InsertEntry(OUString("50 %"), 1); - m_pZoomLB->InsertEntry(OUString("75 %"), 2); - m_pZoomLB->InsertEntry(OUString("100 %"), 3); + const LanguageTag& rLang = Application::GetSettings().GetUILanguageTag(); + m_pZoomLB->InsertEntry(unicode::formatPercent(50, rLang), 1); + m_pZoomLB->InsertEntry(unicode::formatPercent(75, rLang), 2); + m_pZoomLB->InsertEntry(unicode::formatPercent(100, rLang), 3); m_pZoomLB->SelectEntryPos(0); //page size m_pZoomLB->SetSelectHdl(LINK(this, SwMailMergeLayoutPage, ZoomHdl_Impl)); -- cgit v1.2.3