summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2022-05-24 15:20:42 +0200
committerAndras Timar <andras.timar@collabora.com>2022-05-29 21:39:48 +0200
commitfb675d307ab0e75aa36eabeb764b1fbbb0f459f1 (patch)
tree90b7bfa4c499acbbce6b36d8e572afa325cba250
parent59ccf95247f81706c22cc600edca953943a36cec (diff)
sw: fix mysterious layout loop in CppunitTest_sw_uiwriter3 testTdf104649
This didn't happen with master from a week ago on Fedora 35, but happens with Monday's master on Fedora 36. Also happens with libreoffice-7-3 branch. Fundamentally the problem with the bugdoc is that there are tables in footnotes, which aren't really supported and can't split across pages like they would need to. The loop happens because a footnote on page 48 invalidates position of its anchor frame 549 on page 45. This is probably pointless, let's only invalidate if the anchor is on the same page (it should be on the same page, but probably the tables in other footnotes get in the way). Change-Id: I87976c7f8b35725bc8e642133bebb396d37ff0be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134877 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 0496252c2c7fd2d694c4a73f387ef75e0021de3e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134894 Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/core/layout/wsfrm.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 62c99a5f6e87..43bd9a7037a1 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -3001,7 +3001,16 @@ SwTwips SwLayoutFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
pTmp->InvalidateSize();
}
else
- pCnt->InvalidatePos();
+ {
+ if (pCnt->FindPageFrame() == FindPageFrame())
+ {
+ pCnt->InvalidatePos();
+ }
+ else
+ {
+ SAL_WARN("sw.layout", "footnote frame on different page than ref frame?");
+ }
+ }
}
}
return nReal;