[PATCH 2/2] fdo#36826: draw background before borders or borders may be hidden

Cédric Bosdonnat cedric.bosdonnat.ooo at free.fr
Fri May 13 06:25:01 PDT 2011


---
 sw/source/core/layout/paintfrm.cxx |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 904c2c9..144d2b0 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -5810,13 +5810,12 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
             {
                 SwBorderAttrAccess aAccess( SwFrm::GetCache(), (SwFrm*)pFrm );
                 const SwBorderAttrs &rTmpAttrs = *aAccess.Get();
-                /// OD 06.08.2002 #99657# - paint border before painting background
-                if ( bLowerBorder )
-                    pFrm->PaintBorder( aBorderRect, pPage, rTmpAttrs );
                 if ( ( pFrm->IsLayoutFrm() && bLowerBorder ) ||
                      aFrmRect.IsOver( aRect ) )
                     pFrm->PaintBackground( aRect, pPage, rTmpAttrs, bLowMode,
                                            bLowerBorder );
+                if ( bLowerBorder )
+                    pFrm->PaintBorder( aBorderRect, pPage, rTmpAttrs );
             }
             pFrm = pFrm->GetNext();
         } while ( pFrm && pFrm->GetUpper() == this &&
-- 
1.7.3.4


--=-h/zu4QwmWqRBLTwO1jWi--



More information about the LibreOffice mailing list