diff options
author | Michael Stahl <mstahl@redhat.com> | 2018-01-04 15:52:06 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2018-01-04 16:22:33 +0100 |
commit | 0af086beaaad8ded4f551ece0086ce990952ee16 (patch) | |
tree | 3db93c572a9e0178e881dcb90cb87c495cf5146d /sw/source/core/layout/pagechg.cxx | |
parent | sw: convert SwFrame::mpDrawObjs to unique_ptr (diff) | |
download | core-0af086beaaad8ded4f551ece0086ce990952ee16.tar.gz core-0af086beaaad8ded4f551ece0086ce990952ee16.zip |
sw: convert SwPageFrame::m_pSortedObjs to unique_ptr
Change-Id: Id0cac6143c4c9278fc450048cc0b276d72d0c1a1
Diffstat (limited to 'sw/source/core/layout/pagechg.cxx')
-rw-r--r-- | sw/source/core/layout/pagechg.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx index 79abcfdf6f56..58ffeed1a424 100644 --- a/sw/source/core/layout/pagechg.cxx +++ b/sw/source/core/layout/pagechg.cxx @@ -169,7 +169,6 @@ void SwBodyFrame::Format( vcl::RenderContext* /*pRenderContext*/, const SwBorder SwPageFrame::SwPageFrame( SwFrameFormat *pFormat, SwFrame* pSib, SwPageDesc *pPgDsc ) : SwFootnoteBossFrame( pFormat, pSib ), - m_pSortedObjs( nullptr ), m_pDesc( pPgDsc ), m_nPhyPageNum( 0 ) { @@ -261,7 +260,7 @@ void SwPageFrame::DestroyImpl() } // empty FlyContainer, deletion of the Flys is done by the anchor (in base class SwFrame) - if ( m_pSortedObjs ) + if (m_pSortedObjs) { // Objects can be anchored at pages that are before their anchors (why ever...). // In such cases, we would access already freed memory. @@ -269,8 +268,7 @@ void SwPageFrame::DestroyImpl() { pAnchoredObj->SetPageFrame( nullptr ); } - delete m_pSortedObjs; - m_pSortedObjs = nullptr; // reset to zero to prevent problems when detaching the Flys + m_pSortedObjs.reset(); // reset to zero to prevent problems when detaching the Flys } if ( !IsEmptyPage() ) //#59184# unnecessary for empty pages |