diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-01-11 15:26:59 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-01-11 20:25:08 +0100 |
commit | 27cd397b1a1a8a39843c093eff68c5ea6cb249e7 (patch) | |
tree | ecf63804421b12987ae070a24a6ed967f29de1d8 /filter | |
parent | 5b19be032c51e0f7489b29c2c98e484587ed0865 (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 'filter')
-rw-r--r-- | filter/source/msfilter/escherex.cxx | 7 | ||||
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 9 |
2 files changed, 8 insertions, 8 deletions
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 9cf10f14acbf..52f83f00f8ab 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -19,7 +19,6 @@ #include "eschesdo.hxx" #include <o3tl/any.hxx> -#include <o3tl/clamp.hxx> #include <o3tl/make_unique.hxx> #include <svx/svdxcgv.hxx> #include <svx/svdomedia.hxx> @@ -98,6 +97,8 @@ #include <sal/log.hxx> #include <basegfx/polygon/b2dpolypolygontools.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> + +#include <algorithm> #include <memory> using namespace css; @@ -2929,12 +2930,12 @@ void EscherPropertyContainer::CreateCustomShapeProperties( const MSO_SPT eShapeT { aMemStrm.WriteUInt16( equation.nOperation ) .WriteInt16( - o3tl::clamp( + std::clamp( equation.nPara[ 0 ], sal_Int32(SAL_MIN_INT16), sal_Int32(SAL_MAX_INT16)) ) .WriteInt16( equation.nPara[ 1 ] ) .WriteInt16( - o3tl::clamp( + std::clamp( equation.nPara[ 2 ], sal_Int32(SAL_MIN_INT16), sal_Int32(SAL_MAX_INT16)) ); } diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 18aacd8e6803..03f9dc9d1cf7 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -19,7 +19,6 @@ #include <sal/config.h> -#include <o3tl/clamp.hxx> #include <osl/endian.h> #include <vcl/svapp.hxx> #include <unotools/tempfile.hxx> @@ -287,11 +286,11 @@ SvStream& ReadPptDocumentAtom(SvStream& rIn, PptDocumentAtom& rAtom) .ReadSChar( nShowComments ); // clamp dodgy data to avoid overflow in later calculations const sal_Int32 nPageClamp = SAL_MAX_INT32/5; - rAtom.aSlidesPageSize.setWidth( o3tl::clamp<sal_Int32>(nSlideX, -nPageClamp, nPageClamp) ); - rAtom.aSlidesPageSize.setHeight( o3tl::clamp<sal_Int32>(nSlideY, -nPageClamp, nPageClamp) ); + rAtom.aSlidesPageSize.setWidth( std::clamp<sal_Int32>(nSlideX, -nPageClamp, nPageClamp) ); + rAtom.aSlidesPageSize.setHeight( std::clamp<sal_Int32>(nSlideY, -nPageClamp, nPageClamp) ); const sal_Int32 nNoteClamp = 65536; - rAtom.aNotesPageSize.setWidth( o3tl::clamp<sal_Int32>(nNoticeX, -nNoteClamp, nNoteClamp) ); - rAtom.aNotesPageSize.setHeight( o3tl::clamp<sal_Int32>(nNoticeY, -nNoteClamp, nNoteClamp) ); + rAtom.aNotesPageSize.setWidth( std::clamp<sal_Int32>(nNoticeX, -nNoteClamp, nNoteClamp) ); + rAtom.aNotesPageSize.setHeight( std::clamp<sal_Int32>(nNoticeY, -nNoteClamp, nNoteClamp) ); rAtom.eSlidesPageFormat = static_cast<PptPageFormat>(nSlidePageFormat); rAtom.bEmbeddedTrueType = nEmbeddedTrueType; rAtom.bTitlePlaceholdersOmitted = nTitlePlaceHoldersOmitted; |