[Libreoffice-commits] core.git: vcl/source

Caolán McNamara caolanm at redhat.com
Mon Dec 12 09:24:13 UTC 2016


 vcl/source/outdev/textline.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 299c5f87aeef5670e88ab226d9cf9825165d8705
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Dec 12 09:22:50 2016 +0000

    coverity#1397052 Logically dead code (golden)
    
    regression from...
    
    commit b894104a0b02a9b074c76feb925389d7bee6a493
    Date:   Thu Dec 8 00:43:09 2016 +0200
    
        Pass GlyphItem around
    
        We have this nice structure that contains (almost) all the information
        we need, so pass it around instead of passing separate fragments of said
        information.
    
    presumably this is the correct fix given the context of the other changes
    
    Change-Id: I8518e739b1caa00ea5ae1569282e98810462d4c3

diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index fe82eaa..1e2970c 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -751,7 +751,6 @@ void OutputDevice::ImplDrawTextLines( SalLayout& rSalLayout, FontStrikeout eStri
         Point aPos;
         DeviceCoordinate nDist = 0;
         DeviceCoordinate nWidth = 0;
-        DeviceCoordinate nAdvance = 0;
         const GlyphItem* pGlyph;
         int nStart = 0;
         while (rSalLayout.GetNextGlyphs(1, &pGlyph, aPos, nStart))
@@ -772,7 +771,7 @@ void OutputDevice::ImplDrawTextLines( SalLayout& rSalLayout, FontStrikeout eStri
                 }
 
                 // update the length of the textline
-                nWidth += nAdvance;
+                nWidth += pGlyph->mnNewWidth;
             }
             else if( nWidth > 0 )
             {


More information about the Libreoffice-commits mailing list