summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-01-11 15:26:59 +0100
committerStephan Bergmann <sbergman@redhat.com>2019-01-11 20:25:08 +0100
commit27cd397b1a1a8a39843c093eff68c5ea6cb249e7 (patch)
treeecf63804421b12987ae070a24a6ed967f29de1d8 /cui
parent5b19be032c51e0f7489b29c2c98e484587ed0865 (diff)
Drop o3tl/clamp.hxx, use C++17 std::clamp instead
Change-Id: I5043c787dcc3b78bc7fdff130564801194e39f46 Reviewed-on: https://gerrit.libreoffice.org/66177 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/tabpages/transfrm.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx
index 1918f676a15d..3c086e288ce4 100644
--- a/cui/source/tabpages/transfrm.cxx
+++ b/cui/source/tabpages/transfrm.cxx
@@ -19,7 +19,8 @@
#include <sal/config.h>
-#include <o3tl/clamp.hxx>
+#include <algorithm>
+
#include <sfx2/app.hxx>
#include <svx/EnhancedCustomShape2d.hxx>
#include <svx/svdundo.hxx>
@@ -1347,10 +1348,10 @@ void SvxPositionSizeTabPage::SetMinMaxPosition()
}
const double fMaxLong(static_cast<double>(MetricField::ConvertValue( LONG_MAX, 0, MapUnit::Map100thMM, meDlgUnit ) - 1));
- fLeft = o3tl::clamp(fLeft, -fMaxLong, fMaxLong);
- fRight = o3tl::clamp(fRight, -fMaxLong, fMaxLong);
- fTop = o3tl::clamp(fTop, - fMaxLong, fMaxLong);
- fBottom = o3tl::clamp(fBottom, -fMaxLong, fMaxLong);
+ fLeft = std::clamp(fLeft, -fMaxLong, fMaxLong);
+ fRight = std::clamp(fRight, -fMaxLong, fMaxLong);
+ fTop = std::clamp(fTop, - fMaxLong, fMaxLong);
+ fBottom = std::clamp(fBottom, -fMaxLong, fMaxLong);
// #i75273# normalizing when setting the min/max values was wrong, removed
m_xMtrPosX->set_range(basegfx::fround64(fLeft), basegfx::fround64(fRight), FieldUnit::NONE);