uui/source/interactionhandler.cxx | 7 ++++--- uui/source/requeststringresolver.cxx | 2 +- uui/source/requeststringresolver.hxx | 7 +++---- 3 files changed, 8 insertions(+), 8 deletions(-)
New commits: commit d05b8080b25877e94d54576744b68f01ae775380 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Sat May 21 08:32:39 2022 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Sat May 21 11:17:44 2022 +0200 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.gran...@collabora.co.uk> 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;