sw/source/core/text/itratr.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
New commits: commit c35d44ff72eb00c9f572870734e4d1832e8d9a5e Author: Stephan Bergmann <sberg...@redhat.com> Date: Thu Feb 1 11:33:05 2018 +0100 Use std::max (with the nice side-effect of removing one more false -Wsign-compare from Android builds where USHRT_MAX is erroneously of type unsigned int) (the original cast of rMax (of some unsigned type) to (signed) long had probably originally been added to silence some signed-vs.-unsigned comparison warning, so would no longer be necessary when using std::max) Change-Id: I26212e731e26d885b848c7351a9ca5f9735e1f78 Reviewed-on: https://gerrit.libreoffice.org/49081 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx index 10fb397e3092..baf09a0f30fa 100644 --- a/sw/source/core/text/itratr.cxx +++ b/sw/source/core/text/itratr.cxx @@ -17,6 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + +#include <algorithm> + #include <hintids.hxx> #include <editeng/charscaleitem.hxx> #include <txtatr.hxx> @@ -694,8 +698,7 @@ void SwTextNode::GetMinMaxSize( sal_uLong nIndex, sal_uLong& rMin, sal_uLong &rM // It were cleaner and maybe necessary later on to iterate over the content // of the text frame and call GetMinMaxSize recursively nAktWidth = FLYINCNT_MIN_WIDTH; // 0.5 cm - if( static_cast<long>(rMax) < USHRT_MAX ) - rMax = USHRT_MAX; + rMax = std::max(rMax, sal_uLong(USHRT_MAX)); } else nAktWidth = pFrameFormat->GetFrameSize().GetWidth(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits