diff options
author | Jan Holesovsky <kendy@collabora.com> | 2015-08-12 08:14:03 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2015-08-12 08:19:51 +0200 |
commit | 0409f83a5a4f9f86fa69a9431ce5aa07be427455 (patch) | |
tree | 934618ecf7f717b5edff00f9294c689e0188cf30 | |
parent | 4667db065d34193d99bce82f7e8f3b20a03ecade (diff) |
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
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/view/viewimp.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 6 |
3 files changed, 2 insertions, 10 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 748fe0ae47b9..aa562093383a 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 586db03542a2..6837c10daf1b 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 c128eff69c78..436fbf78e448 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) ) |