summaryrefslogtreecommitdiff
path: root/accessibility/source/extended/textwindowaccessibility.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'accessibility/source/extended/textwindowaccessibility.cxx')
-rw-r--r--accessibility/source/extended/textwindowaccessibility.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx
index 754526db7b75..741712b40c4b 100644
--- a/accessibility/source/extended/textwindowaccessibility.cxx
+++ b/accessibility/source/extended/textwindowaccessibility.cxx
@@ -1043,7 +1043,7 @@ Document::retrieveCharacterAttributes(
// sort the attributes
sal_Int32 nLength = aRes.getLength();
const css::beans::PropertyValue* pPairs = aRes.getConstArray();
- sal_Int32* pIndices = new sal_Int32[nLength];
+ std::unique_ptr<sal_Int32[]> pIndices( new sal_Int32[nLength] );
for( i = 0; i < nLength; i++ )
pIndices[i] = i;
std::sort( &pIndices[0], &pIndices[nLength], IndexCompare(pPairs) );
@@ -1054,7 +1054,6 @@ Document::retrieveCharacterAttributes(
{
pNewValues[i] = pPairs[pIndices[i]];
}
- delete[] pIndices;
return aNewValues;
}