summaryrefslogtreecommitdiff
path: root/vcl/source/edit/textdata.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/edit/textdata.cxx')
-rw-r--r--vcl/source/edit/textdata.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/vcl/source/edit/textdata.cxx b/vcl/source/edit/textdata.cxx
index dec9f36b3429..77abfb0c98b5 100644
--- a/vcl/source/edit/textdata.cxx
+++ b/vcl/source/edit/textdata.cxx
@@ -331,21 +331,18 @@ TEIMEInfos::TEIMEInfos( const TextPaM& rPos, const OUString& rOldTextAfterStartP
TEIMEInfos::~TEIMEInfos()
{
- delete[] pAttribs;
}
void TEIMEInfos::CopyAttribs(const ExtTextInputAttr* pA, sal_Int32 nL)
{
nLen = nL;
- delete[] pAttribs;
- pAttribs = new ExtTextInputAttr[ nL ];
- memcpy( pAttribs, pA, nL*sizeof(ExtTextInputAttr) );
+ pAttribs.reset( new ExtTextInputAttr[ nL ] );
+ memcpy( pAttribs.get(), pA, nL*sizeof(ExtTextInputAttr) );
}
void TEIMEInfos::DestroyAttribs()
{
- delete[] pAttribs;
- pAttribs = nullptr;
+ pAttribs.reset();
nLen = 0;
}