summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-01-25 13:38:41 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-01-25 17:11:44 +0100
commita6192281a04c20bc57b1ffa4f6645ca639d5b1a4 (patch)
tree3455caa30b6fbaf67d88940e8f577bf30ac2f115 /svtools
parent9bcaaae1dd0fcb74687066b6f6215e487af804b2 (diff)
Avoid explicit cast to smaller sal_uInt16 from larger long
...in what might be an attempt to avoid warnings about signed vs. unsigned comparisons. (The mismatch had been there ever since 8ab086b6cc054501bfbf7ef6fa509c393691e860 "initial import".) Change-Id: I35c849ac5a850cfb2379d7b29e6da6308611c3d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87396 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/brwbox/brwbox2.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/svtools/source/brwbox/brwbox2.cxx b/svtools/source/brwbox/brwbox2.cxx
index 10a4202f71c4..8daede5fa7b9 100644
--- a/svtools/source/brwbox/brwbox2.cxx
+++ b/svtools/source/brwbox/brwbox2.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/log.hxx>
+#include <o3tl/safeint.hxx>
#include <osl/diagnose.h>
#include <tools/debug.hxx>
#include <svtools/brwbox.hxx>
@@ -1359,7 +1360,7 @@ void BrowseBox::MouseMove( const MouseEvent& rEvt )
sal_uInt16 nX = 0;
for ( size_t nCol = 0;
nCol < mvCols.size() &&
- ( nX + mvCols[ nCol ]->Width() ) < sal_uInt16(GetOutputSizePixel().Width());
+ ( nX + mvCols[ nCol ]->Width() ) < o3tl::make_unsigned(GetOutputSizePixel().Width());
++nCol )
// is this column visible?
if ( mvCols[ nCol ]->IsFrozen() || nCol >= nFirstCol )