From 259a1ebd879f1cfe7e9db9af97d3842fcd51f640 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann <sbergman@redhat.com> Date: Tue, 31 May 2022 14:59:09 +0200 Subject: Rework UUIInteractionHelper construction ...to remove the need to construct a fresh m_pImpl in UUIInteractionHandler::initialize Change-Id: Ia3f1b89903448f74242a5fec3dcf87c2b1f5e764 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135187 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> --- uui/source/iahndl.hxx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'uui/source/iahndl.hxx') diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx index df2bdd054b47..a43122b7adb4 100644 --- a/uui/source/iahndl.hxx +++ b/uui/source/iahndl.hxx @@ -73,22 +73,20 @@ class UUIInteractionHelper private: css::uno::Reference< css::uno::XComponentContext > m_xContext; css::uno::Reference< css::awt::XWindow > m_xWindowParam; - const OUString m_aContextParam; + OUString m_aContextParam; StringHashMap m_aTypedCustomHandlers; UUIInteractionHelper(UUIInteractionHelper const &) = delete; UUIInteractionHelper& operator =(UUIInteractionHelper const &) = delete; public: - UUIInteractionHelper( - css::uno::Reference< css::uno::XComponentContext > const & rxContext, - css::uno::Reference< css::awt::XWindow > const & rxWindow, - const OUString & rContextParam); explicit UUIInteractionHelper( css::uno::Reference< css::uno::XComponentContext > const & rxContext); const css::uno::Reference<css::awt::XWindow> & GetParentWindow() const { return m_xWindowParam; } void SetParentWindow(const css::uno::Reference<css::awt::XWindow>& rWindow) { m_xWindowParam = rWindow; } + void setContext(OUString const & context) { m_aContextParam = context; } + ~UUIInteractionHelper(); bool handleRequest( css::uno::Reference< css::task::XInteractionRequest > const & rRequest); @@ -103,9 +101,6 @@ public: const OUString& aMessage, std::vector< OUString > const & rArguments ); - const css::uno::Reference< css::uno::XComponentContext >& - getORB() const - { return m_xContext; } private: bool handleRequest_impl( -- cgit