diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-04-17 17:24:24 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-04-17 20:11:42 +0200 |
commit | 178044ec01227771542de809f8140d107035ca0f (patch) | |
tree | d4a5ac4c8fad2f93be5ab2548a1744fda71f6896 /svx | |
parent | 689d1f5dd3dc12d9f85ba98702a66c7af20849dc (diff) |
ofz#46782 Timeout
Change-Id: I14129770c7fc8505c8060d79fa8bb9683a688a68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133107
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index 40b7f222dad9..70fff24c9ba0 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -238,11 +238,13 @@ static void CalculateHorizontalScalingFactor( if (fScalingFactor < 1.0) { - // if we have a ridiculously large font (flagged with the SAL_WARN - // above) that will require scaling down to a very small value then + // if we have a very large font that will require scaling down to a very small value then // skip directly to a small font size - if (nFontSize > SAL_MAX_INT16 && fScalingFactor * nFontSize < 1.0) + if (nFontSize > 128 && fScalingFactor * nFontSize < 1.0) + { nFontSize = 16; + SAL_WARN("svx", "CalculateHorizontalScalingFactor skipping direct to: " << nFontSize << " from " << rFontHeight.GetHeight()); + } nFontSize--; aFont.SetFontHeight( nFontSize ); pVirDev->SetFont( aFont ); |