summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorFrank Schönheit <fs@openoffice.org>2001-09-14 08:56:05 +0000
committerFrank Schönheit <fs@openoffice.org>2001-09-14 08:56:05 +0000
commit0eccc6a6747e0a31a6762cf7ddda48789aba4bf1 (patch)
tree7354658668958a86bf23a87d117e0c8373d29c51 /extensions
parentce1d46c10fdab1284097f35b2d6a9df1bb8a78bf (diff)
#91062# support the XJob interface
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/abpilot/unodialogabp.cxx61
-rw-r--r--extensions/source/abpilot/unodialogabp.hxx24
2 files changed, 79 insertions, 6 deletions
diff --git a/extensions/source/abpilot/unodialogabp.cxx b/extensions/source/abpilot/unodialogabp.cxx
index d9de274d1b8f..f124f863cc6b 100644
--- a/extensions/source/abpilot/unodialogabp.cxx
+++ b/extensions/source/abpilot/unodialogabp.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unodialogabp.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: fs $ $Date: 2001-08-01 11:10:07 $
+ * last change: $Author: fs $ $Date: 2001-09-14 09:56:05 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -68,6 +68,9 @@
#ifndef EXTENSIONS_ABSPILOT_HXX
#include "abspilot.hxx"
#endif
+#ifndef _COMPHELPER_SEQUENCE_HXX_
+#include <comphelper/sequence.hxx>
+#endif
extern "C" void SAL_CALL createRegistryInfo_OABSPilotUno()
{
@@ -82,6 +85,7 @@ namespace abp
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans;
+ using namespace ::com::sun::star::ui::dialogs;
//=====================================================================
//= OABSPilotUno
@@ -92,11 +96,48 @@ namespace abp
{
}
+ //--------------------------------------------------------------------------
+ Any SAL_CALL OABSPilotUno::queryInterface( const Type& aType ) throw (RuntimeException)
+ {
+ Any aReturn = OABSPilotUno_DBase::queryInterface( aType );
+ return aReturn.hasValue() ? aReturn : OABSPilotUno_JBase::queryInterface( aType );
+ }
+
+ //--------------------------------------------------------------------------
+ void SAL_CALL OABSPilotUno::acquire( ) throw ()
+ {
+ OABSPilotUno_DBase::acquire();
+ }
+
+ //--------------------------------------------------------------------------
+ void SAL_CALL OABSPilotUno::release( ) throw ()
+ {
+ OABSPilotUno_DBase::release();
+ }
+
+ //---------------------------------------------------------------------
+ Sequence< Type > SAL_CALL OABSPilotUno::getTypes( ) throw (RuntimeException)
+ {
+ return ::comphelper::concatSequences(
+ OABSPilotUno_DBase::getTypes(),
+ OABSPilotUno_JBase::getTypes()
+ );
+ }
+
//---------------------------------------------------------------------
Sequence<sal_Int8> SAL_CALL OABSPilotUno::getImplementationId( ) throw(RuntimeException)
{
- static ::cppu::OImplementationId aId;
- return aId.getImplementationId();
+ static ::cppu::OImplementationId* s_pId;
+ if ( !s_pId )
+ {
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+ if ( !s_pId )
+ {
+ static ::cppu::OImplementationId s_aId;
+ s_pId = &s_aId;
+ }
+ }
+ return s_pId->getImplementationId();
}
//---------------------------------------------------------------------
@@ -158,6 +199,15 @@ namespace abp
return new OAddessBookSourcePilot(_pParent, m_xORB);
}
+ //--------------------------------------------------------------------------
+ void SAL_CALL OABSPilotUno::execute( const Reference< XInterface >& xContext, const Sequence< NamedValue >& aArgs ) throw (IllegalArgumentException, RuntimeException)
+ {
+ // not interested in the context, not interested in the args
+ // -> call the execute method of the XExecutableDialog
+
+ static_cast< XExecutableDialog* >( this )->execute();
+ }
+
//.........................................................................
} // namespace abp
//.........................................................................
@@ -165,6 +215,9 @@ namespace abp
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.1 2001/08/01 11:10:07 fs
+ * initial checkin - address book auto pilot - uno wrapper for the pilot
+ *
* Revision 1.1 2001/02/12 07:16:13 fs
* initial checkin - importing StarOffice 5.2 database files
*
diff --git a/extensions/source/abpilot/unodialogabp.hxx b/extensions/source/abpilot/unodialogabp.hxx
index c877c2d4bb1a..67b63be60918 100644
--- a/extensions/source/abpilot/unodialogabp.hxx
+++ b/extensions/source/abpilot/unodialogabp.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unodialogabp.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: fs $ $Date: 2001-08-01 11:10:14 $
+ * last change: $Author: fs $ $Date: 2001-09-14 09:56:05 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -71,6 +71,12 @@
#ifndef _EXTENSIONS_COMPONENT_MODULE_HXX_
#include "componentmodule.hxx"
#endif
+#ifndef _COM_SUN_STAR_TASK_XJOB_HPP_
+#include <com/sun/star/task/XJob.hpp>
+#endif
+#ifndef _CPPUHELPER_IMPLBASE1_HXX_
+#include <cppuhelper/implbase1.hxx>
+#endif
//.........................................................................
namespace abp
@@ -82,17 +88,25 @@ namespace abp
//=====================================================================
class OABSPilotUno;
typedef ::svt::OGenericUnoDialog OABSPilotUno_DBase;
+ typedef ::cppu::ImplHelper1< ::com::sun::star::task::XJob > OABSPilotUno_JBase;
typedef ::comphelper::OPropertyArrayUsageHelper< OABSPilotUno > OABSPilotUno_PBase;
/// the UNO wrapper for the address book source pilot
class OABSPilotUno
:public OABSPilotUno_DBase
+ ,public OABSPilotUno_JBase
,public OABSPilotUno_PBase
,public OModuleResourceClient
{
OABSPilotUno(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
public:
+ // XInterface (disambiguation)
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire( ) throw ();
+ virtual void SAL_CALL release( ) throw ();
+
// XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
// XServiceInfo
@@ -112,6 +126,9 @@ namespace abp
// OPropertyArrayUsageHelper
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
+ // XJob
+ virtual void SAL_CALL execute( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xContext, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aArgs ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
+
protected:
// OGenericUnoDialog overridables
virtual Dialog* createDialog(Window* _pParent);
@@ -126,6 +143,9 @@ namespace abp
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.1 2001/08/01 11:10:14 fs
+ * initial checkin - address book auto pilot - uno wrapper for the pilot
+ *
* Revision 1.1 2001/02/12 07:16:22 fs
* initial checkin - importing StarOffice 5.2 database files
*