summaryrefslogtreecommitdiff
path: root/sw/source/core/view
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/view')
-rw-r--r--sw/source/core/view/pagepreviewlayout.cxx3
-rw-r--r--sw/source/core/view/viewimp.cxx6
-rw-r--r--sw/source/core/view/viewsh.cxx32
3 files changed, 13 insertions, 28 deletions
diff --git a/sw/source/core/view/pagepreviewlayout.cxx b/sw/source/core/view/pagepreviewlayout.cxx
index eae56dde8d50..fc24047a0b91 100644
--- a/sw/source/core/view/pagepreviewlayout.cxx
+++ b/sw/source/core/view/pagepreviewlayout.cxx
@@ -1073,7 +1073,8 @@ bool SwPagePreviewLayout::Paint( const Rectangle _aOutRect ) const
// #i80691# paint page border and shadow
{
SwRect aPageBorderRect;
- SwPageFrm::GetBorderAndShadowBoundRect( SwRect( aPageRect ), &mrParentViewShell, aPageBorderRect, true );
+ SwPageFrm::GetBorderAndShadowBoundRect( SwRect( aPageRect ), &mrParentViewShell, aPageBorderRect,
+ (*aPageIter)->pPage->IsLeftShadowNeeded(), (*aPageIter)->pPage->IsRightShadowNeeded(), true );
const Region aDLRegion(aPageBorderRect.SVRect());
mrParentViewShell.DLPrePaint2(aDLRegion);
SwPageFrm::PaintBorderAndShadow( aPageRect, &mrParentViewShell, true, false, true );
diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx
index 96cef3170ece..c3ca3f655ae1 100644
--- a/sw/source/core/view/viewimp.cxx
+++ b/sw/source/core/view/viewimp.cxx
@@ -190,17 +190,17 @@ void SwViewImp::SetFirstVisPage()
const bool bBookMode = pSwViewOption->IsViewLayoutBookMode();
SwPageFrm *pPage = (SwPageFrm*)pSh->GetLayout()->Lower();
- SwRect aPageRect = pPage->Frm();
+ SwRect aPageRect = pPage->GetBoundRect();
while ( pPage && !aPageRect.IsOver( pSh->VisArea() ) )
{
pPage = (SwPageFrm*)pPage->GetNext();
if ( pPage )
{
- aPageRect = pPage->Frm();
+ aPageRect = pPage->GetBoundRect();
if ( bBookMode && pPage->IsEmptyPage() )
{
const SwPageFrm& rFormatPage = pPage->GetFormatPage();
- aPageRect.SSize() = rFormatPage.Frm().SSize();
+ aPageRect.SSize() = rFormatPage.GetBoundRect().SSize();
}
}
}
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx
index fba37f34809d..797ed01a3287 100644
--- a/sw/source/core/view/viewsh.cxx
+++ b/sw/source/core/view/viewsh.cxx
@@ -991,45 +991,29 @@ void ViewShell::VisPortChgd( const SwRect &rRect)
SwTwips nMinLeft = LONG_MAX;
SwTwips nMaxRight= 0;
- const SwTwips nSidebarWidth = pPostItMgr && pPostItMgr->ShowNotes() && pPostItMgr->HasNotes() ?
- pPostItMgr->GetSidebarWidth() + pPostItMgr->GetSidebarBorderWidth() :
- 0;
const bool bBookMode = GetViewOptions()->IsViewLayoutBookMode();
while ( pPage && pPage->Frm().Top() <= nBottom )
{
- SwRect aPageRect( pPage->Frm() );
+ SwRect aPageRect( pPage->GetBoundRect() );
if ( bBookMode )
{
const SwPageFrm& rFormatPage = static_cast<const SwPageFrm*>(pPage)->GetFormatPage();
- aPageRect.SSize() = rFormatPage.Frm().SSize();
+ aPageRect.SSize() = rFormatPage.GetBoundRect().SSize();
}
if ( aPageRect.IsOver( aBoth ) )
{
- const SwTwips nShadowWidth =
- GetOut()->PixelToLogic( Size( pPage->ShadowPxWidth(), 0 ) ).Width();
-
SwTwips nPageLeft = 0;
SwTwips nPageRight = 0;
- switch ( pPage->SidebarPosition() )
+ const sw::sidebarwindows::SidebarPosition aSidebarPos = pPage->SidebarPosition();
+
+ if( aSidebarPos != sw::sidebarwindows::SIDEBAR_NONE )
{
- case sw::sidebarwindows::SIDEBAR_LEFT:
- {
- nPageLeft = aPageRect.Left() - nSidebarWidth;
- nPageRight = aPageRect.Right() + nShadowWidth;
- }
- break;
- case sw::sidebarwindows::SIDEBAR_RIGHT:
- {
- nPageLeft = aPageRect.Left();
- nPageRight = aPageRect.Right() + nShadowWidth + nSidebarWidth;
- }
- break;
- case sw::sidebarwindows::SIDEBAR_NONE:
- // nothing to do
- break;
+ nPageLeft = aPageRect.Left();
+ nPageRight = aPageRect.Right();
}
+
if( nPageLeft < nMinLeft )
nMinLeft = nPageLeft;
if( nPageRight > nMaxRight )