diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-19 09:11:39 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-19 11:28:41 +0000 |
commit | 968f6a7f0293c08a73807603f3cb294e4b50bad8 (patch) | |
tree | ace3fb5c260c8bbdc3f97c48499b5466f660a68c /uui | |
parent | d3ff66999d924e832f8219c65ced0526f1a67f82 (diff) |
new loplugin: useuniqueptr: unotools..xmlscript
Change-Id: I6966d44cff644112dd837adfe7d9c4f459457271
Reviewed-on: https://gerrit.libreoffice.org/33298
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'uui')
-rw-r--r-- | uui/source/interactionhandler.cxx | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/uui/source/interactionhandler.cxx b/uui/source/interactionhandler.cxx index e85bcd4215b8..7ed463cd844b 100644 --- a/uui/source/interactionhandler.cxx +++ b/uui/source/interactionhandler.cxx @@ -39,13 +39,11 @@ class UUIInteractionHandler: css::task::XInteractionHandler2 > { private: - UUIInteractionHelper * m_pImpl; + std::unique_ptr<UUIInteractionHelper> m_pImpl; public: explicit UUIInteractionHandler(css::uno::Reference< css::uno::XComponentContext > const & rxContext); - virtual ~UUIInteractionHandler() override; - UUIInteractionHandler(const UUIInteractionHandler&) = delete; UUIInteractionHandler& operator=(const UUIInteractionHandler&) = delete; @@ -80,11 +78,6 @@ UUIInteractionHandler::UUIInteractionHandler( { } -UUIInteractionHandler::~UUIInteractionHandler() -{ - delete m_pImpl; -} - OUString SAL_CALL UUIInteractionHandler::getImplementationName() throw (uno::RuntimeException, std::exception) { @@ -117,7 +110,7 @@ UUIInteractionHandler::initialize( throw (uno::Exception, std::exception) { uno::Reference<uno::XComponentContext> xContext = m_pImpl->getORB(); - delete m_pImpl; + m_pImpl.reset(); // The old-style InteractionHandler service supported a sequence of // PropertyValue, while the new-style service now uses constructors to pass @@ -140,7 +133,7 @@ UUIInteractionHandler::initialize( } } - m_pImpl = new UUIInteractionHelper(xContext, xWindow, aContext); + m_pImpl.reset( new UUIInteractionHelper(xContext, xWindow, aContext) ); } void SAL_CALL |