[Libreoffice-bugs] [Bug 118716] Inner border of an embedded table can't be dragged around

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Jul 18 19:19:10 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=118716

--- Comment #8 from Noel Grandin <noelgrandin at gmail.com> ---
Xisco, your change is correct, my patch was inadvisable.

In this code
   int a;
   std::max<sal_uInt16>(a,0)
std::max will first convert a and b to sal_uInt16, therefore potentially
converting a negative number to a positive number due to the conversion rules.
Then it will take the larger number.

While this code
    int a;
    static_cast<sal_uInt16>(a > 0 ? a : 0)
will compare first, and then convert the larger number to sal_uInt16, which
might result in making a "a" that is larger than 2^16 into a smaller value, but
which will never convert a negative "a" value into a positive value.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180718/4137024c/attachment.html>


More information about the Libreoffice-bugs mailing list