summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-08-12 08:14:03 +0200
committerCaolán McNamara <caolanm@redhat.com>2015-08-12 12:54:07 +0000
commitce51de70c2dfa905e105d09f4ccd72014af159ac (patch)
tree4e418c4ba35b986ee18c20fe1ead0663d5ea7308
parent0bc62128589110686bd97b639bae93d29a8bdd8b (diff)
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/17662 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/core/layout/paintfrm.cxx3
-rw-r--r--sw/source/core/view/viewimp.cxx3
-rw-r--r--sw/source/core/view/viewsh.cxx6
3 files changed, 2 insertions, 10 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 3f681f19ac79..4a27d6fc4ec2 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 b3957c4ccd2e..9299d6f90f03 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 bde60ab9f4e8..b934e76fc307 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) )