summaryrefslogtreecommitdiff
path: root/editeng/source/outliner/outliner.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'editeng/source/outliner/outliner.cxx')
-rw-r--r--editeng/source/outliner/outliner.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 5726854555e5..e019d91b33eb 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -54,6 +54,7 @@
// calculate if it's RTL or not
#include <unicode/ubidi.h>
#include <cassert>
+#include <boost/scoped_array.hpp>
using ::std::advance;
@@ -1007,8 +1008,8 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
if(bStrippingPortions)
{
const Font aSvxFont(pOutDev->GetFont());
- sal_Int32* pBuf = new sal_Int32[ pPara->GetText().getLength() ];
- pOutDev->GetTextArray( pPara->GetText(), pBuf );
+ boost::scoped_array<sal_Int32> pBuf(new sal_Int32[ pPara->GetText().getLength() ]);
+ pOutDev->GetTextArray( pPara->GetText(), pBuf.get() );
if(bSymbol)
{
@@ -1017,10 +1018,8 @@ void Outliner::PaintBullet( sal_Int32 nPara, const Point& rStartPos,
aTextPos.Y() -= aMetric.GetDescent();
}
- DrawingText(aTextPos, pPara->GetText(), 0, pPara->GetText().getLength(), pBuf,
+ DrawingText(aTextPos, pPara->GetText(), 0, pPara->GetText().getLength(), pBuf.get(),
aSvxFont, nPara, -1, bRightToLeftPara, 0, 0, false, false, true, 0, Color(), Color());
-
- delete[] pBuf;
}
else
{