diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-12-14 12:42:11 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-12-14 14:42:18 +0100 |
commit | 70e6d969dcbece69bc9bd5e3a0bc5d878a33ca6a (patch) | |
tree | 046e334de1aced1587cfcbe645512118eb6c6990 /svx/source | |
parent | be9655420e05f55ff2df9cda0fbe5128d3a77e32 (diff) |
ofz#42338 avoid timeout in autogrow frames during ppt import
Change-Id: I4bcd8b5ee59609016451ddce5eaeb445f7c793c3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126827
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/svdraw/svdotext.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 91a0870630e0..9788bfdeae7a 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -52,6 +52,7 @@ #include <basegfx/matrix/b2dhommatrixtools.hxx> #include <sal/log.hxx> #include <o3tl/temporary.hxx> +#include <unotools/configmgr.hxx> using namespace com::sun::star; @@ -1340,6 +1341,15 @@ void SdrTextObj::NbcSetOutlinerParaObject(std::optional<OutlinerParaObject> pTex NbcSetOutlinerParaObjectForText( std::move(pTextObject), getActiveText() ); } +namespace +{ + bool IsAutoGrow(const SdrTextObj& rObj) + { + bool bAutoGrow = rObj.IsAutoGrowHeight() || rObj.IsAutoGrowWidth(); + return bAutoGrow && !utl::ConfigManager::IsFuzzing(); + } +} + void SdrTextObj::NbcSetOutlinerParaObjectForText( std::optional<OutlinerParaObject> pTextObject, SdrText* pText ) { if( pText ) @@ -1355,7 +1365,7 @@ void SdrTextObj::NbcSetOutlinerParaObjectForText( std::optional<OutlinerParaObje } SetTextSizeDirty(); - if (IsTextFrame() && (IsAutoGrowHeight() || IsAutoGrowWidth())) + if (IsTextFrame() && IsAutoGrow(*this)) { // adapt text frame! NbcAdjustTextFrameWidthAndHeight(); } |