summaryrefslogtreecommitdiff
path: root/sw/source/core/view
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-18 11:27:55 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-19 08:13:32 +0200
commit8991efcb3dd76a80ce6b3c2e7aa264355c0ef76e (patch)
treedbe7d13fe4cf197f31dcd2d3701decd3d55cd1f7 /sw/source/core/view
parent42d11d8dabe42fb090466915adde399ba43aaed8 (diff)
loplugin:useuniqueptr in SwViewShellImp
Change-Id: Ied98688ca83652d92838f1ad01861068cd438c66 Reviewed-on: https://gerrit.libreoffice.org/57687 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/view')
-rw-r--r--sw/source/core/view/viewimp.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/core/view/viewimp.cxx b/sw/source/core/view/viewimp.cxx
index 9de73cfbdf4c..1475a5edac3a 100644
--- a/sw/source/core/view/viewimp.cxx
+++ b/sw/source/core/view/viewimp.cxx
@@ -106,13 +106,13 @@ SwViewShellImp::~SwViewShellImp()
{
m_pAccessibleMap.reset();
- delete m_pPagePreviewLayout;
+ m_pPagePreviewLayout.reset();
// Make sure HideSdrPage is also executed after ShowSdrPage.
if( m_pDrawView )
m_pDrawView->HideSdrPage();
- delete m_pDrawView;
+ m_pDrawView.reset();
DelRegion();
@@ -227,10 +227,10 @@ void SwViewShellImp::MakeDrawView()
pOutDevForDrawView = GetShell()->GetOut();
}
- m_pDrawView = new SwDrawView(
+ m_pDrawView.reset( new SwDrawView(
*this,
*rIDDMA.GetOrCreateDrawModel(),
- pOutDevForDrawView);
+ pOutDevForDrawView) );
}
GetDrawView()->SetActiveLayer("Heaven");
@@ -286,7 +286,7 @@ void SwViewShellImp::InitPagePreviewLayout()
{
OSL_ENSURE( m_pShell->GetLayout(), "no layout - page preview layout can not be created.");
if ( m_pShell->GetLayout() )
- m_pPagePreviewLayout = new SwPagePreviewLayout( *m_pShell, *(m_pShell->GetLayout()) );
+ m_pPagePreviewLayout.reset( new SwPagePreviewLayout( *m_pShell, *(m_pShell->GetLayout()) ) );
}
void SwViewShellImp::UpdateAccessible()