summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/layact.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-02 11:13:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-03 08:17:02 +0200
commitecf56400b31511ebb737ba6c9200d1b075867ec7 (patch)
tree9164dc1d1e2b07f6f962296a2f0dd51e9274e832 /sw/source/core/layout/layact.cxx
parent0df31898281a771821d62ad419c7343da72cfb51 (diff)
loplugin:useuniqueptr in SwLayAction
Change-Id: I0552a113a3eaf1265e65d32b2b04cc768571d9ff Reviewed-on: https://gerrit.libreoffice.org/56827 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/layout/layact.cxx')
-rw-r--r--sw/source/core/layout/layact.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 761a85c51741..b390ab771371 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -78,7 +78,7 @@ void SwLayAction::CheckWaitCursor()
if ( !m_pWait && IsWaitAllowed() && IsPaint() &&
((std::clock() - m_nStartTicks) * 1000 / CLOCKS_PER_SEC >= CLOCKS_PER_SEC/2) )
{
- m_pWait = new SwWait( *m_pRoot->GetFormat()->GetDoc()->GetDocShell(), true );
+ m_pWait.reset( new SwWait( *m_pRoot->GetFormat()->GetDoc()->GetDocShell(), true ) );
}
}
@@ -319,8 +319,7 @@ void SwLayAction::Action(OutputDevice* pRenderContext)
//TurboMode? Hands-off during idle-format
if ( IsPaint() && !IsIdle() && TurboAction() )
{
- delete m_pWait;
- m_pWait = nullptr;
+ m_pWait.reset();
m_pRoot->ResetTurboFlag();
m_bActionInProgress = false;
m_pRoot->DeleteEmptySct();
@@ -348,8 +347,7 @@ void SwLayAction::Action(OutputDevice* pRenderContext)
}
m_pRoot->DeleteEmptySct();
- delete m_pWait;
- m_pWait = nullptr;
+ m_pWait.reset();
//Turbo-Action permitted again for all cases.
m_pRoot->ResetTurboFlag();