diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-10 14:06:47 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-07-11 08:07:42 +0200 |
commit | 877362dadf34c910365490ce53b2dcf902dab8cc (patch) | |
tree | 91b0c0b1fd827539e971ca20fd46d1fe69d25531 /sc/source/ui/view/tabvwsh8.cxx | |
parent | 72eb6f7e47d7c8c19c76cea67330464af47648f1 (diff) |
loplugin:useuniqueptr in ScTabViewShell
Change-Id: I35061f62244ea40ce66bbb0ba09edf9b45d62742
Reviewed-on: https://gerrit.libreoffice.org/57244
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/ui/view/tabvwsh8.cxx')
-rw-r--r-- | sc/source/ui/view/tabvwsh8.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/sc/source/ui/view/tabvwsh8.cxx b/sc/source/ui/view/tabvwsh8.cxx index bc83876ab6c3..3672d819be55 100644 --- a/sc/source/ui/view/tabvwsh8.cxx +++ b/sc/source/ui/view/tabvwsh8.cxx @@ -27,16 +27,12 @@ void ScTabViewShell::SetDefaultFrameLine( const ::editeng::SvxBorderLine* pLine { if ( pLine ) { - delete pCurFrameLine; - pCurFrameLine = new ::editeng::SvxBorderLine( &pLine->GetColor(), + pCurFrameLine.reset( new ::editeng::SvxBorderLine( &pLine->GetColor(), pLine->GetWidth(), - pLine->GetBorderLineStyle() ); - } - else if ( pCurFrameLine ) - { - delete pCurFrameLine; - pCurFrameLine = nullptr; + pLine->GetBorderLineStyle() ) ); } + else + pCurFrameLine.reset(); } bool ScTabViewShell::HasSelection( bool bText ) const |