diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-20 15:02:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-22 08:27:22 +0200 |
commit | 9590c68852177056602342dd874b8818eeb57e82 (patch) | |
tree | c74bb114d817d5ceeb682df109dc802f82f06869 /sw/source/core/unocore | |
parent | 66a8ad83d5b8142720c8579bdde046e9332c06ca (diff) |
loplugin:useuniqueptr in SwTextAPIObject
Change-Id: I697a8a119fa4ad0a6c50bc6e4a3bc8944435928a
Reviewed-on: https://gerrit.libreoffice.org/59364
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/unocore')
-rw-r--r-- | sw/source/core/unocore/unofield.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 620143150e8a..03e0fedc064c 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -89,6 +89,7 @@ #include <svl/listener.hxx> #include <svx/dataaccessdescriptor.hxx> #include <o3tl/any.hxx> +#include <o3tl/make_unique.hxx> #include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <textapi.hxx> @@ -2376,9 +2377,8 @@ uno::Any SAL_CALL SwXTextField::getPropertyValue(const OUString& rPropertyName) { if (!m_pImpl->m_xTextObject.is()) { - SwTextAPIEditSource* pObj = - new SwTextAPIEditSource(m_pImpl->m_pDoc); - m_pImpl->m_xTextObject = new SwTextAPIObject( pObj ); + m_pImpl->m_xTextObject + = new SwTextAPIObject( o3tl::make_unique<SwTextAPIEditSource>(m_pImpl->m_pDoc) ); } uno::Reference<text::XText> xText(m_pImpl->m_xTextObject.get()); |