summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Le Ray <sebastien-libreoffice@orniz.org>2011-02-27 22:20:09 +0100
committerMichael Meeks <michael.meeks@novell.com>2011-03-03 10:41:28 +0000
commitb125ab6b854eef065ca4ad0e505811cae82c5f94 (patch)
tree0a9cb656efe6d26cfde3f621245aa793c8771c6a
parent58dac4a84808321327a9bae8d2006ec3e9df4b32 (diff)
Directly compute shadow rectangles
-rw-r--r--sw/source/core/layout/paintfrm.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index f709b6a657a3..b84d6cdd9a6d 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -5250,6 +5250,7 @@ const sal_Int8 SwPageFrm::mnShadowPxWidth = 10;
SwRect& _orBottomShadowRect,
bool bRightSidebar )
{
+ const SwPostItMgr *pMgr = _pViewShell ? _pViewShell->GetPostItMgr() : 0;
SwRect aAlignedPageRect( _rPageRect );
::SwAlignRect( aAlignedPageRect, _pViewShell );
SwRect aPagePxRect =
@@ -5259,8 +5260,15 @@ const sal_Int8 SwPageFrm::mnShadowPxWidth = 10;
Point( aPagePxRect.Left() + 1 + mnShadowPxWidth, aPagePxRect.Bottom() + 1 ),
Size( aPagePxRect.Width() - 1 - mnShadowPxWidth, mnShadowPxWidth ) );
- AddSidebarBorders( _orBottomShadowRect, _pViewShell, bRightSidebar, true);
-
+ if(pMgr && pMgr->ShowNotes() && pMgr->HasNotes())
+ {
+ // Notes are displayed, we've to extend borders
+ SwTwips aSidebarTotalWidth = pMgr->GetSidebarWidth(true) + pMgr->GetSidebarBorderWidth(true);
+ if(bRightSidebar)
+ _orBottomShadowRect.Right( _orBottomShadowRect.Right() + aSidebarTotalWidth );
+ else
+ _orBottomShadowRect.Left( _orBottomShadowRect.Left() - aSidebarTotalWidth );
+ }
}
/** paint page border and shadow