summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
Diffstat (limited to 'svx')
-rw-r--r--svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx2
-rw-r--r--svx/source/table/tablehandles.cxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx
index aaa0f3d14fe7..76af6c23b68e 100644
--- a/svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrframeborderprimitive2d.cxx
@@ -458,7 +458,7 @@ namespace
nBaseIndex = bUpper ? nVisEdgeUp : nVisEdgeDn;
}
- const size_t nSecuredIndex(std::min(nNumCutSets - 1, std::max(nBaseIndex, static_cast< size_t >(0))));
+ const size_t nSecuredIndex(std::clamp(nBaseIndex, size_t(0), size_t(nNumCutSets - 1)));
const CutSet& rCutSet(aCutSets[nSecuredIndex]);
ExtendSet& rExt(rExtendSet[my]);
diff --git a/svx/source/table/tablehandles.cxx b/svx/source/table/tablehandles.cxx
index 222624c2b3fa..4322bf2ea6fe 100644
--- a/svx/source/table/tablehandles.cxx
+++ b/svx/source/table/tablehandles.cxx
@@ -86,7 +86,7 @@ PointerStyle TableEdgeHdl::GetPointer() const
sal_Int32 TableEdgeHdl::GetValidDragOffset( const SdrDragStat& rDrag ) const
{
- return std::min( std::max( static_cast<sal_Int32>(mbHorizontal ? rDrag.GetDY() : rDrag.GetDX()), mnMin ), mnMax );
+ return std::clamp( static_cast<sal_Int32>(mbHorizontal ? rDrag.GetDY() : rDrag.GetDX()), mnMin, mnMax );
}
basegfx::B2DPolyPolygon TableEdgeHdl::getSpecialDragPoly(const SdrDragStat& rDrag) const