diff options
Diffstat (limited to 'sw/source/core/access/accpara.cxx')
-rw-r--r-- | sw/source/core/access/accpara.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx index 29464206c24b..950a0d3fc81c 100644 --- a/sw/source/core/access/accpara.cxx +++ b/sw/source/core/access/accpara.cxx @@ -2105,8 +2105,10 @@ sal_Bool SwAccessibleParagraph::replaceText( aEndPos.nContent = nEnd; // now create XTextRange as helper and set string - SwXTextRange::CreateTextRangeFromPosition( - pNode->GetDoc(), aStartPos, &aEndPos)->setString(sReplacement); + const uno::Reference<text::XTextRange> xRange( + SwXTextRange::CreateXTextRange( + *pNode->GetDoc(), aStartPos, &aEndPos)); + xRange->setString(sReplacement); // delete portion data ClearPortionData(); |