| commit | a52b1610009096c171b7571b9c2e8c307cada90b | [log] |
|---|---|---|
| author | Caolán McNamara <caolanm@redhat.com> | Mon Apr 04 13:15:05 2022 +0100 |
| committer | Caolán McNamara <caolanm@redhat.com> | Mon Apr 04 15:54:57 2022 +0200 |
| tree | 08c596dd3f16872562fd6fda9b50bfe6794db617 | |
| parent | 321dac0b80c875247ae064e023d107d3ac1caef3 [diff] |
Resolves: tdf#148336 portion width can be zero Change-Id: I9dcbf024882a0ca055d1847345ab2b8084d5871d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132510 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index e1c33c8..e400993 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx
@@ -2001,11 +2001,12 @@ Size SwFntObj::GetTextSize( SwDrawTextInfo& rInf ) else rInf.SetKanaDiff( 0 ); aTextSize.setWidth(aKernArray[sal_Int32(nLn) - 1]); if ( rInf.GetKern() && nLn ) aTextSize.AdjustWidth((sal_Int32(nLn) - 1) * rInf.GetKern()); if (nLn) { aTextSize.setWidth(aKernArray[sal_Int32(nLn) - 1]); if (rInf.GetKern()) aTextSize.AdjustWidth((sal_Int32(nLn) - 1) * rInf.GetKern()); } OSL_ENSURE( !rInf.GetShell() || ( USHRT_MAX != GetGuessedLeading() && USHRT_MAX != GetExternalLeading() ),