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