sw/source/core/docnode/ndtbl1.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit a2f90ebd9a96d869d7417507f41284d739197d3e Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Sun Jan 26 15:04:40 2020 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Sun Jan 26 17:49:24 2020 +0100 Avoid explicit cast to smaller sal_uInt16 from larger long ...in what might be an attempt to avoid warnings about signed vs. unsigned comparisons. Change-Id: Ie3aa77f099df19fc150271b17d06194005bfeec5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87448 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx index 05ca3c0b8133..4bf684197a90 100644 --- a/sw/source/core/docnode/ndtbl1.cxx +++ b/sw/source/core/docnode/ndtbl1.cxx @@ -48,6 +48,7 @@ #include <calbck.hxx> #include <UndoTable.hxx> #include <o3tl/enumrange.hxx> +#include <o3tl/safeint.hxx> using ::editeng::SvxBorderLine; using namespace ::com::sun::star; @@ -1363,7 +1364,7 @@ static void lcl_CalcSubColValues( std::vector<sal_uInt16> &rToFill, const SwTabC if ( nWidth && pCell->getFrameArea().Width() ) { long nTmp = nWidth * nWish / pCell->getFrameArea().Width(); - if ( sal_uInt16(nTmp) > rToFill[i] ) + if ( o3tl::make_unsigned(nTmp) > rToFill[i] ) rToFill[i] = sal_uInt16(nTmp); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits