diff options
author | Katarina Behrens <bubli@bubli.org> | 2014-11-05 15:52:32 +0100 |
---|---|---|
committer | Katarina Behrens <bubli@bubli.org> | 2014-11-05 17:14:29 +0100 |
commit | ad268373dc4b7d412d0c690d1f4e2b9ad03b3544 (patch) | |
tree | a0fba986360c2d219ac4630e99da14ee5007cc7a /cui | |
parent | callcatcher: update unused code (diff) | |
download | core-ad268373dc4b7d412d0c690d1f4e2b9ad03b3544.tar.gz core-ad268373dc4b7d412d0c690d1f4e2b9ad03b3544.zip |
Use basegfx library function to clamp numbers
Change-Id: I3142f55ecf94ce2143e92492243bc5959322704f
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/tabpages/transfrm.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index ba6587b62374..e1193c14a266 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -1194,10 +1194,10 @@ void SvxPositionSizeTabPage::SetMinMaxPosition() } const double fMaxLong((double)(MetricField::ConvertValue( LONG_MAX, 0, MAP_100TH_MM, meDlgUnit ) - 1L)); - fLeft = (fLeft > fMaxLong) ? fMaxLong : (fLeft < -fMaxLong) ? -fMaxLong : fLeft; - fRight = (fRight > fMaxLong) ? fMaxLong : (fRight < -fMaxLong) ? -fMaxLong : fRight; - fTop = (fTop > fMaxLong) ? fMaxLong : (fTop < -fMaxLong) ? -fMaxLong : fTop; - fBottom = (fBottom > fMaxLong) ? fMaxLong : (fBottom < -fMaxLong) ? -fMaxLong : fBottom; + fLeft = basegfx::clamp(fLeft, -fMaxLong, fMaxLong); + fRight = basegfx::clamp(fRight, -fMaxLong, fMaxLong); + fTop = basegfx::clamp(fTop, - fMaxLong, fMaxLong); + fBottom = basegfx::clamp(fBottom, -fMaxLong, fMaxLong); // #i75273# normalizing when setting the min/max values was wrong, removed m_pMtrPosX->SetMin(basegfx::fround64(fLeft)); |