sw/source/core/layout/fly.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit e000e1719199eebabedf4bc6938d8397e3392982 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Thu Feb 1 15:11:03 2024 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Tue Feb 6 20:35:31 2024 +0100 tdf#159015 sw: layout: fix infinite loop in ::CalcContent() SwObjectFormatter::FormatObj() will just return if IsAgain() is set, so the while loop here won't make any progress. (regression from commit 191babee4f0ec643b80e96b0cd98c2d04ff96e4e) Change-Id: I1c194b148760ae05cf4dee1d5729be28e87d6ba0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162880 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> (cherry picked from commit 13865c4da30a3a2a5ab8efbd568c47952d3ffcee) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162895 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index 503dfedb35fa..fd15d4d22cd0 100644 --- a/sw/source/core/layout/fly.cxx +++ b/sw/source/core/layout/fly.cxx @@ -43,6 +43,7 @@ #include <svx/svdoashp.hxx> #include <svx/svdpage.hxx> #include <layouter.hxx> +#include <layact.hxx> #include <pagefrm.hxx> #include <rootfrm.hxx> #include <viewimp.hxx> @@ -1743,6 +1744,10 @@ void CalcContent( SwLayoutFrame *pLay, bool bNoColl ) if (!SwObjectFormatter::FormatObj(*pAnchoredObj, pAnchorFrame, pAnchorPageFrame, rShell.Imp()->IsAction() ? &rShell.Imp()->GetLayAction() : nullptr)) { + if (rShell.Imp()->IsAction() && rShell.Imp()->GetLayAction().IsAgain()) + { // tdf#159015 will always fail, don't loop + return; + } bRestartLayoutProcess = true; break; }