001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036 #ifndef _SW_UNOMODULE_HXX
037 #define _SW_UNOMODULE_HXX
038
039 #ifndef _RTL_USTRING_HXX_
040 #include <rtl/ustring.hxx>
041 #endif
042
043 #ifndef _COM_SUN_STAR_FRAME_XDISPATCHPROVIDER_HPP_
044 #include <com/sun/star/frame/XDispatchProvider.hpp>
045 #endif
046
047 #ifndef _COM_SUN_STAR_FRAME_XNOTIFYINGDISPATCH_HPP_
048 #include <com/sun/star/frame/XNotifyingDispatch.hpp>
049 #endif
050
051 #ifndef _COM_SUN_STAR_UNO_RUNTIMEEXCEPTION_HPP_
052 #include <com/sun/star/uno/RuntimeException.hpp>
053 #endif
054
055 #ifndef _COM_SUN_STAR_FRAME_DISPATCHDESCRIPTOR_HPP_
056 #include <com/sun/star/frame/DispatchDescriptor.hpp>
057 #endif
058
059 #ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
060 #include <com/sun/star/uno/Reference.h>
061 #endif
062
063 #ifndef _CPPUHELPER_IMPLBASE3_HXX_
064 #include <cppuhelper/implbase3.hxx>
065 #endif
066
067 #include <com/sun/star/lang/XServiceInfo.hpp>
068
069 namespace com
070 {
071 namespace sun
072 {
073 namespace star
074 {
075 namespace lang
076 {
077 class XMultiServiceFactory;
078 }
079 namespace beans
080 {
081 struct PropertyValue;
082 }
083 }
084 }
085 }
086
087 #define REFERENCE ::com::sun::star::uno::Reference
088 #define SEQUENCE ::com::sun::star::uno::Sequence
089 #define RUNTIMEEXCEPTION ::com::sun::star::uno::RuntimeException
090 #define REFERENCE ::com::sun::star::uno::Reference
091 #define SEQUENCE ::com::sun::star::uno::Sequence
092 #define XDISPATCH ::com::sun::star::frame::XDispatch
093 #define XNOTIFYINGDISPATCH ::com::sun::star::frame::XNotifyingDispatch
094 #define OUSTRING ::rtl::OUString
095 #define UNOURL ::com::sun::star::util::URL
096 #define DISPATCHDESCRIPTOR ::com::sun::star::frame::DispatchDescriptor
097
098 class SwUnoModule : public ::cppu::WeakImplHelper3< ::com::sun::star::frame::XDispatchProvider, ::com::sun::star::frame::XNotifyingDispatch, ::com::sun::star::lang::XServiceInfo >
099 {
100 REFERENCE < ::com::sun::star::lang::XMultiServiceFactory > m_xFactory;
101
102 public:
103 SwUnoModule( const REFERENCE < ::com::sun::star::lang::XMultiServiceFactory >& xFactory )
104 : m_xFactory( xFactory )
105 {}
106
107
108 virtual void SAL_CALL dispatchWithNotification( const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchResultListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
109
110
111 virtual void SAL_CALL dispatch( const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aArgs ) throw( ::com::sun::star::uno::RuntimeException );
112 virtual void SAL_CALL addStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xControl, const ::com::sun::star::util::URL& aURL) throw( ::com::sun::star::uno::RuntimeException );
113 virtual void SAL_CALL removeStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xControl, const ::com::sun::star::util::URL& aURL) throw( ::com::sun::star::uno::RuntimeException );
114
115
116 virtual SEQUENCE< REFERENCE< XDISPATCH > > SAL_CALL queryDispatches( const SEQUENCE< DISPATCHDESCRIPTOR >& seqDescriptor ) throw( RUNTIMEEXCEPTION ) ;
117 virtual REFERENCE< XDISPATCH > SAL_CALL queryDispatch( const UNOURL & aURL ,
118 const OUSTRING & sTargetFrameName,
119 sal_Int32 eSearchFlags ) throw( RUNTIMEEXCEPTION ) ;
120
121 virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
122 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
123 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
124 };
125
126 #endif