diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-10-08 15:27:42 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-10-08 19:09:35 +0200 |
commit | 52f50ffd67de9d2e2253226b2d7f590fe45c7313 (patch) | |
tree | 136ff7005be07a32b3f6554834e4aecdb4d9e58e /editeng/source | |
parent | 347112fbd89ebd2a244052f14e085c9d3c90838d (diff) |
ofz#62236 avoid Timeout
Change-Id: Ic7207ece03a30d8ffefadbf072d4da5fa66dfc12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157688
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'editeng/source')
-rw-r--r-- | editeng/source/items/textitem.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index 77f95f6de9ee..e4c1cdbe14cc 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -24,6 +24,7 @@ #include <sal/log.hxx> #include <o3tl/safeint.hxx> #include <osl/diagnose.h> +#include <unotools/configmgr.hxx> #include <unotools/fontdefs.hxx> #include <unotools/intlwrapper.hxx> #include <unotools/syslocale.hxx> @@ -808,8 +809,15 @@ bool SvxFontHeightItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) return false; fPoint = static_cast<float>(nValue); } - if(fPoint < 0. || fPoint > 10000.) - return false; + + if (fPoint < 0. || fPoint > 10000.) + return false; + static bool bFuzzing = utl::ConfigManager::IsFuzzing(); + if (bFuzzing && fPoint > 500) + { + SAL_WARN("editeng.items", "SvxFontHeightItem ignoring font size of " << fPoint << " for performance"); + return false; + } nHeight = static_cast<tools::Long>( fPoint * 20.0 + 0.5 ); // Twips if (!bConvert) |