1732ddcc18
- Fix Bug 1160687 - LO-L3: Elements on title page mixed up * bsc1160687-1.diff * bsc1160687-2.diff * bsc1160687-3.diff * bsc1160687-4.diff * bsc1160687-5.diff * bsc1160687-6.diff * bsc1160687-7.diff * bsc1160687-8.diff OBS-URL: https://build.opensuse.org/request/show/804990 OBS-URL: https://build.opensuse.org/package/show/LibreOffice:Factory/libreoffice?expand=0&rev=877
45 lines
2.1 KiB
Diff
45 lines
2.1 KiB
Diff
From c91584ef805866b46b06fe7451b077f9f33419b4 Mon Sep 17 00:00:00 2001
|
|
From: Miklos Vajna <vmiklos@collabora.com>
|
|
Date: Tue, 28 Apr 2020 17:28:16 +0200
|
|
Subject: [PATCH] sw from-bottom relative orientation: add layout
|
|
|
|
The implementation is a combination of what "bottom" and "from-top"
|
|
already provided.
|
|
|
|
Change-Id: Id7bac8cbcccbadcca377fe9946a21ccb3e368913
|
|
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93086
|
|
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Tested-by: Jenkins
|
|
(cherry picked from commit dd52fdba87d0cfee039cc236b86241708d4e63b8)
|
|
---
|
|
.../objectpositioning/objectpositioning.cxx | 33 +++++++++++++++++++
|
|
.../tocntntanchoredobjectposition.cxx | 12 +++++++
|
|
2 files changed, 45 insertions(+)
|
|
|
|
diff --git a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
|
|
index 18c08f8540d9..9bf3c7bfb6cb 100644
|
|
--- a/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
|
|
+++ b/sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx
|
|
@@ -548,6 +548,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();
|
|
}
|
|
|
|
--
|
|
2.26.1
|
|
|