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>
diff --git a/uui/source/interactionhandler.cxx b/uui/source/interactionhandler.cxx
index cc5579f..b9e3f4d 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 e9d73f0..8bcb78b 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 685a180..9456444 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;