diff options
Diffstat (limited to 'vcl/source/edit')
-rw-r--r-- | vcl/source/edit/texteng.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index c4402d48924b..2c8e320468b0 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -2148,9 +2148,8 @@ bool TextEngine::CreateLines( sal_uInt32 nPara ) std::size_t nTmpPortion = pLine->GetStartPortion(); long nTmpWidth = mpDoc->GetLeftMargin(); // do not subtract margin; it is included in TmpWidth - long nXWidth = mnMaxTextWidth ? mnMaxTextWidth : std::numeric_limits<long>::max(); - if ( nXWidth < nTmpWidth ) - nXWidth = nTmpWidth; + long nXWidth = std::max( + mnMaxTextWidth ? mnMaxTextWidth : std::numeric_limits<long>::max(), nTmpWidth); // search for Portion that does not fit anymore into line TETextPortion* pPortion = nullptr; |