summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/layact.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/layout/layact.cxx')
-rw-r--r--sw/source/core/layout/layact.cxx24
1 files changed, 16 insertions, 8 deletions
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 14bc23bb97a4..1475a3909220 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -1460,15 +1460,23 @@ BOOL SwLayAction::FormatLayout( SwLayoutFrm *pLay, BOOL bAddRect )
//mod #i6193# added sidebar width
const SwPostItMgr* pPostItMgr = pImp->GetShell()->GetPostItMgr();
const int nSidebarWidth = pPostItMgr && pPostItMgr->HasNotes() && pPostItMgr->ShowNotes() ? pPostItMgr->GetSidebarWidth() + pPostItMgr->GetSidebarBorderWidth() : 0;
- if (pPageFrm->MarginSide())
+ switch ( pPageFrm->SidebarPosition() )
{
- aPaint.Left( aPaint.Left() - nBorderWidth - nSidebarWidth);
- aPaint.Right( aPaint.Right() + nBorderWidth + nShadowWidth);
- }
- else
- {
- aPaint.Left( aPaint.Left() - nBorderWidth );
- aPaint.Right( aPaint.Right() + nBorderWidth + nShadowWidth + nSidebarWidth);
+ case sw::sidebarwindows::SIDEBAR_LEFT:
+ {
+ aPaint.Left( aPaint.Left() - nBorderWidth - nSidebarWidth);
+ aPaint.Right( aPaint.Right() + nBorderWidth + nShadowWidth);
+ }
+ break;
+ case sw::sidebarwindows::SIDEBAR_RIGHT:
+ {
+ aPaint.Left( aPaint.Left() - nBorderWidth );
+ aPaint.Right( aPaint.Right() + nBorderWidth + nShadowWidth + nSidebarWidth);
+ }
+ break;
+ case sw::sidebarwindows::SIDEBAR_NONE:
+ // nothing to do
+ break;
}
aPaint.Top( aPaint.Top() - nBorderWidth );
aPaint.Bottom( aPaint.Bottom() + nBorderWidth + nShadowWidth);