From 1024c172a5bfb3d85a86fcf7a046aa2b03950edd Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 23 Mar 2012 14:08:31 +0100 Subject: fdo#42750 fdo#45562 fdo#47717: border paint ordering: Paint borders after subsidiary lines and hell layer, but before heaven layer. --- sw/source/core/layout/paintfrm.cxx | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index aa0438bfc74f..a9f60f3cee83 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -223,9 +223,12 @@ public: { m_Lines.push_back(xLine); } - drawinglayer::primitive2d::Primitive2DSequence GetBorderLines() const + drawinglayer::primitive2d::Primitive2DSequence GetBorderLines_Clear() { - return m_Lines.getAsConstList(); + ::comphelper::SequenceAsVector< + ::drawinglayer::primitive2d::Primitive2DReference> lines; + ::std::swap(m_Lines, lines); + return lines.getAsConstList(); } }; @@ -3000,6 +3003,16 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const } pLines->PaintLines( pSh->GetOut() ); + if ( pSh->GetWin() ) + { + pSubsLines->PaintSubsidiary( pSh->GetOut(), pLines ); + DELETEZ( pSubsLines ); + DELETEZ( pSpecSubsLines ); + } + // fdo#42750: delay painting these until after subsidiary lines + // fdo#45562: delay painting these until after hell layer + // fdo#47717: but do it before heaven layer + ProcessPrimitives(g_pBorderLines->GetBorderLines_Clear()); if ( pSh->Imp()->HasDrawView() ) { @@ -3016,14 +3029,8 @@ SwRootFrm::Paint(SwRect const& rRect, SwPrintData const*const pPrintData) const if ( bExtraData ) pPage->RefreshExtraData( aPaintRect ); - if ( pSh->GetWin() ) - { - pSubsLines->PaintSubsidiary( pSh->GetOut(), pLines ); - DELETEZ( pSubsLines ); - DELETEZ( pSpecSubsLines ); - } - // fdo#42750: delay painting these until after subsidiary lines - ProcessPrimitives(g_pBorderLines->GetBorderLines()); + // have to paint frame borders added in heaven layer here... + ProcessPrimitives(g_pBorderLines->GetBorderLines_Clear()); DELETEZ(g_pBorderLines); pVout->Leave(); -- cgit v1.2.3