diff options
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/items/borderline.cxx | 2 | ||||
-rw-r--r-- | editeng/source/uno/unoedhlp.cxx | 2 | ||||
-rw-r--r-- | editeng/source/uno/unotext2.cxx | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/editeng/source/items/borderline.cxx b/editeng/source/items/borderline.cxx index 3005e3161827..e62b15d4c73d 100644 --- a/editeng/source/items/borderline.cxx +++ b/editeng/source/items/borderline.cxx @@ -192,7 +192,7 @@ ConvertBorderWidthFromWord(SvxBorderLineStyle const eStyle, double const i_fWidt case 2: return (fWidth * 2.0); // thick case 5: // fdo#55526: map 0 hairline width to > 0 - return (fWidth > 1.0) ? fWidth : 1.0; + return std::max(fWidth, 1.0); default: return fWidth; } diff --git a/editeng/source/uno/unoedhlp.cxx b/editeng/source/uno/unoedhlp.cxx index 767a7c14b41f..ee34063b5a67 100644 --- a/editeng/source/uno/unoedhlp.cxx +++ b/editeng/source/uno/unoedhlp.cxx @@ -144,7 +144,7 @@ bool SvxEditSourceHelper::GetAttributeRun( sal_Int32& nStartIndex, sal_Int32& nE nClosestStartIndex_e = nCurrIndex; } } - sal_Int32 nClosestStartIndex = nClosestStartIndex_s > nClosestStartIndex_e ? nClosestStartIndex_s : nClosestStartIndex_e; + sal_Int32 nClosestStartIndex = std::max(nClosestStartIndex_s, nClosestStartIndex_e); // find closest index behind of nIndex sal_Int32 nClosestEndIndex_s, nClosestEndIndex_e; diff --git a/editeng/source/uno/unotext2.cxx b/editeng/source/uno/unotext2.cxx index 8e059941c0d2..ddd85b8f743f 100644 --- a/editeng/source/uno/unotext2.cxx +++ b/editeng/source/uno/unotext2.cxx @@ -56,7 +56,7 @@ SvxUnoTextContentEnumeration::SvxUnoTextContentEnumeration( const SvxUnoTextBase sal_Int32 nStartPos = 0; sal_Int32 nEndPos = mrText.GetEditSource()->GetTextForwarder()->GetTextLen( currentPara ); if( currentPara == maSelection.nStartPara ) - nStartPos = nStartPos>maSelection.nStartPos ? nStartPos : maSelection.nStartPos; + nStartPos = std::max(nStartPos, maSelection.nStartPos); if( currentPara == maSelection.nEndPara ) nEndPos = nEndPos<maSelection.nEndPos ? nEndPos : maSelection.nEndPos; ESelection aCurrentParaSel = ESelection( currentPara, nStartPos, currentPara, nEndPos ); @@ -399,7 +399,7 @@ SvxUnoTextRangeEnumeration::SvxUnoTextRangeEnumeration(const SvxUnoTextBase& rTe if( nEndPos < mnSel.nStartPos ) continue; - nStartPos = nStartPos>mnSel.nStartPos ? nStartPos : mnSel.nStartPos; + nStartPos = std::max<int>(nStartPos, mnSel.nStartPos); nEndPos = nEndPos<mnSel.nEndPos ? nEndPos : mnSel.nEndPos; ESelection aSel( mnParagraph, nStartPos, mnParagraph, nEndPos ); |