diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-13 10:45:26 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-09-14 08:59:38 +0200 |
commit | 8920f62b51cd0fe2dc9f92be2d66eec6e663cdce (patch) | |
tree | fe72ac64b76d1ff6d3aa9f23db77c0776a3d14a4 | |
parent | cf4b4a75ef813b243986b3dc9b5a4be47b218f06 (diff) |
loplugin:useuniqueptr in SwFrame::PaintSwFrameBackground
Change-Id: I351ebf8ece7e6c298bfd352d308bb811029ea266
Reviewed-on: https://gerrit.libreoffice.org/60448
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 3ed96c30813e..57243e777ef1 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -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 |