diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-09-09 11:06:55 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-09-09 16:25:06 +0100 |
commit | adb9b7c7cc37e768fc874a0dd584e6d76adbf62f (patch) | |
tree | 58b4c7cf7b482d3226effb7c7d57179a54a8e114 /uui/source/interactionhandler.cxx | |
parent | df3a588d3b604c301bc222b4ac1bde7d1dd855d0 (diff) |
enable route to get ParentWindow from an existing UUIInteractionHelper
Change-Id: I550f99fa4a5db41cdad0b4d60ca02866835d7ae2
Diffstat (limited to 'uui/source/interactionhandler.cxx')
-rw-r--r-- | uui/source/interactionhandler.cxx | 60 |
1 files changed, 57 insertions, 3 deletions
diff --git a/uui/source/interactionhandler.cxx b/uui/source/interactionhandler.cxx index df06d4ea1d0e..1d587988478f 100644 --- a/uui/source/interactionhandler.cxx +++ b/uui/source/interactionhandler.cxx @@ -22,6 +22,7 @@ #include <osl/diagnose.h> #include <com/sun/star/awt/XWindow.hpp> +#include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> @@ -38,9 +39,10 @@ using namespace com::sun::star; namespace { class UUIInteractionHandler: - public cppu::WeakImplHelper< css::lang::XServiceInfo, - css::lang::XInitialization, - css::task::XInteractionHandler2 > + public cppu::WeakImplHelper<css::lang::XServiceInfo, + css::lang::XInitialization, + css::task::XInteractionHandler2, + css::beans::XPropertySet> { private: std::unique_ptr<UUIInteractionHelper> m_pImpl; @@ -69,6 +71,58 @@ public: handleInteractionRequest( const css::uno::Reference< css::task::XInteractionRequest >& Request ) override; + + virtual void SAL_CALL + addPropertyChangeListener( const OUString& /*aPropertyName*/, const css::uno::Reference< css::beans::XPropertyChangeListener >& /*xListener*/ ) override + { + assert(false); + } + + virtual void SAL_CALL + removePropertyChangeListener( const OUString& /*aPropertyName*/, const css::uno::Reference< css::beans::XPropertyChangeListener >& /*xListener*/ ) override + { + assert(false); + } + + virtual void SAL_CALL + addVetoableChangeListener( const OUString& /*aPropertyName*/, const css::uno::Reference< css::beans::XVetoableChangeListener >& /*xListener*/ ) override + { + assert(false); + } + + virtual void SAL_CALL + removeVetoableChangeListener( const OUString& /*aPropertyName*/, const css::uno::Reference< css::beans::XVetoableChangeListener >& /*xListener*/ ) override + { + assert(false); + } + + virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() override + { + assert(false); + return nullptr; + } + + virtual void SAL_CALL setPropertyValue(const OUString& rPropertyName, const css::uno::Any& rValue) override + { + if (rPropertyName == "ParentWindow") + { + css::uno::Reference<css::awt::XWindow> xWindow; + rValue >>= xWindow; + m_pImpl->SetParentWindow(xWindow); + return; + } + throw css::beans::UnknownPropertyException(); + } + + virtual css::uno::Any SAL_CALL getPropertyValue(const OUString& rPropertyName) override + { + if (rPropertyName == "ParentWindow") + { + return uno::Any(m_pImpl->GetParentWindow()); + } + throw css::beans::UnknownPropertyException(); + } }; UUIInteractionHandler::UUIInteractionHandler( |