diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-21 08:32:39 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-21 11:17:44 +0200 |
commit | d05b8080b25877e94d54576744b68f01ae775380 (patch) | |
tree | 7946f87d5fd0ce1f49665cd2a1e3719f5b5b2335 /uui | |
parent | eecc113e6f6e51e5e37059235c1069dc9c4c1cc8 (diff) |
flatten UUIInteractionHandler
no need to allocate these helpers separately
Change-Id: I9a062c689b5c3ecb40e6400cfe9715adcdf3ae31
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134702
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'uui')
-rw-r--r-- | uui/source/interactionhandler.cxx | 7 | ||||
-rw-r--r-- | uui/source/requeststringresolver.cxx | 2 | ||||
-rw-r--r-- | uui/source/requeststringresolver.hxx | 7 |
3 files changed, 8 insertions, 8 deletions
diff --git a/uui/source/interactionhandler.cxx b/uui/source/interactionhandler.cxx index cc5579fd1ed1..b9e3f4d788a1 100644 --- a/uui/source/interactionhandler.cxx +++ b/uui/source/interactionhandler.cxx @@ -34,6 +34,7 @@ #include <cppuhelper/exc_hlp.hxx> #include <cppuhelper/implbase.hxx> #include <cppuhelper/supportsservice.hxx> +#include <optional> using namespace com::sun::star; @@ -46,7 +47,7 @@ class UUIInteractionHandler: css::beans::XPropertySet> { private: - std::unique_ptr<UUIInteractionHelper> m_pImpl; + std::optional<UUIInteractionHelper> m_pImpl; public: explicit UUIInteractionHandler(css::uno::Reference< css::uno::XComponentContext > const & rxContext); @@ -131,7 +132,7 @@ public: UUIInteractionHandler::UUIInteractionHandler( uno::Reference< uno::XComponentContext > const & rxContext) - : m_pImpl(new UUIInteractionHelper(rxContext)) + : m_pImpl(rxContext) { } @@ -184,7 +185,7 @@ UUIInteractionHandler::initialize( } } - m_pImpl.reset( new UUIInteractionHelper(xContext, xWindow, aContext) ); + m_pImpl.emplace( xContext, xWindow, aContext ); } void SAL_CALL diff --git a/uui/source/requeststringresolver.cxx b/uui/source/requeststringresolver.cxx index e9d73f0749da..8bcb78bfea8d 100644 --- a/uui/source/requeststringresolver.cxx +++ b/uui/source/requeststringresolver.cxx @@ -28,7 +28,7 @@ using namespace css; UUIInteractionRequestStringResolver::UUIInteractionRequestStringResolver( uno::Reference< uno::XComponentContext > const & rxContext) - : m_pImpl(new UUIInteractionHelper(rxContext)) + : m_pImpl(rxContext) { } diff --git a/uui/source/requeststringresolver.hxx b/uui/source/requeststringresolver.hxx index 685a18038c86..9456444a43f4 100644 --- a/uui/source/requeststringresolver.hxx +++ b/uui/source/requeststringresolver.hxx @@ -23,9 +23,8 @@ #include <com/sun/star/task/XInteractionRequestStringResolver.hpp> #include <com/sun/star/uno/XComponentContext.hpp> #include <cppuhelper/implbase.hxx> -#include <memory> - -class UUIInteractionHelper; +#include "iahndl.hxx" +#include <optional> class UUIInteractionRequestStringResolver: public cppu::WeakImplHelper< @@ -37,7 +36,7 @@ public: css::uno::Reference< css::uno::XComponentContext > const & rxContext); private: - std::unique_ptr<UUIInteractionHelper> m_pImpl; + std::optional<UUIInteractionHelper> m_pImpl; UUIInteractionRequestStringResolver(UUIInteractionRequestStringResolver const &) = delete; void operator =(UUIInteractionRequestStringResolver const &) = delete; |