svx/source/customshapes/EnhancedCustomShapeFontWork.cxx |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 178044ec01227771542de809f8140d107035ca0f
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sun Apr 17 17:24:24 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Sun Apr 17 20:11:42 2022 +0200

    ofz#46782 Timeout
    
    Change-Id: I14129770c7fc8505c8060d79fa8bb9683a688a68
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133107
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

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 );

Reply via email to