summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlhan Yesil <ilhanyesil@gmx.de>2019-07-05 11:50:49 +0200
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2019-08-07 23:11:49 +0200
commit499cd0c7eb48ef457de61f60735f0efe38068a6d (patch)
tree5ce0527cc7bd42d98bcc1766d0ec9bb247f5bc23
parentofz#10198 reset uncommitted fly stuff & pams before applying redlining (diff)
downloadcore-499cd0c7eb48ef457de61f60735f0efe38068a6d.tar.gz
core-499cd0c7eb48ef457de61f60735f0efe38068a6d.zip
tdf#126222 Headers/footers are at correct position after scrolling
After scrolling, the positions of headers and footers of the previous pages have to be updated, else these headers and footers could get visible at a wrong position. Change-Id: I25508cc0fc0bb7a6e59aeb996e2e7e0a0e23511f Reviewed-on: https://gerrit.libreoffice.org/75118 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit 80ae85d89866e501496189b2749071869ab6e98c) Reviewed-on: https://gerrit.libreoffice.org/76966 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
-rw-r--r--sw/source/core/layout/paintfrm.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index c1316945ec6f..dcbe5d32822b 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -2994,6 +2994,18 @@ void SwRootFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const&
const SwPageFrame *pPage = pSh->Imp()->GetFirstVisPage(&rRenderContext);
+ // #126222. The positions of headers and footers of the previous
+ // pages have to be updated, else these headers and footers could
+ // get visible at a wrong position.
+ const SwPageFrame *pPageDeco = static_cast<const SwPageFrame*>(pPage->GetPrev());
+ while (pPageDeco)
+ {
+ pPageDeco->PaintDecorators();
+ OSL_ENSURE(!pPageDeco->GetPrev() || pPageDeco->GetPrev()->IsPageFrame(),
+ "Neighbour of page is not a page.");
+ pPageDeco = static_cast<const SwPageFrame*>(pPageDeco->GetPrev());
+ }
+
const bool bBookMode = gProp.pSGlobalShell->GetViewOptions()->IsViewLayoutBookMode();
if ( bBookMode && pPage->GetPrev() && static_cast<const SwPageFrame*>(pPage->GetPrev())->IsEmptyPage() )
pPage = static_cast<const SwPageFrame*>(pPage->GetPrev());