diff options
Diffstat (limited to 'sw/source/core/objectpositioning')
-rw-r--r-- | sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx index 3c40f3b91aef..95331da7f8a2 100644 --- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx +++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx @@ -543,6 +543,18 @@ void SwToContentAnchoredObjectPosition::CalcPosition() aRectFnSet.GetTop(aPgPrtRect), nTopOfOrient ); } + else if (aVert.GetRelationOrient() == text::RelOrientation::PAGE_PRINT_AREA_BOTTOM) + { + // The anchored object is relative from the bottom of the page's print area. + SwRect aPgPrtRect(rPageAlignLayFrame.getFrameArea()); + if (rPageAlignLayFrame.IsPageFrame()) + { + auto& rPageFrame = static_cast<const SwPageFrame&>(rPageAlignLayFrame); + aPgPrtRect = rPageFrame.PrtWithoutHeaderAndFooter(); + } + SwTwips nPageBottom = aRectFnSet.GetBottom(aPgPrtRect); + nVertOffsetToFrameAnchorPos += aRectFnSet.YDiff(nPageBottom, nTopOfOrient); + } nRelPosY = nVertOffsetToFrameAnchorPos + aVert.GetPos(); } |