[Libreoffice-commits] core.git: sw/source

Jan Holesovsky kendy at collabora.com
Tue Aug 11 23:20:20 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 0409f83a5a4f9f86fa69a9431ce5aa07be427455
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

diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 748fe0a..aa56209 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -3256,8 +3256,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 586db03..6837c10 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 c128eff..436fbf7 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