From 4706cecf542b08c6af24bdddf61ccf912f515e13 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 20 Jan 2014 11:18:11 +0000 Subject: Related: #i56998# use locale rules to format percentage... in Combine single line paragraphs option in AutoCorrect dialog Change-Id: I5af78ff31031a92a4f772d9c26bee05c3695cad1 --- cui/Library_cui.mk | 1 + cui/source/tabpages/autocdlg.cxx | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cui/Library_cui.mk b/cui/Library_cui.mk index 19d23451bf06..cc80cf419bce 100644 --- a/cui/Library_cui.mk +++ b/cui/Library_cui.mk @@ -40,6 +40,7 @@ $(eval $(call gb_Library_use_libraries,cui,\ drawinglayer \ editeng \ i18nlangtag \ + i18nutil \ $(if $(ENABLE_JAVA), \ jvmfwk) \ lng \ diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 0fb4c17fcdc8..67a2181ef86e 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include #include #include #include @@ -659,7 +660,8 @@ void OfaSwAutoFmtOptionsPage::Reset( const SfxItemSet& ) m_pCheckLB->SetUserData( REPLACE_BULLETS, pUserData ); nPercent = pOpt->nRightMargin; - sMargin = " " + OUString::number( nPercent ) + "%"; + sMargin = " " + + unicode::formatPercent(nPercent, Application::GetSettings().GetUILanguageTag()); pUserData = new ImpUserData(&sMargin, 0); m_pCheckLB->SetUserData( MERGE_SINGLE_LINE_PARA, pUserData ); @@ -713,7 +715,8 @@ IMPL_LINK_NOARG(OfaSwAutoFmtOptionsPage, EditHdl) if(RET_OK == aDlg.Execute()) { nPercent = (sal_uInt16)aDlg.GetPrcntFld().GetValue(); - sMargin = " " + OUString::number( nPercent ) + "%"; + sMargin = " " + + unicode::formatPercent(nPercent, Application::GetSettings().GetUILanguageTag()); } } m_pCheckLB->Invalidate(); -- cgit