diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-01-10 17:03:26 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-01-11 08:44:34 +0100 |
commit | 1e3442983b44ad6042cb687dbb77bf174796a255 (patch) | |
tree | 6f2d335700a8d91f8a7fce133ac673358da33e04 /sw | |
parent | a41b1d18ad26703f6a5b622f10e1126570bfd419 (diff) |
use unique_ptr in SwViewShell::ImplEndAction
Change-Id: I9be790996347e191df63198de109acf973104d0d
Reviewed-on: https://gerrit.libreoffice.org/66125
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 77ccf51f2cd4..96fd2a7308fe 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -320,7 +320,7 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd ) } mbPaintWorks = true; - SwRegionRects *pRegion = Imp()->GetRegion(); + std::unique_ptr<SwRegionRects> pRegion = std::move(Imp()->m_pRegion); //JP 27.11.97: what hid the selection, must also Show it, // else we get Paint errors! @@ -335,8 +335,6 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd ) { SwRootFrame* pCurrentLayout = GetLayout(); - (void) Imp()->m_pRegion.release(); // pRegion owns it now - //First Invert then Compress, never the other way round! pRegion->Invert(); @@ -435,9 +433,6 @@ void SwViewShell::ImplEndAction( const bool bIdleEnd ) else lcl_PaintTransparentFormControls(*this, aRect); // i#107365 } - - delete pRegion; - Imp()->DelRegion(); } if( bShowCursor ) static_cast<SwCursorShell*>(this)->ShowCursors( true ); |