summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-03-22 14:52:41 +0100
committerMichael Stahl <mstahl@redhat.com>2012-03-22 23:11:02 +0100
commit06d1d69fc8c214251cf9dbc7f87756651657d3bf (patch)
treedb55b5070baa291cfdbb70b601516d637d7018ed
parent3e425dfa4b9c2a0198a13b2fb18364a32603080f (diff)
SwFEShell::ShouldObjectBeSelected leaks pPos
-rw-r--r--sw/source/core/frmedt/feshview.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 7c6dd99ea0e7..be852a900e1b 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -1163,13 +1163,13 @@ sal_Bool SwFEShell::ShouldObjectBeSelected(const Point& rPt)
dynamic_cast<const SwTxtFrm*>(pCntntFrm);
if ( pTxtFrm )
{
- SwPosition* pPos =
- new SwPosition( *(pTxtFrm->GetTxtNode()) );
+ SwPosition aPos( *(pTxtFrm->GetTxtNode()) );
Point aTmpPt( rPt );
- if ( pTxtFrm->GetKeyCrsrOfst( pPos, aTmpPt ) )
+ if (pTxtFrm->GetKeyCrsrOfst(&aPos, aTmpPt))
{
SwRect aCursorCharRect;
- if ( pTxtFrm->GetCharRect( aCursorCharRect, *pPos ) )
+ if (pTxtFrm->GetCharRect(aCursorCharRect,
+ aPos))
{
if ( aCursorCharRect.IsOver( SwRect( pObj->GetLastBoundRect() ) ) )
{