diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-01-17 12:32:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-01-17 15:40:41 +0100 |
commit | 0f73327c2fa96c2b2f0469c8fac0cc1130a9130f (patch) | |
tree | 0497dde5b59ab76d6f40bb8b93fad62b10e33b66 /sw/source/core/layout/paintfrm.cxx | |
parent | 59647fa4d190622cc6aae873de06a4dfe973bd54 (diff) |
use unique_ptr in sw
Change-Id: I899d050e76f705002e943ae5384cc8c928789df9
Reviewed-on: https://gerrit.libreoffice.org/66512
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/layout/paintfrm.cxx')
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 671916cf4194..dafc00ec4d34 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -2910,9 +2910,9 @@ void SwRootFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& else SwRootFrame::s_isInPaint = bResetRootPaint = true; - SwSavePaintStatics *pStatics = nullptr; + std::unique_ptr<SwSavePaintStatics> pStatics; if ( gProp.pSGlobalShell ) - pStatics = new SwSavePaintStatics(); + pStatics.reset(new SwSavePaintStatics()); gProp.pSGlobalShell = pSh; if( !pSh->GetWin() ) @@ -3230,7 +3230,7 @@ void SwRootFrame::PaintSwFrame(vcl::RenderContext& rRenderContext, SwRect const& if ( bResetRootPaint ) SwRootFrame::s_isInPaint = false; if ( pStatics ) - delete pStatics; + pStatics.reset(); else { gProp.pSProgress = nullptr; |