summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/access/accpara.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index bdd27f7ad03b..2e234a31d1fd 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -1875,7 +1875,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
tAccParaPropValMap& rRunAttrSeq )
{
// create PaM for character at position <nIndex>
- SwPaM* pPaM( nullptr );
+ std::unique_ptr<SwPaM> pPaM;
{
const SwTextNode* pTextNode( GetTextNode() );
std::unique_ptr<SwPosition> pStartPos( new SwPosition( *pTextNode ) );
@@ -1883,7 +1883,7 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
std::unique_ptr<SwPosition> pEndPos( new SwPosition( *pTextNode ) );
pEndPos->nContent.Assign( const_cast<SwTextNode*>(pTextNode), nIndex+1 );
- pPaM = new SwPaM( *pStartPos, *pEndPos );
+ pPaM.reset(new SwPaM( *pStartPos, *pEndPos ));
}
// retrieve character attributes for the created PaM <pPaM>
@@ -1972,8 +1972,6 @@ void SwAccessibleParagraph::_getRunAttributesImpl(
}
}
}
-
- delete pPaM;
}
uno::Sequence< PropertyValue > SwAccessibleParagraph::getRunAttributes(