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 /slideshow | |
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 'slideshow')
-rw-r--r-- | slideshow/source/engine/activities/activitybase.cxx | 4 | ||||
-rw-r--r-- | slideshow/source/engine/animationnodes/animationbasenode.cxx | 3 | ||||
-rw-r--r-- | slideshow/source/engine/shapes/viewshape.cxx | 4 |
3 files changed, 8 insertions, 3 deletions
diff --git a/slideshow/source/engine/activities/activitybase.cxx b/slideshow/source/engine/activities/activitybase.cxx index 282604232f69..4ee7c84bcc72 100644 --- a/slideshow/source/engine/activities/activitybase.cxx +++ b/slideshow/source/engine/activities/activitybase.cxx @@ -17,7 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> +#include <o3tl/clamp.hxx> #include <tools/diagnose_ex.h> #include <canvas/canvastools.hxx> @@ -146,7 +148,7 @@ namespace slideshow // ================================ // clamp nT to permissible [0,1] range - nT = ::basegfx::clamp( nT, 0.0, 1.0 ); + nT = o3tl::clamp( nT, 0.0, 1.0 ); // take acceleration/deceleration into account. if the sum // of mnAccelerationFraction and mnDecelerationFraction diff --git a/slideshow/source/engine/animationnodes/animationbasenode.cxx b/slideshow/source/engine/animationnodes/animationbasenode.cxx index 74bd447f7808..f1f320feae89 100644 --- a/slideshow/source/engine/animationnodes/animationbasenode.cxx +++ b/slideshow/source/engine/animationnodes/animationbasenode.cxx @@ -20,6 +20,7 @@ #include <cppuhelper/exc_hlp.hxx> #include <comphelper/anytostring.hxx> +#include <o3tl/clamp.hxx> #include <sal/log.hxx> #include <com/sun/star/presentation/ParagraphTarget.hpp> #include <com/sun/star/animations/Timing.hpp> @@ -449,7 +450,7 @@ AnimationBaseNode::fillCommonParameters() const // Calculate the minimum frame count that depends on the duration and // the minimum frame count. - const sal_Int32 nMinFrameCount (basegfx::clamp<sal_Int32>( + const sal_Int32 nMinFrameCount (o3tl::clamp<sal_Int32>( basegfx::fround(nDuration * FrameRate::MinimumFramesPerSecond), 1, 10)); return ActivitiesFactory::CommonParameters( diff --git a/slideshow/source/engine/shapes/viewshape.cxx b/slideshow/source/engine/shapes/viewshape.cxx index 9fb337a2967a..e26865accbe8 100644 --- a/slideshow/source/engine/shapes/viewshape.cxx +++ b/slideshow/source/engine/shapes/viewshape.cxx @@ -17,7 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <sal/config.h> +#include <o3tl/clamp.hxx> #include <tools/diagnose_ex.h> #include <math.h> @@ -434,7 +436,7 @@ namespace slideshow if( mbForceUpdate || (nUpdateFlags & UpdateFlags::Alpha) ) { mpSprite->setAlpha( (pAttr && pAttr->isAlphaValid()) ? - ::basegfx::clamp(pAttr->getAlpha(), + o3tl::clamp(pAttr->getAlpha(), 0.0, 1.0) : 1.0 ); |