svx/source/fmcomp/gridctrl.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit fd66ee183f4ae61d0dff2e732c80edccb2bad362 Author: Stephan Bergmann <[email protected]> AuthorDate: Thu Feb 7 15:04:27 2019 +0100 Commit: Stephan Bergmann <[email protected]> CommitDate: Thu Feb 7 16:04:17 2019 +0100 Keep nW non-negative here ...which happens when GetParent()->GetOutputSizePixel().Width() is zero (as seen, e.g., during JunitTest_forms_unoapi_2). It is assigned to sal_uInt16 nX further down, which then causes failure with Clang's -fsanitize=implicit-signed- integer-truncation. And when the parent size is apparently too small (zero) there is probably no value in operating with a value less than zero here---there won't be a reasonable layout of controls anyway. Change-Id: Ic1fa75f94a9a2878c60fca4cb03e4fbf6f9fda98 Reviewed-on: https://gerrit.libreoffice.org/67507 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <[email protected]> diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index e97bfb8fcaf5..6ea74294722e 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -485,7 +485,7 @@ sal_uInt16 DbGridControl::NavigationBar::ArrangeControls() nX = sal::static_int_cast< sal_uInt16 >(aButtonPos.X() + 1); - nW -= GetSettings().GetStyleSettings().GetScrollBarSize(); + nW = std::max(nW - GetSettings().GetStyleSettings().GetScrollBarSize(), 0L); if (nX > nW) { _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
