Kaydet (Commit) 8920f62b authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in SwFrame::PaintSwFrameBackground

Change-Id: I351ebf8ece7e6c298bfd352d308bb811029ea266
Reviewed-on: https://gerrit.libreoffice.org/60448
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst cf4b4a75
......@@ -6122,7 +6122,7 @@ void SwFrame::PaintSwFrameBackground( const SwRect &rRect, const SwPageFrame *pP
const SvxBrushItem* pItem;
// OD 05.09.2002 #102912#
// temporary background brush for a fly frame without a background brush
SvxBrushItem* pTmpBackBrush = nullptr;
std::unique_ptr<SvxBrushItem> pTmpBackBrush;
const Color* pCol;
SwRect aOrigBackRect;
const bool bPageFrame = IsPageFrame();
......@@ -6156,20 +6156,20 @@ void SwFrame::PaintSwFrameBackground( const SwRect &rRect, const SwPageFrame *pP
)
)
{
pTmpBackBrush = new SvxBrushItem( COL_WHITE, RES_BACKGROUND );
pTmpBackBrush.reset(new SvxBrushItem( COL_WHITE, RES_BACKGROUND ));
//UUU
aFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(COL_WHITE));
}
else
{
pTmpBackBrush = new SvxBrushItem( aGlobalRetoucheColor, RES_BACKGROUND);
pTmpBackBrush.reset(new SvxBrushItem( aGlobalRetoucheColor, RES_BACKGROUND));
//UUU
aFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aGlobalRetoucheColor));
}
pItem = pTmpBackBrush;
pItem = pTmpBackBrush.get();
bBack = true;
}
}
......@@ -6293,7 +6293,7 @@ void SwFrame::PaintSwFrameBackground( const SwRect &rRect, const SwPageFrame *pP
// OD 05.09.2002 #102912#
// delete temporary background brush.
delete pTmpBackBrush;
pTmpBackBrush.reset();
//Now process lower and his neighbour.
//We end this as soon as a Frame leaves the chain and therefore is not a lower
......
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