diff options
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/gallery2/galbrws2.cxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdedtv2.cxx | 8 | ||||
-rw-r--r-- | svx/source/svdraw/svdoashp.cxx | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index d713593d9bff..18e9c814f47b 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -896,7 +896,7 @@ void GalleryBrowser2::ImplUpdateViews( sal_uInt16 nSelectionId ) mpIconView->InsertItem( static_cast<sal_uInt16>(i) ); } - ImplSelectItemId( ( nSelectionId > mpCurTheme->GetObjectCount() ) ? mpCurTheme->GetObjectCount() : nSelectionId ); + ImplSelectItemId( std::min<sal_uInt16>( nSelectionId, mpCurTheme->GetObjectCount() ) ); } switch( GetMode() ) diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index 1ebde1442249..430b987db155 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -717,8 +717,8 @@ basegfx::B2DPolygon SdrEditView::ImpCombineToSinglePolygon(const basegfx::B2DPol const double fRBCA(basegfx::B2DVector(aCA - aRB).getLength()); const double fRBCB(basegfx::B2DVector(aCB - aRB).getLength()); - const double fSmallestRA(fRACA < fRACB ? fRACA : fRACB); - const double fSmallestRB(fRBCA < fRBCB ? fRBCA : fRBCB); + const double fSmallestRA(std::min(fRACA, fRACB)); + const double fSmallestRB(std::min(fRBCA, fRBCB)); if(fSmallestRA < fSmallestRB) { @@ -726,8 +726,8 @@ basegfx::B2DPolygon SdrEditView::ImpCombineToSinglePolygon(const basegfx::B2DPol aRetval.flip(); } - const double fSmallestCA(fRACA < fRBCA ? fRACA : fRBCA); - const double fSmallestCB(fRACB < fRBCB ? fRACB : fRBCB); + const double fSmallestCA(std::min(fRACA, fRBCA)); + const double fSmallestCB(std::min(fRACB, fRBCB)); if(fSmallestCB < fSmallestCA) { diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index ad591651b37e..391196740508 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -899,7 +899,7 @@ void SdrObjCustomShape::MergeDefaultAttributes( const OUString* pType ) } } // check if there are defaulted adjustment values that should be filled the hard coded defaults (pDefValue) - sal_Int32 nCount = nAdjustmentValues > nAdjustmentDefaults ? nAdjustmentDefaults : nAdjustmentValues; + sal_Int32 nCount = std::min(nAdjustmentValues, nAdjustmentDefaults); for ( i = 0; i < nCount; i++ ) { if ( seqAdjustmentValues[ i ].State != css::beans::PropertyState_DIRECT_VALUE ) |