xref: /trunk/main/dbaccess/inc/genericcontroller.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef DBAUI_GENERICCONTROLLER_HXX
29 #define DBAUI_GENERICCONTROLLER_HXX
30 
31 #include "AsyncronousLink.hxx"
32 #include "controllerframe.hxx"
33 #include "dbaccessdllapi.h"
34 #include "IController.hxx"
35 
36 /** === begin UNO includes === **/
37 #include <com/sun/star/container/XNameAccess.hpp>
38 #include <com/sun/star/frame/CommandGroup.hpp>
39 #include <com/sun/star/frame/XController2.hpp>
40 #include <com/sun/star/frame/XDispatch.hpp>
41 #include <com/sun/star/frame/XDispatchInformationProvider.hpp>
42 #include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
43 #include <com/sun/star/frame/XFrameActionListener.hpp>
44 #include <com/sun/star/frame/XTitle.hpp>
45 #include <com/sun/star/frame/XTitleChangeBroadcaster.hpp>
46 #include <com/sun/star/frame/XLayoutManager.hpp>
47 #include <com/sun/star/lang/XInitialization.hpp>
48 #include <com/sun/star/lang/XServiceInfo.hpp>
49 #include <com/sun/star/sdbc/XConnection.hpp>
50 #include <com/sun/star/sdbc/XDataSource.hpp>
51 #include <com/sun/star/uno/XComponentContext.hpp>
52 #include <com/sun/star/util/XModifyListener.hpp>
53 #include <com/sun/star/util/XURLTransformer.hpp>
54 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
55 #include <com/sun/star/awt/XUserInputInterception.hpp>
56 /** === end UNO includes === **/
57 
58 #include <comphelper/broadcasthelper.hxx>
59 #include <comphelper/sharedmutex.hxx>
60 #include <comphelper/namedvaluecollection.hxx>
61 #include <comphelper/stl_types.hxx>
62 #include <connectivity/dbexception.hxx>
63 #include <cppuhelper/compbase11.hxx>
64 #include <cppuhelper/interfacecontainer.h>
65 
66 #include <boost/optional.hpp>
67 #include <sfx2/userinputinterception.hxx>
68 
69 namespace dbtools
70 {
71     class SQLExceptionInfo;
72 }
73 
74 class Window;
75 class VCLXWindow;
76 namespace dbaui
77 {
78     class ODataView;
79 
80     // ====================================================================
81     // = optional
82     // ====================================================================
83     /** convenience wrapper around boost::optional, allowing typed assignments
84     */
85     template < typename T >
86     class optional : public ::boost::optional< T >
87     {
88         typedef ::boost::optional< T >  base_type;
89 
90     public:
91                  optional ( ) : base_type( ) { }
92         explicit optional ( T const& val ) : base_type( val ) { }
93                  optional ( optional const& rhs ) : base_type( (base_type const&)rhs ) { }
94 
95     public:
96         optional& operator= ( T const& rhs )
97         {
98             base_type::reset( rhs );
99             return *this;
100         }
101         optional& operator= ( optional< T > const& rhs )
102         {
103             if ( rhs.is_initialized() )
104                 base_type::reset( rhs.get() );
105             else
106                 base_type::reset();
107             return *this;
108         }
109     };
110 
111     template< typename T >
112     inline bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & _any, optional< T >& _value )
113     {
114         _value.reset();  // de-init the optional value
115 
116         T directValue = T();
117         if ( _any >>= directValue )
118             _value.reset( directValue );
119 
120         return !!_value;
121     }
122 
123     // ====================================================================
124     // = FeatureState
125     // ====================================================================
126     /** describes the state of a feature
127 
128         In opposite to the FeatureStateEvent in css.frame, this one allows for multiple states to be specified at once.
129         With this, you can for instance specify that a toolbox item is checked, and has a certain title, at the same
130         time.
131     */
132     struct FeatureState
133     {
134         sal_Bool                    bEnabled;
135 
136         optional< bool >            bChecked;
137         optional< bool >            bInvisible;
138         ::com::sun::star::uno::Any  aValue;
139         optional< ::rtl::OUString > sTitle;
140 
141         FeatureState() : bEnabled(sal_False) { }
142     };
143 
144     // ====================================================================
145     // = helper
146     // ====================================================================
147 
148     // ....................................................................
149     struct ControllerFeature : public ::com::sun::star::frame::DispatchInformation
150     {
151         sal_uInt16 nFeatureId;
152     };
153 
154     // ....................................................................
155     typedef ::std::map  <   ::rtl::OUString
156                         ,   ControllerFeature
157                         ,   ::std::less< ::rtl::OUString >
158                         >   SupportedFeatures;
159 
160     // ....................................................................
161     struct CompareFeatureById : ::std::binary_function< SupportedFeatures::value_type, sal_Int32, bool >
162     {
163         // ................................................................
164         inline bool operator()( const SupportedFeatures::value_type& _aType, const sal_Int32& _nId ) const
165         {
166             return !!( _nId == _aType.second.nFeatureId );
167         }
168     };
169 
170     // ....................................................................
171     struct FeatureListener
172     {
173         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >
174                     xListener;
175         sal_Int32   nId;
176         sal_Bool    bForceBroadcast;
177     };
178 
179     // ....................................................................
180     typedef ::std::deque< FeatureListener > FeatureListeners;
181 
182     // ....................................................................
183     struct FindFeatureListener : ::std::binary_function< FeatureListener, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >, bool >
184     {
185         // ................................................................
186         inline bool operator()( const FeatureListener& lhs, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& rhs ) const
187         {
188             return !!( lhs.xListener == rhs );
189         }
190     };
191 
192     // ....................................................................
193     typedef ::comphelper::SharedMutexBase   OGenericUnoController_MBASE;
194 
195     typedef ::cppu::WeakComponentImplHelper11   <   ::com::sun::star::frame::XDispatch
196                                                 ,   ::com::sun::star::frame::XDispatchProviderInterceptor
197                                                 ,   ::com::sun::star::util::XModifyListener
198                                                 ,   ::com::sun::star::frame::XFrameActionListener
199                                                 ,   ::com::sun::star::lang::XInitialization
200                                                 ,   ::com::sun::star::lang::XServiceInfo
201                                                 ,   ::com::sun::star::frame::XDispatchInformationProvider
202                                                 ,   ::com::sun::star::frame::XController2
203                                                 ,   ::com::sun::star::frame::XTitle
204                                                 ,   ::com::sun::star::frame::XTitleChangeBroadcaster
205                                                 ,   ::com::sun::star::awt::XUserInputInterception
206                                                 >   OGenericUnoController_Base;
207 
208     struct OGenericUnoController_Data;
209     // ====================================================================
210     class DBACCESS_DLLPUBLIC OGenericUnoController
211                                 :public OGenericUnoController_MBASE
212                                 ,public OGenericUnoController_Base
213                                 ,public IController
214     {
215     private:
216         SupportedFeatures               m_aSupportedFeatures;
217         ::comphelper::NamedValueCollection
218                                         m_aInitParameters;
219 
220         ::std::auto_ptr< OGenericUnoController_Data >
221                                         m_pData;
222         ODataView*                      m_pView;                // our (VCL) "main window"
223 
224 #ifdef DBG_UTIL
225         bool                            m_bDescribingSupportedFeatures;
226 #endif
227 
228     protected:
229         // ----------------------------------------------------------------
230         // attributes
231         struct DispatchTarget
232         {
233             ::com::sun::star::util::URL                 aURL;
234             ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >    xListener;
235 
236             DispatchTarget() { }
237             DispatchTarget(const ::com::sun::star::util::URL& rURL, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >  xRef) : aURL(rURL), xListener(xRef) { }
238         };
239 
240         DECLARE_STL_MAP( sal_uInt16, FeatureState, ::std::less< sal_uInt16 >, StateCache );
241         DECLARE_STL_VECTOR( DispatchTarget, Dispatch);
242 
243         FeatureListeners        m_aFeaturesToInvalidate;
244 
245         ::osl::Mutex            m_aFeatureMutex;        // locked when features are append to or remove from deque
246         StateCache              m_aStateCache;          // save the current status of feature state
247         Dispatch                m_arrStatusListener;    // all our listeners where we dispatch status changes
248         OAsyncronousLink        m_aAsyncInvalidateAll;
249         OAsyncronousLink        m_aAsyncCloseTask;      // called when a task shoud be closed
250 
251         ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer >         m_xUrlTransformer;      // needed sometimes
252         ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >    m_xServiceFactory;
253         ControllerFrame                                                                     m_aCurrentFrame;
254         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >      m_xSlaveDispatcher;     // for intercepting dispatches
255         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >      m_xMasterDispatcher;    // dito
256         ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess >        m_xDatabaseContext;
257         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTitle >                 m_xTitleHelper;
258 
259         sal_Bool                m_bPreview;
260         sal_Bool                m_bReadOnly;
261 
262         sal_Bool                m_bCurrentlyModified    : 1;
263         sal_Bool                m_bExternalTitle : 1;
264 
265 
266 
267         // ----------------------------------------------------------------
268         // attribute access
269         ::osl::Mutex&               getMutex() const            { return OGenericUnoController_MBASE::getMutex(); }
270         ::cppu::OBroadcastHelper&   getBroadcastHelper()        { return OGenericUnoController_Base::rBHelper; }
271 
272         // ----------------------------------------------------------------
273         // methods
274         OGenericUnoController( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rM );
275         const ::comphelper::NamedValueCollection&
276                                     getInitParams() const   { return m_aInitParameters; }
277 
278 
279         /** open the help agent for the given help id.
280             @param  _nHelpId
281                 The help id to dispatch.
282         */
283         void openHelpAgent( const rtl::OString& _sHelpId );
284 
285         /** open the help agent for the given help url.
286             @param  _pHelpStringURL
287                 The help url to dispatch.
288         */
289         void openHelpAgent( const rtl::OUString& _suHelpStringURL );
290 
291         /** opens the given Help URL in the help agent
292 
293             The URL does not need to be parsed already, it is passed through
294             XURLTransformer::parseStrict before it is used.
295         */
296         void openHelpAgent( const ::com::sun::star::util::URL& _rURL );
297 
298         // closes the task when possible
299         void closeTask();
300 
301         // if getMenu returns a non empty string than this will be dispatched at the frame
302         virtual void            loadMenu(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame);
303 
304         /** called when our menu has been loaded into our frame, can be used to load sub toolbars
305 
306             @param _xLayoutManager
307                 The layout manager.
308         */
309         virtual void            onLoadedMenu(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager >& _xLayoutManager);
310 
311         // all the features which should be handled by this class
312         virtual void            describeSupportedFeatures();
313 
314         // state of a feature. 'feature' may be the handle of a ::com::sun::star::util::URL somebody requested a dispatch interface for OR a toolbar slot.
315         virtual FeatureState    GetState(sal_uInt16 nId) const;
316         // execute a feature
317         virtual void            Execute(sal_uInt16 nId , const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
318 
319         /** describes a feature supported by the controller
320 
321             Must not be called outside <member>describeSupportedFeatures</member>.
322 
323             @param _pAsciiCommandURL
324                 the URL of the feature command
325             @param _nFeatureId
326                 the id of the feature. Later references to this feature usually happen by id, not by
327                 URL
328             @param _nCommandGroup
329                 the command group of the feature. This is important for configuring the controller UI
330                 by the user, see also <type scope="com::sun::star::frame">CommandGroup</type>.
331         */
332         void    implDescribeSupportedFeature(
333                     const sal_Char* _pAsciiCommandURL,
334                     sal_uInt16 _nFeatureId,
335                     sal_Int16 _nCommandGroup = ::com::sun::star::frame::CommandGroup::INTERNAL
336                 );
337 
338         /** returns <TRUE/> if the feature is supported, otherwise <FALSE/>
339             @param  _nId
340                 The ID of the feature.
341         */
342         sal_Bool isFeatureSupported( sal_Int32 _nId );
343 
344         // gets the URL which the given id is assigned to
345         ::com::sun::star::util::URL getURLForId(sal_Int32 _nId) const;
346 
347         /** determines whether the given feature ID denotes a user-defined feature
348 
349             @see IController::registerCommandURL
350         */
351         bool    isUserDefinedFeature( const sal_uInt16 nFeatureId ) const;
352 
353         /** determines whether the given feature URL denotes a user-defined feature
354 
355             @see IController::registerCommandURL
356         */
357         bool    isUserDefinedFeature( const ::rtl::OUString& _rFeatureURL ) const;
358 
359         // connect to a datasource
360         ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > connect(
361             const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource>& _xDataSource,
362             ::dbtools::SQLExceptionInfo* _pErrorInfo
363         );
364 
365         // connect to a datasource
366         ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > connect(
367             const ::rtl::OUString& _rsDataSourceName,
368             const ::rtl::OUString& _rContextInformation,
369             ::dbtools::SQLExceptionInfo* _pErrorInfo
370         );
371 
372         void startConnectionListening(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection);
373         void stopConnectionListening(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection);
374 
375         /** return the container window of the top most frame
376             @return
377                 The top most container window, nmay be <NULL/>.
378         */
379         ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow> getTopMostContainerWindow() const;
380 
381         // XInitialize will be called inside initialize
382         virtual void impl_initialize();
383 
384         virtual ::rtl::OUString getPrivateTitle() const { return ::rtl::OUString(); }
385 
386         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTitle > impl_getTitleHelper_throw();
387         virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > getPrivateModel() const
388         {
389             return ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >();
390         }
391 
392         virtual void    startFrameListening( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame );
393         virtual void    stopFrameListening( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame );
394 
395         void releaseNumberForComponent();
396 
397         virtual ~OGenericUnoController();
398 
399     private:
400         void fillSupportedFeatures();
401 
402         void InvalidateAll_Impl();
403         void InvalidateFeature_Impl();
404 
405         void ImplInvalidateFeature( sal_Int32 _nId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& _xListener, sal_Bool _bForceBroadcast );
406 
407         sal_Bool ImplInvalidateTBItem(sal_uInt16 nId, const FeatureState& rState);
408         void ImplBroadcastFeatureState(const ::rtl::OUString& _rFeature, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xListener, sal_Bool _bIgnoreCache);
409 
410         // link methods
411         DECL_LINK(OnAsyncInvalidateAll, void*);
412         DECL_LINK(OnAsyncCloseTask, void*);
413 
414     public:
415         ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >  getORB() const { return m_xServiceFactory; }
416         ODataView*  getView() const { return m_pView; }
417         void        setView( ODataView& i_rView ) { m_pView = &i_rView; }
418         void        clearView() { m_pView = NULL; }
419         // shows a error box if the SQLExceptionInfo is valid
420         void showError(const ::dbtools::SQLExceptionInfo& _rInfo);
421 
422         // if xListener is NULL the change will be forwarded to all listeners to the given ::com::sun::star::util::URL
423         // if _bForceBroadcast is sal_True, the current feature state is broadcasted no matter if it is the same as the cached state
424         virtual void InvalidateFeature(const ::rtl::OUString& rURLPath, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xListener = NULL, sal_Bool _bForceBroadcast = sal_False);
425         // if there is an ::com::sun::star::util::URL translation for the id ('handle') the preceding InvalidateFeature is used.
426         // if there is a toolbar slot with the given id it is updated (the new state is determined via GetState)
427         // if _bForceBroadcast is sal_True, the current feature state is broadcasted no matter if it is the same as the cached state
428         virtual void InvalidateFeature(sal_uInt16 nId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xListener = NULL, sal_Bool _bForceBroadcast = sal_False);
429 
430         /** InvalidateAll invalidates all features currently known
431         */
432         virtual void InvalidateAll();
433         // late construction
434         virtual sal_Bool Construct(Window* pParent);
435 
436         /** get the layout manager
437             @param  _xFrame
438                 The frame to ask for the layout manager.
439             @return
440                 The layout manager of the frame, can be <NULL/> if the frame isn't initialized.
441         */
442         ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager > getLayoutManager(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame) const;
443 
444         // IController
445         virtual void executeUnChecked(const ::com::sun::star::util::URL& _rCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
446         virtual void executeChecked(const ::com::sun::star::util::URL& _rCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
447         virtual void executeUnChecked(sal_uInt16 _nCommandId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
448         virtual void executeChecked(sal_uInt16 _nCommandId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
449         virtual sal_Bool isCommandEnabled(sal_uInt16 _nCommandId) const;
450         virtual sal_Bool isCommandEnabled(const ::rtl::OUString& _rCompleteCommandURL) const;
451         virtual sal_uInt16 registerCommandURL( const ::rtl::OUString& _rCompleteCommandURL );
452         virtual void notifyHiContrastChanged();
453         virtual sal_Bool isDataSourceReadOnly() const;
454         virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > getXController() throw( ::com::sun::star::uno::RuntimeException );
455         virtual bool interceptUserInput( const NotifyEvent& _rEvent );
456 
457         // misc
458         virtual sal_Bool isCommandChecked(sal_uInt16 _nCommandId) const;
459 
460         // ::com::sun::star::lang::XEventListener
461         virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException );
462 
463         // ::com::sun::star::util::XModifyListener
464         virtual void SAL_CALL modified(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException );
465 
466         // XInterface
467         virtual void SAL_CALL acquire(  ) throw ();
468         virtual void SAL_CALL release(  ) throw ();
469 
470         // ::com::sun::star::frame::XController2
471         virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL getComponentWindow() throw (::com::sun::star::uno::RuntimeException);
472         virtual ::rtl::OUString SAL_CALL getViewControllerName() throw (::com::sun::star::uno::RuntimeException);
473         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCreationArguments() throw (::com::sun::star::uno::RuntimeException);
474 
475         // ::com::sun::star::frame::XController
476         virtual void SAL_CALL attachFrame(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & xFrame) throw( ::com::sun::star::uno::RuntimeException );
477         virtual sal_Bool SAL_CALL attachModel(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xModel) throw( ::com::sun::star::uno::RuntimeException );
478         virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) throw( ::com::sun::star::uno::RuntimeException ) = 0;
479         virtual ::com::sun::star::uno::Any SAL_CALL getViewData(void) throw( ::com::sun::star::uno::RuntimeException );
480         virtual void SAL_CALL restoreViewData(const ::com::sun::star::uno::Any& Data) throw( ::com::sun::star::uno::RuntimeException );
481         virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >  SAL_CALL getModel(void) throw( ::com::sun::star::uno::RuntimeException );
482         virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >  SAL_CALL getFrame(void) throw( ::com::sun::star::uno::RuntimeException );
483 
484         // ::com::sun::star::frame::XDispatch
485         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);
486         virtual void        SAL_CALL addStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & aListener, const ::com::sun::star::util::URL& aURL) throw(::com::sun::star::uno::RuntimeException);
487         virtual void        SAL_CALL removeStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & aListener, const ::com::sun::star::util::URL& aURL) throw(::com::sun::star::uno::RuntimeException);
488 
489         // ::com::sun::star::frame::XDispatchProviderInterceptor
490         virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >  SAL_CALL getSlaveDispatchProvider(void) throw(::com::sun::star::uno::RuntimeException);
491         virtual void SAL_CALL setSlaveDispatchProvider(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > & _xNewProvider) throw(::com::sun::star::uno::RuntimeException);
492         virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider >  SAL_CALL getMasterDispatchProvider(void) throw(::com::sun::star::uno::RuntimeException);
493         virtual void SAL_CALL setMasterDispatchProvider(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > & _xNewProvider) throw(::com::sun::star::uno::RuntimeException);
494 
495         // ::com::sun::star::frame::XDispatchProvider
496         virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >  SAL_CALL queryDispatch(const ::com::sun::star::util::URL& aURL, const ::rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( ::com::sun::star::uno::RuntimeException );
497         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch >  > SAL_CALL queryDispatches(const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& aDescripts) throw( ::com::sun::star::uno::RuntimeException );
498 
499         // ::com::sun::star::lang::XComponent
500         virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException); //LLA: need solar mutex {OGenericUnoController_COMPBASE::dispose(); }
501         virtual void SAL_CALL disposing();
502         virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw(::com::sun::star::uno::RuntimeException);
503         virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw(::com::sun::star::uno::RuntimeException);
504 
505         // ::com::sun::star::frame::XFrameActionListener
506         virtual void        SAL_CALL frameAction(const ::com::sun::star::frame::FrameActionEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException );
507         // lang::XInitialization
508         virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
509 
510         // XServiceInfo
511         virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException) = 0;
512         virtual sal_Bool SAL_CALL supportsService(const ::rtl::OUString& ServiceName) throw(::com::sun::star::uno::RuntimeException);
513         virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException) = 0;
514 
515         // XDispatchInformationProvider
516         virtual ::com::sun::star::uno::Sequence< ::sal_Int16 > SAL_CALL getSupportedCommandGroups() throw (::com::sun::star::uno::RuntimeException);
517         virtual ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchInformation > SAL_CALL getConfigurableDispatchInformation( ::sal_Int16 ) throw (::com::sun::star::uno::RuntimeException);
518 
519         // XTitle
520         virtual ::rtl::OUString SAL_CALL getTitle(  ) throw (::com::sun::star::uno::RuntimeException);
521         virtual void SAL_CALL setTitle( const ::rtl::OUString& sTitle ) throw (::com::sun::star::uno::RuntimeException);
522 
523         // XTitleChangeBroadcaster
524         virtual void SAL_CALL addTitleChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTitleChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
525         virtual void SAL_CALL removeTitleChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTitleChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
526 
527         // XUserInputInterception
528         virtual void SAL_CALL addKeyHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException);
529         virtual void SAL_CALL removeKeyHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException);
530         virtual void SAL_CALL addMouseClickHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseClickHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException);
531         virtual void SAL_CALL removeMouseClickHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseClickHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException);
532 
533     protected:
534 #ifdef WNT
535         OGenericUnoController();    // never implemented
536 #endif
537     };
538 }
539 
540 #endif //DBAUI_GENERICCONTROLLER_HXX
541 
542 
543