<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Inner border of an embedded table can't be dragged around"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=118716#c8">Comment # 8</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Inner border of an embedded table can't be dragged around"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=118716">bug 118716</a>
from <span class="vcard"><a class="email" href="mailto:noelgrandin@gmail.com" title="Noel Grandin <noelgrandin@gmail.com>"> <span class="fn">Noel Grandin</span></a>
</span></b>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>