diff options
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 0dc99f5a3ac7..84dfcf6dfa9f 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -6436,6 +6436,15 @@ void SwFrm::PaintBaBo( const SwRect& rRect, const SwPageFrm *pPage, pOut->Pop(); } +static bool lcl_compareFillAttributes(const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& pA, const drawinglayer::attribute::SdrAllFillAttributesHelperPtr& pB) +{ + if (pA == pB) + return true; + if (!pA || !pB) + return false; + return pA->getFillAttribute() == pB->getFillAttribute(); +} + /// OD 05.09.2002 #102912# /// Do not paint background for fly frames without a background brush by /// calling <PaintBaBo> at the page or at the fly frame its anchored @@ -6540,8 +6549,8 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage, ::lcl_CalcBorderRect( aRect, this, rAttrs, false ); if ( (IsTxtFrm() || IsTabFrm()) && GetPrev() ) { - if ( GetPrev()->GetAttrSet()->GetBackground() == - GetAttrSet()->GetBackground() ) + if ( GetPrev()->GetAttrSet()->GetBackground() == GetAttrSet()->GetBackground() && + lcl_compareFillAttributes(GetPrev()->getSdrAllFillAttributesHelper(), getSdrAllFillAttributesHelper())) { aRect.Top( Frm().Top() ); } |