diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-08 17:01:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-01-11 07:35:43 +0100 |
commit | f14b9d30293f180500fc56d81e5390021758e7c1 (patch) | |
tree | a6cd0b853169203cfa0953230e6774e7b1dd81b4 /writerfilter | |
parent | Updated core (diff) | |
download | core-f14b9d30293f180500fc56d81e5390021758e7c1.tar.gz core-f14b9d30293f180500fc56d81e5390021758e7c1.zip |
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 <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/PropertyMap.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index e6b58422b9c6..2ecf76bd2793 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -966,8 +966,8 @@ void SectionPropertyMap::PrepareHeaderFooterProperties( bool bFirstPage ) } //now set the top/bottom margin for the follow page style - Insert( PROP_TOP_MARGIN, uno::makeAny( nTopMargin > 0 ? nTopMargin : 0 ) ); - Insert( PROP_BOTTOM_MARGIN, uno::makeAny( nBottomMargin > 0 ? nBottomMargin : 0 ) ); + Insert( PROP_TOP_MARGIN, uno::makeAny( std::max<sal_Int32>(nTopMargin, 0) ) ); + Insert( PROP_BOTTOM_MARGIN, uno::makeAny( std::max<sal_Int32>(nBottomMargin, 0) ) ); } uno::Reference< beans::XPropertySet > lcl_GetRangeProperties( bool bIsFirstSection, |