diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2024-02-01 15:11:03 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2024-02-07 22:57:27 +0100 |
commit | 34b0150df174e23d02190dc00e51b67be1f670dc (patch) | |
tree | 777dbd1003f047d6ace46efad833cc3d47bcf9ee | |
parent | a0baf67973615ac25e4504f0895831e8adeb8f89 (diff) |
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.stahl@allotropia.de>
(cherry picked from commit 13865c4da30a3a2a5ab8efbd568c47952d3ffcee)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162894
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r-- | sw/source/core/layout/fly.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx index ba57cd6b4cdf..db50a42de053 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> @@ -1741,6 +1742,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; } |