diff options
author | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2011-09-04 21:04:36 +0200 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2011-09-05 10:07:55 +0200 |
commit | 2e3c124e2d3e130256f4c8f2e656cff1b565a89e (patch) | |
tree | e17b46918c564d62414e53c350acb2c25da9b559 /sw | |
parent | ad5e9ea1d303c36af0b98861cc6c4b22940a9362 (diff) |
Header/Footers: fixed separator line position with footnotes
Diffstat (limited to 'sw')
-rwxr-xr-x | sw/source/core/layout/paintfrm.cxx | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index ad698e48abb6..eddb025f7692 100755 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -3371,6 +3371,9 @@ void SwPageFrm::PaintDecorators( OutputDevice *pOut ) const aHeaderText = aHeaderText.replaceAt( nPos, 2, rStyleName ); drawinglayer::processor2d::BaseProcessor2D* pProcessor = CreateProcessor2D(); + // Line thickness in px + long nHalfThickness = pOut->LogicToPixel( Point( 0, 10 ) ).Y(); + // Header const SwFrm* pHeaderFrm = Lower(); if ( !pHeaderFrm->IsHeaderFrm() ) @@ -3380,15 +3383,15 @@ void SwPageFrm::PaintDecorators( OutputDevice *pOut ) const long nXOff = std::min( aBodyRect.Right(), rVisArea.Right() ); // FIXME there are cases where the label isn't show but should be + long nHeaderYOff = pHeaderFrm->Frm().Bottom(); if ( rVisArea.IsInside( Point( rVisArea.Left(), pHeaderFrm->Frm().Bottom() ) ) ) { - long nOutputYOff = pHeaderFrm->Frm().Bottom(); - Point nOutputOff = rEditWin.LogicToPixel( Point( nXOff, nOutputYOff ) ); + Point nOutputOff = rEditWin.LogicToPixel( Point( nXOff, nHeaderYOff + nHalfThickness ) ); rEditWin.AddHeaderFooterControl( aHeaderText, true, nOutputOff ); } pProcessor->process( lcl_CreateHeaderFooterSeparatorPrimitives( - this, double( aBodyRect.Top() ) ) ); + this, double( nHeaderYOff ) ) ); // Footer const SwFrm* pFooterFrm = Lower(); @@ -3402,15 +3405,15 @@ void SwPageFrm::PaintDecorators( OutputDevice *pOut ) const aFooterText = aFooterText.replaceAt( nPos, 2, rStyleName ); // FIXME there are cases where the label isn't show but should be + long nFooterYOff = pFooterFrm->Frm().Top(); if ( rVisArea.IsInside( Point( rVisArea.Left(), pFooterFrm->Frm().Top() ) ) ) { - long nOutputYOff = pFooterFrm->Frm().Top(); - Point nOutputOff = rEditWin.LogicToPixel( Point( nXOff, nOutputYOff ) ); + Point nOutputOff = rEditWin.LogicToPixel( Point( nXOff, nFooterYOff - nHalfThickness ) ); rEditWin.AddHeaderFooterControl( aFooterText, false, nOutputOff ); } pProcessor->process( lcl_CreateHeaderFooterSeparatorPrimitives( - this, double( aBodyRect.Bottom() ) ) ); + this, double( nFooterYOff ) ) ); delete pProcessor; } |