[Libreoffice-commits] core.git: vcl/source

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Wed Aug 14 11:57:24 UTC 2019


 vcl/source/window/window2.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d3d13140f0036c53aa74820b41acfeffa3572168
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Aug 14 11:20:04 2019 +0200
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Aug 14 13:56:29 2019 +0200

    tdf#126912: Fix convertsToAtLeast/Most mismatch
    
    ...introduced with 2abea7b8799f20ae2f47bb9f938670dea4f4f09f "Fix Clang 10
    -Werror,-Wimplicit-int-float-conversion"
    
    Change-Id: Ic1eb21e61695177729305e429a5f17daadaab9ae
    Reviewed-on: https://gerrit.libreoffice.org/77447
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx
index 16f202ee09df..3a6e4709bfd4 100644
--- a/vcl/source/window/window2.cxx
+++ b/vcl/source/window/window2.cxx
@@ -600,9 +600,9 @@ static void lcl_HandleScrollHelper( ScrollBar* pScrl, double nN, bool isMultiply
 
             const double fVal = nNewPos - nN;
 
-            if ( !o3tl::convertsToAtMost(fVal, LONG_MIN) )
+            if ( !o3tl::convertsToAtLeast(fVal, LONG_MIN) )
                 nNewPos = LONG_MIN;
-            else if ( !o3tl::convertsToAtLeast(fVal, LONG_MAX) )
+            else if ( !o3tl::convertsToAtMost(fVal, LONG_MAX) )
                 nNewPos = LONG_MAX;
             else
                 nNewPos = static_cast<long>(fVal);


More information about the Libreoffice-commits mailing list