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

Caolán McNamara caolanm at redhat.com
Sat Apr 7 15:49:23 UTC 2018


 sw/source/core/txtnode/fntcache.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2f25c7160c6f4f03cae3eea335218d14e7dfcbef
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Apr 5 08:25:50 2018 +0100

    coverity#1433794 Unintended sign extension
    
    Change-Id: I674991f5621bf6cf5a9cbecac936872b48fbdbcd
    Reviewed-on: https://gerrit.libreoffice.org/52433
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx
index 2005af23df4b..bbfbe071d7e1 100644
--- a/sw/source/core/txtnode/fntcache.cxx
+++ b/sw/source/core/txtnode/fntcache.cxx
@@ -152,7 +152,7 @@ void SwFntObj::CreatePrtFont( const OutputDevice& rPrt )
     const_cast<OutputDevice&>(rPrt).SetFont( m_aFont );
     const FontMetric aWinMet( rPrt.GetFontMetric() );
     const_cast<OutputDevice&>(rPrt).SetFont( aOldFnt );
-    long nWidth = ( aWinMet.GetFontSize().Width() * m_nPropWidth ) / 100;
+    auto nWidth = ( aWinMet.GetFontSize().Width() * m_nPropWidth ) / 100;
 
     if( !nWidth )
         ++nWidth;


More information about the Libreoffice-commits mailing list