[Libreoffice-commits] core.git: sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Jan 11 07:45:01 UTC 2019


 sw/source/core/view/viewsh.cxx |    7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

New commits:
commit 1e3442983b44ad6042cb687dbb77bf174796a255
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Jan 10 17:03:26 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Jan 11 08:44:34 2019 +0100

    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 at collabora.co.uk>

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 );


More information about the Libreoffice-commits mailing list