summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells/drwbassh.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-05-05 18:03:51 +0200
committerMiklos Vajna <vmiklos@collabora.com>2020-05-05 21:20:14 +0200
commite21bc1b3e587c2bd90168b24f3774d98a3837f8e (patch)
tree1de57259463f6dd88b40cfd5119a065d761f097a /sw/source/uibase/shells/drwbassh.cxx
parent0c8ee2e0182facbbaaf440054e6c72c21bdaaefb (diff)
sw from-bottom relative orientation: fix calculation of position limits
Create a new Writer doc, insert a rectangle with height = 10cm, try to position it 2cm above the bottom of the page, so that would be -12cm, but we limited the metric field to -2cm because 2cm was the page margin. Teach SwFEShell::CalcBoundRect() about text::RelOrientation::PAGE_PRINT_AREA_BOTTOM, then this will work without problems. Change-Id: Ib6ddccc1512d39fff5bff2e989973b156a6c2bf7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93501 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/source/uibase/shells/drwbassh.cxx')
-rw-r--r--sw/source/uibase/shells/drwbassh.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx
index 18fce24f2c94..bccbe313bdf9 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -958,7 +958,8 @@ IMPL_LINK(SwDrawBaseShell, ValidatePosition, SvxSwFrameValidation&, rValidation,
// and alignment at page areas.
const bool bMaxVPosAtBottom = !rValidation.bFollowTextFlow ||
rValidation.nVRelOrient == text::RelOrientation::PAGE_FRAME ||
- rValidation.nVRelOrient == text::RelOrientation::PAGE_PRINT_AREA;
+ rValidation.nVRelOrient == text::RelOrientation::PAGE_PRINT_AREA ||
+ rValidation.nVRelOrient == text::RelOrientation::PAGE_PRINT_AREA_BOTTOM;
{
SwTwips nTmpMaxVPos = ( bMaxVPosAtBottom
? aBoundRect.Bottom()