From 27cd397b1a1a8a39843c093eff68c5ea6cb249e7 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 11 Jan 2019 15:26:59 +0100 Subject: 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 --- svgio/source/svgreader/svgstyleattributes.cxx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'svgio') diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx index fd17e3ee3241..b0c45fb90372 100644 --- a/svgio/source/svgreader/svgstyleattributes.cxx +++ b/svgio/source/svgreader/svgstyleattributes.cxx @@ -19,7 +19,8 @@ #include -#include +#include + #include #include #include @@ -1330,7 +1331,7 @@ namespace svgio setFill(aSvgPaint); if(aOpacity.isSet()) { - setOpacity(SvgNumber(o3tl::clamp(aOpacity.getNumber(), 0.0, 1.0))); + setOpacity(SvgNumber(std::clamp(aOpacity.getNumber(), 0.0, 1.0))); } } else if(!aURL.isEmpty()) @@ -1357,7 +1358,7 @@ namespace svgio if(readSingleNumber(aContent, aNum)) { - maFillOpacity = SvgNumber(o3tl::clamp(aNum.getNumber(), 0.0, 1.0), aNum.getUnit(), aNum.isSet()); + maFillOpacity = SvgNumber(std::clamp(aNum.getNumber(), 0.0, 1.0), aNum.getUnit(), aNum.isSet()); } break; } @@ -1387,7 +1388,7 @@ namespace svgio maStroke = aSvgPaint; if(aOpacity.isSet()) { - setOpacity(SvgNumber(o3tl::clamp(aOpacity.getNumber(), 0.0, 1.0))); + setOpacity(SvgNumber(std::clamp(aOpacity.getNumber(), 0.0, 1.0))); } } else if(!aURL.isEmpty()) @@ -1500,7 +1501,7 @@ namespace svgio if(readSingleNumber(aContent, aNum)) { - maStrokeOpacity = SvgNumber(o3tl::clamp(aNum.getNumber(), 0.0, 1.0), aNum.getUnit(), aNum.isSet()); + maStrokeOpacity = SvgNumber(std::clamp(aNum.getNumber(), 0.0, 1.0), aNum.getUnit(), aNum.isSet()); } break; } @@ -1528,7 +1529,7 @@ namespace svgio maStopColor = aSvgPaint; if(aOpacity.isSet()) { - setOpacity(SvgNumber(o3tl::clamp(aOpacity.getNumber(), 0.0, 1.0))); + setOpacity(SvgNumber(std::clamp(aOpacity.getNumber(), 0.0, 1.0))); } } break; @@ -1841,7 +1842,7 @@ namespace svgio maColor = aSvgPaint; if(aOpacity.isSet()) { - setOpacity(SvgNumber(o3tl::clamp(aOpacity.getNumber(), 0.0, 1.0))); + setOpacity(SvgNumber(std::clamp(aOpacity.getNumber(), 0.0, 1.0))); } } break; @@ -1852,7 +1853,7 @@ namespace svgio if(readSingleNumber(aContent, aNum)) { - setOpacity(SvgNumber(o3tl::clamp(aNum.getNumber(), 0.0, 1.0), aNum.getUnit(), aNum.isSet())); + setOpacity(SvgNumber(std::clamp(aNum.getNumber(), 0.0, 1.0), aNum.getUnit(), aNum.isSet())); } break; } -- cgit v1.2.3