diff --git a/sw/inc/bparr.hxx b/sw/inc/bparr.hxx index 90f00231fa3d..04b77eb16dee 100644 --- a/sw/inc/bparr.hxx +++ b/sw/inc/bparr.hxx @@ -54,14 +54,11 @@ public: struct BlockInfo final { - BigPtrArray* const - pBigArr; ///< in this array the block is located + BigPtrArray* pBigArr; ///< in this array the block is located std::array mvData; ///< data block sal_uLong nStart, nEnd; ///< start- and end index sal_uInt16 nElem; ///< number of elements - - BlockInfo(BigPtrArray* b) : pBigArr(b) {} }; class SW_DLLPUBLIC BigPtrArray diff --git a/sw/source/core/bastyp/bparr.cxx b/sw/source/core/bastyp/bparr.cxx index 2cb854a402b0..8d7124a470ac 100644 --- a/sw/source/core/bastyp/bparr.cxx +++ b/sw/source/core/bastyp/bparr.cxx @@ -156,7 +156,7 @@ void BigPtrArray::UpdIndex( sal_uInt16 pos ) */ BlockInfo* BigPtrArray::InsBlock( sal_uInt16 pos ) { - BlockInfo* p = new BlockInfo(this); + BlockInfo* p = new BlockInfo; m_vpInf.insert( m_vpInf.begin() + pos, p ); if( pos ) @@ -166,6 +166,7 @@ BlockInfo* BigPtrArray::InsBlock( sal_uInt16 pos ) p->nEnd--; // no elements p->nElem = 0; + p->pBigArr = this; return p; }