summaryrefslogtreecommitdiff
path: root/drawinglayer/source/attribute
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 /drawinglayer/source/attribute
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 'drawinglayer/source/attribute')
-rw-r--r--drawinglayer/source/attribute/fillgraphicattribute.cxx9
-rw-r--r--drawinglayer/source/attribute/sdrfillgraphicattribute.cxx9
2 files changed, 12 insertions, 6 deletions
diff --git a/drawinglayer/source/attribute/fillgraphicattribute.cxx b/drawinglayer/source/attribute/fillgraphicattribute.cxx
index 406486ce794b..72da948fc96c 100644
--- a/drawinglayer/source/attribute/fillgraphicattribute.cxx
+++ b/drawinglayer/source/attribute/fillgraphicattribute.cxx
@@ -17,8 +17,11 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <algorithm>
+
#include <drawinglayer/attribute/fillgraphicattribute.hxx>
-#include <o3tl/clamp.hxx>
#include <vcl/graph.hxx>
namespace drawinglayer
@@ -99,8 +102,8 @@ namespace drawinglayer
double fOffsetY)
: mpFillGraphicAttribute(ImpFillGraphicAttribute(
rGraphic, rGraphicRange, bTiling,
- o3tl::clamp(fOffsetX, 0.0, 1.0),
- o3tl::clamp(fOffsetY, 0.0, 1.0)))
+ std::clamp(fOffsetX, 0.0, 1.0),
+ std::clamp(fOffsetY, 0.0, 1.0)))
{
}
diff --git a/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx b/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx
index 84fbaea1d998..b88b2a9a31a5 100644
--- a/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx
+++ b/drawinglayer/source/attribute/sdrfillgraphicattribute.cxx
@@ -17,9 +17,12 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <algorithm>
+
#include <drawinglayer/attribute/sdrfillgraphicattribute.hxx>
#include <drawinglayer/attribute/fillgraphicattribute.hxx>
-#include <o3tl/clamp.hxx>
#include <rtl/instance.hxx>
#include <vcl/graph.hxx>
@@ -290,8 +293,8 @@ namespace drawinglayer
}
// get offset in percent
- const double fOffsetX(o3tl::clamp(getOffset().getX() * 0.01, 0.0, 1.0));
- const double fOffsetY(o3tl::clamp(getOffset().getY() * 0.01, 0.0, 1.0));
+ const double fOffsetX(std::clamp(getOffset().getX() * 0.01, 0.0, 1.0));
+ const double fOffsetY(std::clamp(getOffset().getY() * 0.01, 0.0, 1.0));
// create FillGraphicAttribute
return FillGraphicAttribute(