[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - sw/source

Julien Nabet serval2412 at yahoo.fr
Mon May 26 02:20:37 PDT 2014


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

New commits:
commit 9732b4a0045c1e72493f16d03f60a048d5fbfa9d
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Fri May 23 22:55:41 2014 +0200

    Resolves: fdo#79139 Crash in SwDropCapCache::CalcFontSize
    
    Minimum of nMaxFontHeight must be at least 1
    
    Cherry-picked from 06afd4067f7bc321d7dd0a4e8c235b0b21e3d49a
    
    Change-Id: I35462fc069c7026958e597c2e0605345ed009c91
    Reviewed-on: https://gerrit.libreoffice.org/9458
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx
index f4af8af..8d3f3b9 100644
--- a/sw/source/core/text/txtdrop.cxx
+++ b/sw/source/core/text/txtdrop.cxx
@@ -793,7 +793,7 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, SwTxtFormatInfo &rInf )
         long nWishedHeight = pDrop->GetDropHeight();
 
         // find out biggest font size for initial scaling factor
-        long nMaxFontHeight = 0;
+        long nMaxFontHeight = 1;
         while ( pCurrPart )
         {
             const SwFont& rFnt = pCurrPart->GetFont();


More information about the Libreoffice-commits mailing list