[Libreoffice-commits] core.git: Branch 'libreoffice-5-0-1' - sw/source

Jan Holesovsky kendy at collabora.com
Sat Aug 15 15:20:53 PDT 2015


 sw/source/core/layout/paintfrm.cxx |    3 +--
 sw/source/core/view/viewimp.cxx    |    3 +--
 sw/source/core/view/viewsh.cxx     |    6 ------
 3 files changed, 2 insertions(+), 10 deletions(-)

New commits:
commit 1e83e14fb118a98425c342c63b98147e4cf79d44
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Wed Aug 12 08:14:03 2015 +0200

    tdf#92305: Revert "tdf#90150 : Page numbering in the status bar ..."
    
    Unfortunately the original commit caused a regression.
    
    The fix of tdf#90150 is also problematic from the UX point of view - with
    that, the user is never sure what page he/she is looking at.
    
    Should we do any changes there, then it should show the range of visible pages,
    like "Pages 2-3 of 5." or "Pages 1-4 of 8." etc.
    
    This reverts commit 1622b67e4b2bc8ecc5dd3ededc0a6e5adb936a6e.
    
    Change-Id: I371bb326da14b621a5116295ed1dc0de208f309d
    Reviewed-on: https://gerrit.libreoffice.org/17676
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    Reviewed-by: Norbert Thiebaud <nthiebaud at gmail.com>

diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 3f681f1..4a27d6f 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -3257,8 +3257,7 @@ void SwRootFrm::Paint(vcl::RenderContext& rRenderContext, SwRect const& rRect, S
     const_cast<SwRootFrm*>(this)->SetCallbackActionEnabled( false );
 
     const SwPageFrm *pPage = pSh->Imp()->GetFirstVisPage(&rRenderContext);
-    if ( pPage->GetPrev() )
-        pPage = static_cast<const SwPageFrm*>(pPage->GetPrev());
+
     const bool bBookMode = gProp.pSGlobalShell->GetViewOptions()->IsViewLayoutBookMode();
     if ( bBookMode && pPage->GetPrev() && static_cast<const SwPageFrm*>(pPage->GetPrev())->IsEmptyPage() )
         pPage = static_cast<const SwPageFrm*>(pPage->GetPrev());
diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx
index b3957c4..9299d6f 100644
--- a/sw/source/core/view/viewimp.cxx
+++ b/sw/source/core/view/viewimp.cxx
@@ -187,8 +187,7 @@ void SwViewShellImp::SetFirstVisPage(OutputDevice* pRenderContext)
 
         SwPageFrm *pPage = static_cast<SwPageFrm*>(pSh->GetLayout()->Lower());
         SwRect aPageRect = pPage->GetBoundRect(pRenderContext);
-        float fAmount = pSh->VisArea().Height() * 0.43;
-        while ( pPage && aPageRect.Bottom() < pSh->VisArea().Top() + fAmount )
+        while ( pPage && !aPageRect.IsOver( pSh->VisArea() ) )
         {
             pPage = static_cast<SwPageFrm*>(pPage->GetNext());
             if ( pPage )
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index bde60ab..b934e76 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -1468,12 +1468,6 @@ void SwViewShell::PaintDesktop(vcl::RenderContext& rRenderContext, const SwRect
     else
     {
         const SwFrm *pPage = Imp()->GetFirstVisPage(&rRenderContext);
-        //Here we have to get the previous page since
-        //GetFirstVisPage return the current one but
-        //there is a portion of the previous page
-        //which is still visible
-        if ( pPage->GetPrev() )
-            pPage = pPage->GetPrev();
         const SwTwips nBottom = rRect.Bottom();
         while ( pPage && !aRegion.empty() &&
                 (pPage->Frm().Top() <= nBottom) )


More information about the Libreoffice-commits mailing list