sw/source/uibase/ribbar/inputwin.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 04404a2edd1121f518ff28bebdd74b45df228280 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Sun Jan 26 15:07:40 2020 +0100 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Sun Jan 26 19:38:47 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: I19be3cc0510b8628e961d840f51b0c9480aee746 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87450 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx index cc1bc1705050..47e551f69c8e 100644 --- a/sw/source/uibase/ribbar/inputwin.cxx +++ b/sw/source/uibase/ribbar/inputwin.cxx @@ -21,6 +21,7 @@ #include <sal/log.hxx> #include <comphelper/string.hxx> +#include <o3tl/safeint.hxx> #include <officecfg/Office/Common.hxx> #include <tools/gen.hxx> #include <sfx2/objface.hxx> @@ -527,7 +528,7 @@ void InputEdit::UpdateRange(const OUString& rBoxes, ++nEndPos; } // Only if the current position lies in the range or right behind. - if( bFound && !( nStartPos < static_cast<sal_uInt16>(aSelection.Max()) && + if( bFound && !( nStartPos < o3tl::make_unsigned(aSelection.Max()) && static_cast<sal_uInt16>(aSelection.Max()) <= nEndPos + 1 )) bFound = false; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits