summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2014-05-23 22:55:41 +0200
committerCaolán McNamara <caolanm@redhat.com>2014-05-26 04:20:28 -0500
commit9732b4a0045c1e72493f16d03f60a048d5fbfa9d (patch)
tree889dab33ec9831e7230b23a1d0141eb37d79d5de
parent585077d4f681582386baa10acff53abdd280552b (diff)
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@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/core/text/txtdrop.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx
index f4af8afa6338..8d3f3b92672f 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();