[Libreoffice-commits] core.git: svx/Library_svx.mk svx/source

Caolán McNamara caolanm at redhat.com
Mon Jan 20 03:25:47 PST 2014


 svx/Library_svx.mk               |    1 +
 svx/source/stbctrls/zoomctrl.cxx |    9 +++++----
 2 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 4d1b8459f7ed8ba46dfaff00420fc1a698028d3e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Jan 20 11:23:37 2014 +0000

    Related: #i56998# use locale rules to format percentage...
    
    in zoom value and percent on zoom statusbar item.
    
    Change-Id: I0b863ab43399772fb52c4e03e0552fcb933e2832

diff --git a/svx/Library_svx.mk b/svx/Library_svx.mk
index df2aab6..70cf3ef 100644
--- a/svx/Library_svx.mk
+++ b/svx/Library_svx.mk
@@ -51,6 +51,7 @@ $(eval $(call gb_Library_use_libraries,svx,\
     fwe \
     fwk \
     i18nlangtag \
+    i18nutil \
     sal \
     sfx \
     sot \
diff --git a/svx/source/stbctrls/zoomctrl.cxx b/svx/source/stbctrls/zoomctrl.cxx
index b5be076..6e6cf44 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 );
 }
 


More information about the Libreoffice-commits mailing list