diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-08-17 16:32:17 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-08-17 20:13:21 +0200 |
commit | f4351535f3bf10b94cccc721ab395e2c7f5010a4 (patch) | |
tree | 19c18c568867d47918fad11b5c2bd70459cf74cc /svgio | |
parent | 13db6e8671c36e1a028d6a8ad63f518e60f84870 (diff) |
Consolidate: basegfx::clamp -> o3tl::clamp
Change-Id: Iffd8b0a19d4479b6c70dc834c6f64499e87e01b1
Reviewed-on: https://gerrit.libreoffice.org/59265
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'svgio')
-rw-r--r-- | svgio/source/svgreader/svgstyleattributes.cxx | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx index 17efe6793b3e..8e6d9ea49fef 100644 --- a/svgio/source/svgreader/svgstyleattributes.cxx +++ b/svgio/source/svgreader/svgstyleattributes.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> + +#include <o3tl/clamp.hxx> #include <svgstyleattributes.hxx> #include <drawinglayer/primitive2d/transformprimitive2d.hxx> #include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx> @@ -1325,7 +1328,7 @@ namespace svgio setFill(aSvgPaint); if(aOpacity.isSet()) { - setOpacity(SvgNumber(basegfx::clamp(aOpacity.getNumber(), 0.0, 1.0))); + setOpacity(SvgNumber(o3tl::clamp(aOpacity.getNumber(), 0.0, 1.0))); } } else if(!aURL.isEmpty()) @@ -1352,7 +1355,7 @@ namespace svgio if(readSingleNumber(aContent, aNum)) { - maFillOpacity = SvgNumber(basegfx::clamp(aNum.getNumber(), 0.0, 1.0), aNum.getUnit(), aNum.isSet()); + maFillOpacity = SvgNumber(o3tl::clamp(aNum.getNumber(), 0.0, 1.0), aNum.getUnit(), aNum.isSet()); } break; } @@ -1382,7 +1385,7 @@ namespace svgio maStroke = aSvgPaint; if(aOpacity.isSet()) { - setOpacity(SvgNumber(basegfx::clamp(aOpacity.getNumber(), 0.0, 1.0))); + setOpacity(SvgNumber(o3tl::clamp(aOpacity.getNumber(), 0.0, 1.0))); } } else if(!aURL.isEmpty()) @@ -1495,7 +1498,7 @@ namespace svgio if(readSingleNumber(aContent, aNum)) { - maStrokeOpacity = SvgNumber(basegfx::clamp(aNum.getNumber(), 0.0, 1.0), aNum.getUnit(), aNum.isSet()); + maStrokeOpacity = SvgNumber(o3tl::clamp(aNum.getNumber(), 0.0, 1.0), aNum.getUnit(), aNum.isSet()); } break; } @@ -1523,7 +1526,7 @@ namespace svgio maStopColor = aSvgPaint; if(aOpacity.isSet()) { - setOpacity(SvgNumber(basegfx::clamp(aOpacity.getNumber(), 0.0, 1.0))); + setOpacity(SvgNumber(o3tl::clamp(aOpacity.getNumber(), 0.0, 1.0))); } } break; @@ -1836,7 +1839,7 @@ namespace svgio maColor = aSvgPaint; if(aOpacity.isSet()) { - setOpacity(SvgNumber(basegfx::clamp(aOpacity.getNumber(), 0.0, 1.0))); + setOpacity(SvgNumber(o3tl::clamp(aOpacity.getNumber(), 0.0, 1.0))); } } break; @@ -1847,7 +1850,7 @@ namespace svgio if(readSingleNumber(aContent, aNum)) { - setOpacity(SvgNumber(basegfx::clamp(aNum.getNumber(), 0.0, 1.0), aNum.getUnit(), aNum.isSet())); + setOpacity(SvgNumber(o3tl::clamp(aNum.getNumber(), 0.0, 1.0), aNum.getUnit(), aNum.isSet())); } break; } |