[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-1+backports' - sw/source

Ilhan Yesil (via logerrit) logerrit at kemper.freedesktop.org
Wed Aug 7 21:20:05 UTC 2019


 sw/source/core/layout/paintfrm.cxx |   12 ++++++++++++
 1 file changed, 12 insertions(+)

New commits:
commit 68514ba20f8feff3d18bb6e6d78052934882e840
Author:     Ilhan Yesil <ilhanyesil at gmx.de>
AuthorDate: Fri Jul 5 11:50:49 2019 +0200
Commit:     Thorsten Behrens <Thorsten.Behrens at CIB.de>
CommitDate: Wed Aug 7 23:19:25 2019 +0200

    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 at cib.de>
    (cherry picked from commit 80ae85d89866e501496189b2749071869ab6e98c)
    Reviewed-on: https://gerrit.libreoffice.org/76964
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    Tested-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>

diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 53088b40b862..937f90246480 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -2993,6 +2993,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());


More information about the Libreoffice-commits mailing list