sw: convert DELETEZ to unique_ptr in authfld.cxx

Change-Id: Ic37556a95b31308a7f88a1074c2c1cba30d47cd0
Reviewed-on: https://gerrit.libreoffice.org/49988
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx
index 35a94a6..4c6803e 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -272,8 +272,8 @@ sal_uInt16  SwAuthorityFieldType::GetSequencePos(sal_IntPtr nHandle)
                pTextNode->getLayoutFrame( rDoc.getIDocumentLayoutAccess().GetCurrentLayout() ) &&
                pTextNode->GetNodes().IsDocNodes() )
            {
                SwTOXAuthority* pNew = new SwTOXAuthority( *pTextNode,
                                                            *pFormatField, aIntl );
                std::unique_ptr<SwTOXAuthority> pNew(
                    new SwTOXAuthority(*pTextNode, *pFormatField, aIntl));

                for(SwTOXSortTabBases::size_type i = 0; i < aSortArr.size(); ++i)
                {
@@ -283,7 +283,7 @@ sal_uInt16  SwAuthorityFieldType::GetSequencePos(sal_IntPtr nHandle)
                        //only the first occurrence in the document
                        //has to be in the array
                        if(*pOld < *pNew)
                            DELETEZ(pNew);
                            pNew.reset();
                        else // remove the old content
                        {
                            aSortArr.erase(aSortArr.begin() + i);
@@ -304,7 +304,7 @@ sal_uInt16  SwAuthorityFieldType::GetSequencePos(sal_IntPtr nHandle)
                            break;
                        ++j;
                    }
                    aSortArr.insert(aSortArr.begin() + j, pNew);
                    aSortArr.insert(aSortArr.begin() + j, pNew.release());
                }
            }
        }