From f14b9d30293f180500fc56d81e5390021758e7c1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 8 Jan 2018 17:01:49 +0200 Subject: convert (a>b?a:b) to std::max(a,b) with something like: git grep -nP '(.*)\s*>\s*(.*)\s*\?\s*\g1\s*:\s*\g2' Change-Id: I60b9a3a2a09162bc0de4c13fdde2c209696e5413 Reviewed-on: https://gerrit.libreoffice.org/47602 Tested-by: Jenkins Reviewed-by: Noel Grandin --- cui/source/customize/SvxToolbarConfigPage.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cui/source') diff --git a/cui/source/customize/SvxToolbarConfigPage.cxx b/cui/source/customize/SvxToolbarConfigPage.cxx index 4ee96a3ef0af..eeb2912ba56a 100644 --- a/cui/source/customize/SvxToolbarConfigPage.cxx +++ b/cui/source/customize/SvxToolbarConfigPage.cxx @@ -875,7 +875,7 @@ Image SvxToolbarEntriesListBox::GetSizedImage( // We need 2 pixels to have a bigger border to the next button image sal_uInt16 nPosX = std::max( (sal_uInt16) (((( aNewSize.Width() - 2 ) - aImage.GetSizePixel().Width() ) / 2 ) - 1), (sal_uInt16) 0 ); sal_uInt16 nPosY = std::max( (sal_uInt16) (((( aNewSize.Height() - 2 ) - aImage.GetSizePixel().Height() ) / 2 ) + 1), (sal_uInt16) 0 ); - Point aPos( nPosX > 0 ? nPosX : 0, nPosY > 0 ? nPosY : 0 ); + Point aPos( std::max(nPosX, 0), std::max(nPosY, 0) ); rVDev.SetFillColor( aFillColor ); rVDev.SetLineColor( aFillColor ); rVDev.DrawRect( ::tools::Rectangle( Point(), aNewSize )); -- cgit