vcl/source/gdi/sallayout.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
New commits: commit 1a856fcede54b37701089849a838b6d52bb04b8c Author: Aron Budea <aron.bu...@collabora.com> AuthorDate: Sat Apr 6 22:48:07 2024 +0200 Commit: Aron Budea <aron.bu...@collabora.com> CommitDate: Sun Apr 7 09:35:19 2024 +0200 tdf#160342 Unwanted space before end of line when printing Also adjust some numeric literals to reflect they're floating point values in the expressions. Regression from 172b500ccbc8dac0496cc2936a9bcca793c0b594. Change-Id: I8281ba7c7d480135471ba94b11d447d76fd33063 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165860 Tested-by: Jenkins Reviewed-by: Aron Budea <aron.bu...@collabora.com> diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index 3240e481578f..28138c3f61fd 100644 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -304,7 +304,7 @@ void GenericSalLayout::Justify(double nNewWidth) std::vector<GlyphItem>::iterator pGlyphIter; // count stretchable glyphs int nStretchable = 0; - double nMaxGlyphWidth = 0; + double nMaxGlyphWidth = 0.0; for(pGlyphIter = m_GlyphItems.begin(); pGlyphIter != pGlyphIterRight; ++pGlyphIter) { if( !pGlyphIter->IsInCluster() ) @@ -315,7 +315,7 @@ void GenericSalLayout::Justify(double nNewWidth) // move rightmost glyph to requested position nOldWidth -= pGlyphIterRight->origWidth(); - if( nOldWidth <= 0 ) + if( nOldWidth <= 0.0 ) return; if( nNewWidth < nMaxGlyphWidth) nNewWidth = nMaxGlyphWidth; @@ -324,10 +324,10 @@ void GenericSalLayout::Justify(double nNewWidth) // justify glyph widths and positions double nDiffWidth = nNewWidth - nOldWidth; - if( nDiffWidth >= 0) // expanded case + if( nDiffWidth >= 0.0 ) // expanded case { // expand width by distributing space between glyphs evenly - int nDeltaSum = 0; + double nDeltaSum = 0.0; for( pGlyphIter = m_GlyphItems.begin(); pGlyphIter != pGlyphIterRight; ++pGlyphIter ) { // move glyph to justified position