Kaydet (Commit) 8e72fd88 authored tarafından Michael Stahl's avatar Michael Stahl

use scoped_array in lcl_UnMerge

Change-Id: I00c899612d499273725ff8071aff1c93c7d17327
üst 2422544b
......@@ -43,6 +43,7 @@
#include <set>
#include <list>
#include <memory>
#include <boost/scoped_array.hpp>
#include <editeng/boxitem.hxx>
#include <editeng/protitem.hxx>
#include <swtblfmt.hxx>
......@@ -1097,10 +1098,10 @@ void lcl_UnMerge( const SwTable& rTable, SwTableBox& rBox, size_t nCnt,
return;
if( nCnt > nCount )
nCnt = nCount;
size_t *const pSplitIdx = new size_t[ nCnt ];
::boost::scoped_array<size_t> const pSplitIdx(new size_t[nCnt]);
if( bSameHeight )
{
SwTwips *pHeights = new SwTwips[ nCount ];
::boost::scoped_array<SwTwips> const pHeights(new SwTwips[nCount]);
SwTwips nHeight = 0;
for (size_t i = 0; i < nCount; ++i)
{
......@@ -1118,7 +1119,6 @@ void lcl_UnMerge( const SwTable& rTable, SwTableBox& rBox, size_t nCnt,
nSumH += pHeights[ nIdx++ ];
pSplitIdx[ i - 1 ] = nIdx;
}
delete[] pHeights;
}
else
{
......@@ -1136,7 +1136,6 @@ void lcl_UnMerge( const SwTable& rTable, SwTableBox& rBox, size_t nCnt,
while( ++nIdx < nNextIdx )
aBoxes[ nIdx ]->setRowSpan( nIdx - nNextIdx );
}
delete[] pSplitIdx;
}
/** lcl_FillSelBoxes(..) puts all boxes of a given line into the selection structure
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment