summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/ssfrm.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2018-01-04 15:35:21 +0100
committerMichael Stahl <mstahl@redhat.com>2018-01-04 16:22:33 +0100
commit794e54cd34239006270a00a6e5017acc463063f9 (patch)
tree1a06fbf34fffcacfb911a072986390da33d2e87d /sw/source/core/layout/ssfrm.cxx
parent67e1e2ee40dba196f706afb43d0379b29c3c0f42 (diff)
sw: convert SwFrame::mpDrawObjs to unique_ptr
Change-Id: I0713e6fb2b3f2cfc3115daafe37ae5380f3e7938
Diffstat (limited to 'sw/source/core/layout/ssfrm.cxx')
-rw-r--r--sw/source/core/layout/ssfrm.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index 9934d1c4b4dd..180ceba1ff9c 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -338,11 +338,11 @@ void SwFrame::DestroyImpl()
}
}
- if( mpDrawObjs )
+ if (m_pDrawObjs)
{
- for ( size_t i = mpDrawObjs->size(); i; )
+ for (size_t i = m_pDrawObjs->size(); i; )
{
- SwAnchoredObject* pAnchoredObj = (*mpDrawObjs)[--i];
+ SwAnchoredObject* pAnchoredObj = (*m_pDrawObjs)[--i];
if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr )
{
SwFrame::DestroyFrame(static_cast<SwFlyFrame*>(pAnchoredObj));
@@ -360,8 +360,7 @@ void SwFrame::DestroyImpl()
}
}
}
- delete mpDrawObjs;
- mpDrawObjs = nullptr;
+ m_pDrawObjs.reset();
}
}
@@ -371,7 +370,7 @@ SwFrame::~SwFrame()
assert(!IsDeleteForbidden()); // check that it's not deleted while deletes are forbidden
#if OSL_DEBUG_LEVEL > 0
// JP 15.10.2001: for detection of access to deleted frames
- mpDrawObjs = reinterpret_cast<SwSortedObjs*>(0x33333333);
+ mpRoot = reinterpret_cast<SwRootFrame*>(0x33333333);
#endif
}