Kaydet (Commit) 1e33cd83 authored tarafından Miklos Vajna's avatar Miklos Vajna

tdf#82661 SwFrm::PaintBackground: handle fill attrs when comparing background

Regression from 7d9bb549 (Related:
i#124638 Second step of DrawingLayer FillAttributes..., 2014-06-02),
should be good enough till SdrAllFillAttributesHelper gets its own
operator ==().

Change-Id: I03f847bc1589e3771790427d9894cc330a7b8dc6
üst e46549e9
......@@ -6455,6 +6455,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
......@@ -6559,8 +6568,8 @@ void SwFrm::PaintBackground( const SwRect &rRect, const SwPageFrm *pPage,
::lcl_CalcBorderRect( aRect, this, rAttrs, false, gProp);
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() );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment