diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-01-20 11:23:37 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-01-20 11:25:20 +0000 |
commit | 4d1b8459f7ed8ba46dfaff00420fc1a698028d3e (patch) | |
tree | c0530eea0df11368c98d55267013cd67cde391b0 /svx/source | |
parent | 9df2b09e0a51b070604bde17ff3b03f72ed2786f (diff) |
Related: #i56998# use locale rules to format percentage...
in zoom value and percent on zoom statusbar item.
Change-Id: I0b863ab43399772fb52c4e03e0552fcb933e2832
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/stbctrls/zoomctrl.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/svx/source/stbctrls/zoomctrl.cxx b/svx/source/stbctrls/zoomctrl.cxx index b5be076ec3fd..6e6cf447975f 100644 --- a/svx/source/stbctrls/zoomctrl.cxx +++ b/svx/source/stbctrls/zoomctrl.cxx @@ -17,7 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <i18nutil/unicode.hxx> #include <tools/shl.hxx> +#include <vcl/svapp.hxx> #include <vcl/status.hxx> #include <vcl/menu.hxx> #include <sfx2/dispatch.hxx> @@ -120,8 +122,8 @@ void SvxZoomStatusBarControl::StateChanged( sal_uInt16, SfxItemState eState, { const SfxUInt16Item* pItem = (const SfxUInt16Item*)pState; nZoom = pItem->GetValue(); - OUString aStr( OUString::number(nZoom) ); - aStr += "%"; + + OUString aStr(unicode::formatPercent(nZoom, Application::GetSettings().GetUILanguageTag())); GetStatusBar().SetItemText( GetId(), aStr ); if ( pState->ISA(SvxZoomItem) ) @@ -140,8 +142,7 @@ void SvxZoomStatusBarControl::StateChanged( sal_uInt16, SfxItemState eState, void SvxZoomStatusBarControl::Paint( const UserDrawEvent& ) { - OUString aStr( OUString::number( nZoom )); - aStr += "%"; + OUString aStr(unicode::formatPercent(nZoom, Application::GetSettings().GetUILanguageTag())); GetStatusBar().SetItemText( GetId(), aStr ); } |