summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-05-08 22:54:00 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2015-05-26 00:51:06 +0200
commit1bde96338b22d3b753f5fd2c32ba84164be35e3c (patch)
tree81dfd13f2f2df58ca828a142cfe7b1150f970399 /sw
parent6a79fe2b0bc0101b1d279b22f3cab7f12538c109 (diff)
use new unocrsrs in access
Change-Id: Ice2bb4fae03efba1f516859c2f129c3442f3b85f
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/access/accpara.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index fab40746f65c..8296c0f660d5 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -640,15 +640,14 @@ SwXTextPortion* SwAccessibleParagraph::CreateUnoPortion(
SwTextNode* pTextNode = const_cast<SwTextNode*>( GetTextNode() );
SwIndex aIndex( pTextNode, nStart );
SwPosition aStartPos( *pTextNode, aIndex );
- SwUnoCrsr* pUnoCursor = pTextNode->GetDoc()->CreateUnoCrsr( aStartPos );
+ auto pUnoCursor(pTextNode->GetDoc()->CreateUnoCrsr2( aStartPos ));
pUnoCursor->SetMark();
pUnoCursor->GetMark()->nContent = nEnd;
// create a (dummy) text portion to be returned
uno::Reference<text::XText> aEmpty;
SwXTextPortion* pPortion =
- new SwXTextPortion ( pUnoCursor, aEmpty, PORTION_TEXT);
- delete pUnoCursor;
+ new SwXTextPortion ( pUnoCursor.get(), aEmpty, PORTION_TEXT);
return pPortion;
}