diff options
-rw-r--r-- | vcl/source/gdi/sallayout.cxx | 2 | ||||
-rw-r--r-- | vcl/win/source/gdi/winlayout.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index c23c32534914..d25a4b1602a2 100644 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -1263,7 +1263,7 @@ int GenericSalLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor for( int i = mnMinCharPos; i < mnEndCharPos; ++i ) { nWidth += pCharWidths[ i - mnMinCharPos ] * nFactor; - if( nWidth >= nMaxWidth ) + if( nWidth > nMaxWidth ) return i; nWidth += nCharExtra; } diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx index fa804d19089a..a6387eb4235a 100644 --- a/vcl/win/source/gdi/winlayout.cxx +++ b/vcl/win/source/gdi/winlayout.cxx @@ -721,7 +721,7 @@ int SimpleWinLayout::GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor continue; // add char widths until max nExtraWidth += mpCharWidths[ n ] * nFactor; - if( nExtraWidth >= nMaxWidth ) + if( nExtraWidth > nMaxWidth ) return (mnMinCharPos + n); nExtraWidth += nCharExtra; } |