summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/pagechg.cxx
diff options
context:
space:
mode:
authorRegényi Balázs <regenyi.balazs+gerrit@gmail.com>2020-06-22 10:28:15 +0200
committerLászló Németh <nemeth@numbertext.org>2020-07-02 12:32:33 +0200
commita85c2504c002dff069c129ab244cb2ba5820943d (patch)
tree1a391f6ed056c95b9d7b5f18988ab8650723ffc5 /sw/source/core/layout/pagechg.cxx
parentbedc5bf125bdc0377b7dc845192b274e90945e13 (diff)
tdf#123324 DOCX import: fix shape height relative to top page margin
using UNO API RelativeHeightRelation and the associated lo-ext attribute for OpenDocument export. See commit 43d7f4e3640c5e370fd1204739c2b0c7eb5f40e4 (offapi: document the 4 new properties which are no longer read-only). Co-authored-by: Szabolcs Tóth Change-Id: Ibaba4b3762de5a70506dacd85a818b8972b18144 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96869 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sw/source/core/layout/pagechg.cxx')
-rw-r--r--sw/source/core/layout/pagechg.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index a3188eb2a5ca..ebcf239ef580 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -2512,6 +2512,18 @@ bool SwPageFrame::CheckPageHeightValidForHideWhitespace(SwTwips nDiff)
return true;
}
+const SwHeaderFrame* SwPageFrame::GetHeaderFrame() const
+{
+ const SwFrame* pLowerFrame = Lower();
+ while (pLowerFrame)
+ {
+ if (pLowerFrame->IsHeaderFrame())
+ return dynamic_cast<const SwHeaderFrame*>(pLowerFrame);
+ pLowerFrame = pLowerFrame->GetNext();
+ }
+ return nullptr;
+}
+
const SwFooterFrame* SwPageFrame::GetFooterFrame() const
{
const SwFrame* pLowerFrame = Lower();