summaryrefslogtreecommitdiff
path: root/comphelper
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-10-02 15:03:12 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-10-04 14:42:52 +0200
commitc25cb8a641723ab098980bb842caf75c0dc9b059 (patch)
treee264e2727309789e06147a7275b91abd05f9fcff /comphelper
parent0f3f9cb63056715845d9c3565bde69470c73efb2 (diff)
fdo#46808, Adapt task::InteractionHandler UNO service to new style
Since we don't need to expose XInitialisation, we can make the new-style service implement XInteractionHandler2. Change-Id: Ib27beed1c12df17592c6472d6f58c233d2c41558
Diffstat (limited to 'comphelper')
-rw-r--r--comphelper/inc/comphelper/ihwrapnofilter.hxx15
-rw-r--r--comphelper/source/misc/ihwrapnofilter.cxx20
2 files changed, 31 insertions, 4 deletions
diff --git a/comphelper/inc/comphelper/ihwrapnofilter.hxx b/comphelper/inc/comphelper/ihwrapnofilter.hxx
index 539e41ef5921..2ac1ac93d761 100644
--- a/comphelper/inc/comphelper/ihwrapnofilter.hxx
+++ b/comphelper/inc/comphelper/ihwrapnofilter.hxx
@@ -20,6 +20,7 @@
#ifndef _COMPHELPER_INTERACTIONHANDLERWRAPPER_HXX_
#define _COMPHELPER_INTERACTIONHANDLERWRAPPER_HXX_
+#include <com/sun/star/task/XInteractionHandler2.hpp>
#ifndef _COM_SUN_STAR_TASK_XINTERACTIONHANDLER_
#include <com/sun/star/task/XInteractionHandler.hpp>
#endif
@@ -36,14 +37,13 @@
#include <com/sun/star/frame/DoubleInitializationException.hpp>
#endif
-#include <cppuhelper/implbase3.hxx>
+#include <cppuhelper/implbase2.hxx>
#include "comphelper/comphelperdllapi.h"
namespace comphelper {
- class COMPHELPER_DLLPUBLIC OIHWrapNoFilterDialog : public ::cppu::WeakImplHelper3
- < ::com::sun::star::task::XInteractionHandler
- , ::com::sun::star::lang::XInitialization
+ class COMPHELPER_DLLPUBLIC OIHWrapNoFilterDialog : public ::cppu::WeakImplHelper2
+ < ::com::sun::star::task::XInteractionHandler2
, ::com::sun::star::lang::XServiceInfo >
{
com::sun::star::uno::Reference< com::sun::star::task::XInteractionHandler > m_xInter;
@@ -64,6 +64,13 @@ namespace comphelper {
throw( com::sun::star::uno::RuntimeException );
//____________________________________________________________________________________________________
+ // XInteractionHandler2
+ //____________________________________________________________________________________________________
+
+ virtual sal_Bool SAL_CALL handleInteractionRequest( const com::sun::star::uno::Reference< com::sun::star::task::XInteractionRequest >& xRequest)
+ throw( com::sun::star::uno::RuntimeException );
+
+ //____________________________________________________________________________________________________
// XInitialization
//____________________________________________________________________________________________________
diff --git a/comphelper/source/misc/ihwrapnofilter.cxx b/comphelper/source/misc/ihwrapnofilter.cxx
index 238a2d5fb1c5..57c55d8dfde3 100644
--- a/comphelper/source/misc/ihwrapnofilter.cxx
+++ b/comphelper/source/misc/ihwrapnofilter.cxx
@@ -69,6 +69,26 @@ namespace comphelper
}
//----------------------------------------------------------------------------------------------------
+ // XInteractionHandler2
+ //----------------------------------------------------------------------------------------------------
+ sal_Bool SAL_CALL OIHWrapNoFilterDialog::handleInteractionRequest( const uno::Reference< task::XInteractionRequest >& xRequest)
+ throw( com::sun::star::uno::RuntimeException )
+ {
+ if( !m_xInter.is() )
+ return sal_False;
+
+ uno::Any aRequest = xRequest->getRequest();
+ document::NoSuchFilterRequest aNoSuchFilterRequest;
+ if ( aRequest >>= aNoSuchFilterRequest )
+ return sal_False;
+ else
+ {
+ m_xInter->handle( xRequest );
+ return sal_True;
+ }
+ }
+
+ //----------------------------------------------------------------------------------------------------
// XInitialization
//----------------------------------------------------------------------------------------------------
void SAL_CALL OIHWrapNoFilterDialog::initialize( const uno::Sequence< uno::Any >& )