sw/source/core/objectpositioning/anchoredobjectposition.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 45d640fcf5b473acec55ef45503aa56b998c3b8b Author: Justin Luth <justin.l...@collabora.com> AuthorDate: Mon Feb 10 16:37:10 2025 -0500 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Tue Feb 11 10:06:53 2025 +0100 tdf#165040 tdf#143899 compat15 layout: restrict body fly #2 What was happening was that layout was considering whether to put the fly on a different page than the anchor, and my 25.2 commit 1de6bea27ed36167ec138818607da7b49e92ec4a apparently caused layout to accept that location in some cases, in which case it wasn't visible at all... Now, I'm not going to pretend that I actually understand LAYOUT at all, but my patch was only intending to affect the image in relation to the same page as the anchor is. So forcing that as a criteria seems to get me out of hot water. Since this is just bits-on-a-screen in some random kind of I'd-like-to-stick-myself-on-a-different-page layout anomaly and I don't have any nice changes-page-count examples, I'm not going to try to add a unit test. Change-Id: I84b980f109016ae6d904fb3720f77e131197b6a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181391 Tested-by: Jenkins Reviewed-by: Justin Luth <jl...@mail.com> (cherry picked from commit 95b173d41fa7a450821d0e69225df3faa899d290) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181396 Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/sw/source/core/objectpositioning/anchoredobjectposition.cxx b/sw/source/core/objectpositioning/anchoredobjectposition.cxx index c00002a4797e..fffa50e1948e 100644 --- a/sw/source/core/objectpositioning/anchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/anchoredobjectposition.cxx @@ -495,7 +495,7 @@ SwTwips SwAnchoredObjectPosition::ImplAdjustVertRelPos( const SwTwips nTopOfAnch const SwBodyFrame* pBodyFrame = mpAnchorFrame->FindBodyFrame(); while (pBodyFrame && !pBodyFrame->IsPageBodyFrame()) pBodyFrame = pBodyFrame->GetUpper()->FindBodyFrame(); - if (pBodyFrame) + if (pBodyFrame && pBodyFrame->GetUpper() == &rPageFrame) // same physical page... aPgAlignArea = pBodyFrame->getFrameArea(); } }