summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2024-02-01 15:11:03 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2024-02-01 16:31:51 +0100
commit13865c4da30a3a2a5ab8efbd568c47952d3ffcee (patch)
tree62939b62ca810638bd891f028f0400942051aa85
parenttdf#159483 sc HTML import: handle data-sheets-value attribute for the text case (diff)
downloadcore-13865c4da30a3a2a5ab8efbd568c47952d3ffcee.tar.gz
core-13865c4da30a3a2a5ab8efbd568c47952d3ffcee.zip
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>
-rw-r--r--sw/source/core/layout/fly.cxx5
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;
}