You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ar...@apache.org on 2022/03/22 18:23:54 UTC

[openoffice] branch trunk updated: Treat negative values correctly

This is an automated email from the ASF dual-hosted git repository.

ardovm pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 1dfc6c9  Treat negative values correctly
1dfc6c9 is described below

commit 1dfc6c9463fbb9b844e2b5cbe65eeb832bc1a977
Author: Arrigo Marchiori <ar...@yahoo.it>
AuthorDate: Tue Mar 22 19:21:31 2022 +0100

    Treat negative values correctly
    
    Fixes bug #128461
    
    Thanks to Czesław Wolański for pointing out the problem and the
    solution.
---
 main/sw/source/ui/ribbar/workctrl.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/main/sw/source/ui/ribbar/workctrl.cxx b/main/sw/source/ui/ribbar/workctrl.cxx
index 97d0644..cd65eab 100644
--- a/main/sw/source/ui/ribbar/workctrl.cxx
+++ b/main/sw/source/ui/ribbar/workctrl.cxx
@@ -817,13 +817,13 @@ void    SwZoomBox_Impl::Select()
     {
         String sEntry(GetText());
         sEntry.EraseAllChars( '%' );
-        sal_uInt16 nZoom = (sal_uInt16)sEntry.ToInt32();
+        sal_Int32 nZoom = sEntry.ToInt32();
         if(nZoom < MINZOOM)
             nZoom = MINZOOM;
         if(nZoom > MAXZOOM)
             nZoom = MAXZOOM;
 
-        SfxUInt16Item aItem( nSlotId, nZoom );
+        SfxUInt16Item aItem( nSlotId, (sal_uInt16)nZoom );
         if ( FN_PREVIEW_ZOOM == nSlotId )
         {
             Any a;