update credits
[LibreOffice.git] / include / dbaccess / genericcontroller.hxx
blob6a7fd7f4bc2c2b67e9e16b2ca7b028b14af15370
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef DBAUI_GENERICCONTROLLER_HXX
21 #define DBAUI_GENERICCONTROLLER_HXX
23 #include "AsyncronousLink.hxx"
24 #include "controllerframe.hxx"
25 #include "dbaccessdllapi.h"
26 #include "IController.hxx"
28 #include <com/sun/star/frame/CommandGroup.hpp>
29 #include <com/sun/star/frame/XController2.hpp>
30 #include <com/sun/star/frame/XDispatch.hpp>
31 #include <com/sun/star/frame/XDispatchInformationProvider.hpp>
32 #include <com/sun/star/frame/XDispatchProviderInterceptor.hpp>
33 #include <com/sun/star/frame/XFrameActionListener.hpp>
34 #include <com/sun/star/frame/XTitle.hpp>
35 #include <com/sun/star/frame/XTitleChangeBroadcaster.hpp>
36 #include <com/sun/star/frame/XLayoutManager.hpp>
37 #include <com/sun/star/lang/XInitialization.hpp>
38 #include <com/sun/star/lang/XServiceInfo.hpp>
39 #include <com/sun/star/sdb/XDatabaseContext.hpp>
40 #include <com/sun/star/sdbc/XConnection.hpp>
41 #include <com/sun/star/sdbc/XDataSource.hpp>
42 #include <com/sun/star/uno/XComponentContext.hpp>
43 #include <com/sun/star/util/XModifyListener.hpp>
44 #include <com/sun/star/util/XURLTransformer.hpp>
45 #include <com/sun/star/awt/XUserInputInterception.hpp>
47 #include <comphelper/broadcasthelper.hxx>
48 #include <comphelper/sharedmutex.hxx>
49 #include <comphelper/namedvaluecollection.hxx>
50 #include <comphelper/stl_types.hxx>
51 #include <connectivity/dbexception.hxx>
52 #include <cppuhelper/compbase11.hxx>
53 #include <cppuhelper/interfacecontainer.h>
55 #include <boost/optional.hpp>
56 #include <sfx2/userinputinterception.hxx>
58 namespace dbtools
60 class SQLExceptionInfo;
63 class Window;
64 namespace dbaui
66 class ODataView;
68 // ====================================================================
69 // = optional
70 // ====================================================================
71 /** convenience wrapper around boost::optional, allowing typed assignments
73 template < typename T >
74 class optional : public ::boost::optional< T >
76 typedef ::boost::optional< T > base_type;
78 public:
79 optional ( ) : base_type( ) { }
80 explicit optional ( T const& val ) : base_type( val ) { }
81 optional ( optional const& rhs ) : base_type( (base_type const&)rhs ) { }
83 public:
84 optional& operator= ( T const& rhs )
86 base_type::reset( rhs );
87 return *this;
89 optional& operator= ( optional< T > const& rhs )
91 if ( rhs.is_initialized() )
92 base_type::reset( rhs.get() );
93 else
94 base_type::reset();
95 return *this;
99 template< typename T >
100 inline bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & _any, optional< T >& _value )
102 _value.reset(); // de-init the optional value
104 T directValue = T();
105 if ( _any >>= directValue )
106 _value.reset( directValue );
108 return !!_value;
111 // ====================================================================
112 // = FeatureState
113 // ====================================================================
114 /** describes the state of a feature
116 In opposite to the FeatureStateEvent in css.frame, this one allows for multiple states to be specified at once.
117 With this, you can for instance specify that a toolbox item is checked, and has a certain title, at the same
118 time.
120 struct FeatureState
122 sal_Bool bEnabled;
124 optional< bool > bChecked;
125 optional< bool > bInvisible;
126 ::com::sun::star::uno::Any aValue;
127 optional< OUString > sTitle;
129 FeatureState() : bEnabled(sal_False) { }
132 // ====================================================================
133 // = helper
134 // ====================================================================
136 // ....................................................................
137 struct ControllerFeature : public ::com::sun::star::frame::DispatchInformation
139 sal_uInt16 nFeatureId;
142 // ....................................................................
143 typedef ::std::map < OUString
144 , ControllerFeature
145 , ::std::less< OUString >
146 > SupportedFeatures;
148 // ....................................................................
149 struct CompareFeatureById : ::std::binary_function< SupportedFeatures::value_type, sal_Int32, bool >
151 // ................................................................
152 inline bool operator()( const SupportedFeatures::value_type& _aType, const sal_Int32& _nId ) const
154 return !!( _nId == _aType.second.nFeatureId );
158 // ....................................................................
159 struct FeatureListener
161 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >
162 xListener;
163 sal_Int32 nId;
164 sal_Bool bForceBroadcast;
167 // ....................................................................
168 typedef ::std::deque< FeatureListener > FeatureListeners;
170 // ....................................................................
171 struct FindFeatureListener : ::std::binary_function< FeatureListener, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >, bool >
173 // ................................................................
174 inline bool operator()( const FeatureListener& lhs, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& rhs ) const
176 return !!( lhs.xListener == rhs );
180 // ....................................................................
181 typedef ::comphelper::SharedMutexBase OGenericUnoController_MBASE;
183 typedef ::cppu::WeakComponentImplHelper11 < ::com::sun::star::frame::XDispatch
184 , ::com::sun::star::frame::XDispatchProviderInterceptor
185 , ::com::sun::star::util::XModifyListener
186 , ::com::sun::star::frame::XFrameActionListener
187 , ::com::sun::star::lang::XInitialization
188 , ::com::sun::star::lang::XServiceInfo
189 , ::com::sun::star::frame::XDispatchInformationProvider
190 , ::com::sun::star::frame::XController2
191 , ::com::sun::star::frame::XTitle
192 , ::com::sun::star::frame::XTitleChangeBroadcaster
193 , ::com::sun::star::awt::XUserInputInterception
194 > OGenericUnoController_Base;
196 struct OGenericUnoController_Data;
197 // ====================================================================
198 class DBACCESS_DLLPUBLIC OGenericUnoController
199 :public OGenericUnoController_MBASE
200 ,public OGenericUnoController_Base
201 ,public IController
203 private:
204 SupportedFeatures m_aSupportedFeatures;
205 ::comphelper::NamedValueCollection
206 m_aInitParameters;
208 ::std::auto_ptr< OGenericUnoController_Data >
209 m_pData;
210 ODataView* m_pView; // our (VCL) "main window"
212 #ifdef DBG_UTIL
213 bool m_bDescribingSupportedFeatures;
214 #endif
216 protected:
217 // ----------------------------------------------------------------
218 // attributes
219 struct DispatchTarget
221 ::com::sun::star::util::URL aURL;
222 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > xListener;
224 DispatchTarget() { }
225 DispatchTarget(const ::com::sun::star::util::URL& rURL, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > xRef) : aURL(rURL), xListener(xRef) { }
228 DECLARE_STL_MAP( sal_uInt16, FeatureState, ::std::less< sal_uInt16 >, StateCache );
229 DECLARE_STL_VECTOR( DispatchTarget, Dispatch);
231 FeatureListeners m_aFeaturesToInvalidate;
233 ::osl::Mutex m_aFeatureMutex; // locked when features are append to or remove from deque
234 StateCache m_aStateCache; // save the current status of feature state
235 Dispatch m_arrStatusListener; // all our listeners where we dispatch status changes
236 OAsyncronousLink m_aAsyncInvalidateAll;
237 OAsyncronousLink m_aAsyncCloseTask; // called when a task shoud be closed
239 ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xUrlTransformer; // needed sometimes
240 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
241 ControllerFrame m_aCurrentFrame;
242 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > m_xSlaveDispatcher; // for intercepting dispatches
243 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > m_xMasterDispatcher; // dito
244 ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XDatabaseContext > m_xDatabaseContext;
245 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTitle > m_xTitleHelper;
247 sal_Bool m_bPreview;
248 sal_Bool m_bReadOnly;
250 sal_Bool m_bCurrentlyModified : 1;
251 sal_Bool m_bExternalTitle : 1;
255 // ----------------------------------------------------------------
256 // attribute access
257 ::osl::Mutex& getMutex() const { return OGenericUnoController_MBASE::getMutex(); }
258 ::cppu::OBroadcastHelper& getBroadcastHelper() { return OGenericUnoController_Base::rBHelper; }
260 // ----------------------------------------------------------------
261 // methods
262 OGenericUnoController( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rM );
263 const ::comphelper::NamedValueCollection&
264 getInitParams() const { return m_aInitParameters; }
267 /** open the help agent for the given help id.
268 @param _nHelpId
269 The help id to dispatch.
271 void openHelpAgent( const OString& _sHelpId );
273 /** open the help agent for the given help url.
274 @param _pHelpStringURL
275 The help url to dispatch.
277 void openHelpAgent( const OUString& _suHelpStringURL );
279 /** opens the given Help URL in the help agent
281 The URL does not need to be parsed already, it is passed through
282 XURLTransformer::parseStrict before it is used.
284 void openHelpAgent( const ::com::sun::star::util::URL& _rURL );
286 // closes the task when possible
287 void closeTask();
289 // if getMenu returns a non empty string than this will be dispatched at the frame
290 virtual void loadMenu(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame);
292 /** called when our menu has been loaded into our frame, can be used to load sub toolbars
294 @param _xLayoutManager
295 The layout manager.
297 virtual void onLoadedMenu(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager >& _xLayoutManager);
299 // all the features which should be handled by this class
300 virtual void describeSupportedFeatures();
302 // 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.
303 virtual FeatureState GetState(sal_uInt16 nId) const;
304 // execute a feature
305 virtual void Execute(sal_uInt16 nId , const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
307 /** describes a feature supported by the controller
309 Must not be called outside <member>describeSupportedFeatures</member>.
311 @param _pAsciiCommandURL
312 the URL of the feature command
313 @param _nFeatureId
314 the id of the feature. Later references to this feature usually happen by id, not by
316 @param _nCommandGroup
317 the command group of the feature. This is important for configuring the controller UI
318 by the user, see also <type scope="com::sun::star::frame">CommandGroup</type>.
320 void implDescribeSupportedFeature(
321 const sal_Char* _pAsciiCommandURL,
322 sal_uInt16 _nFeatureId,
323 sal_Int16 _nCommandGroup = ::com::sun::star::frame::CommandGroup::INTERNAL
326 /** returns <TRUE/> if the feature is supported, otherwise <FALSE/>
327 @param _nId
328 The ID of the feature.
330 sal_Bool isFeatureSupported( sal_Int32 _nId );
332 // gets the URL which the given id is assigned to
333 ::com::sun::star::util::URL getURLForId(sal_Int32 _nId) const;
335 /** determines whether the given feature ID denotes a user-defined feature
337 @see IController::registerCommandURL
339 bool isUserDefinedFeature( const sal_uInt16 nFeatureId ) const;
341 /** determines whether the given feature URL denotes a user-defined feature
343 @see IController::registerCommandURL
345 bool isUserDefinedFeature( const OUString& _rFeatureURL ) const;
347 // connect to a datasource
348 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > connect(
349 const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource>& _xDataSource,
350 ::dbtools::SQLExceptionInfo* _pErrorInfo
353 // connect to a datasource
354 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > connect(
355 const OUString& _rsDataSourceName,
356 const OUString& _rContextInformation,
357 ::dbtools::SQLExceptionInfo* _pErrorInfo
360 void startConnectionListening(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection);
361 void stopConnectionListening(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection);
363 /** return the container window of the top most frame
364 @return
365 The top most container window, nmay be <NULL/>.
367 ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow> getTopMostContainerWindow() const;
369 // XInitialize will be called inside initialize
370 virtual void impl_initialize();
372 virtual OUString getPrivateTitle() const { return OUString(); }
374 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTitle > impl_getTitleHelper_throw();
375 virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > getPrivateModel() const
377 return ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >();
380 virtual void startFrameListening( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame );
381 virtual void stopFrameListening( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame );
383 void releaseNumberForComponent();
385 virtual ~OGenericUnoController();
387 private:
388 void fillSupportedFeatures();
390 void InvalidateAll_Impl();
391 void InvalidateFeature_Impl();
393 void ImplInvalidateFeature( sal_Int32 _nId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& _xListener, sal_Bool _bForceBroadcast );
395 sal_Bool ImplInvalidateTBItem(sal_uInt16 nId, const FeatureState& rState);
396 void ImplBroadcastFeatureState(const OUString& _rFeature, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xListener, sal_Bool _bIgnoreCache);
398 // link methods
399 DECL_LINK(OnAsyncInvalidateAll, void*);
400 DECL_LINK(OnAsyncCloseTask, void*);
402 public:
403 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > getORB() const { return m_xContext; }
404 ODataView* getView() const { return m_pView; }
405 void setView( ODataView& i_rView ) { m_pView = &i_rView; }
406 void clearView() { m_pView = NULL; }
407 // shows a error box if the SQLExceptionInfo is valid
408 void showError(const ::dbtools::SQLExceptionInfo& _rInfo);
410 // if xListener is NULL the change will be forwarded to all listeners to the given ::com::sun::star::util::URL
411 // if _bForceBroadcast is sal_True, the current feature state is broadcasted no matter if it is the same as the cached state
412 virtual void InvalidateFeature(const OUString& rURLPath, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xListener = NULL, sal_Bool _bForceBroadcast = sal_False);
413 // if there is an ::com::sun::star::util::URL translation for the id ('handle') the preceding InvalidateFeature is used.
414 // if there is a toolbar slot with the given id it is updated (the new state is determined via GetState)
415 // if _bForceBroadcast is sal_True, the current feature state is broadcasted no matter if it is the same as the cached state
416 virtual void InvalidateFeature(sal_uInt16 nId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xListener = NULL, sal_Bool _bForceBroadcast = sal_False);
418 /** InvalidateAll invalidates all features currently known
420 virtual void InvalidateAll();
421 // late construction
422 virtual sal_Bool Construct(Window* pParent);
424 /** get the layout manager
425 @param _xFrame
426 The frame to ask for the layout manager.
427 @return
428 The layout manager of the frame, can be <NULL/> if the frame isn't initialized.
430 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager > getLayoutManager(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame) const;
432 // IController
433 virtual void executeUnChecked(const ::com::sun::star::util::URL& _rCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
434 virtual void executeChecked(const ::com::sun::star::util::URL& _rCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
435 virtual void executeUnChecked(sal_uInt16 _nCommandId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
436 virtual void executeChecked(sal_uInt16 _nCommandId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
437 virtual sal_Bool isCommandEnabled(sal_uInt16 _nCommandId) const;
438 virtual sal_Bool isCommandEnabled(const OUString& _rCompleteCommandURL) const;
439 virtual sal_uInt16 registerCommandURL( const OUString& _rCompleteCommandURL );
440 virtual void notifyHiContrastChanged();
441 virtual sal_Bool isDataSourceReadOnly() const;
442 virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > getXController() throw( ::com::sun::star::uno::RuntimeException );
443 virtual bool interceptUserInput( const NotifyEvent& _rEvent );
445 // misc
446 virtual sal_Bool isCommandChecked(sal_uInt16 _nCommandId) const;
448 // ::com::sun::star::lang::XEventListener
449 virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException );
451 // ::com::sun::star::util::XModifyListener
452 virtual void SAL_CALL modified(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException );
454 // XInterface
455 virtual void SAL_CALL acquire( ) throw ();
456 virtual void SAL_CALL release( ) throw ();
458 // ::com::sun::star::frame::XController2
459 virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL getComponentWindow() throw (::com::sun::star::uno::RuntimeException);
460 virtual OUString SAL_CALL getViewControllerName() throw (::com::sun::star::uno::RuntimeException);
461 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCreationArguments() throw (::com::sun::star::uno::RuntimeException);
463 // ::com::sun::star::frame::XController
464 virtual void SAL_CALL attachFrame(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & xFrame) throw( ::com::sun::star::uno::RuntimeException );
465 virtual sal_Bool SAL_CALL attachModel(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xModel) throw( ::com::sun::star::uno::RuntimeException );
466 virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) throw( ::com::sun::star::uno::RuntimeException ) = 0;
467 virtual ::com::sun::star::uno::Any SAL_CALL getViewData(void) throw( ::com::sun::star::uno::RuntimeException );
468 virtual void SAL_CALL restoreViewData(const ::com::sun::star::uno::Any& Data) throw( ::com::sun::star::uno::RuntimeException );
469 virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > SAL_CALL getModel(void) throw( ::com::sun::star::uno::RuntimeException );
470 virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL getFrame(void) throw( ::com::sun::star::uno::RuntimeException );
472 // ::com::sun::star::frame::XDispatch
473 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);
474 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);
475 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);
477 // ::com::sun::star::frame::XDispatchProviderInterceptor
478 virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > SAL_CALL getSlaveDispatchProvider(void) throw(::com::sun::star::uno::RuntimeException);
479 virtual void SAL_CALL setSlaveDispatchProvider(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > & _xNewProvider) throw(::com::sun::star::uno::RuntimeException);
480 virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > SAL_CALL getMasterDispatchProvider(void) throw(::com::sun::star::uno::RuntimeException);
481 virtual void SAL_CALL setMasterDispatchProvider(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > & _xNewProvider) throw(::com::sun::star::uno::RuntimeException);
483 // ::com::sun::star::frame::XDispatchProvider
484 virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch(const ::com::sun::star::util::URL& aURL, const OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( ::com::sun::star::uno::RuntimeException );
485 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 );
487 // ::com::sun::star::lang::XComponent
488 virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException); //LLA: need solar mutex {OGenericUnoController_COMPBASE::dispose(); }
489 virtual void SAL_CALL disposing();
490 virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw(::com::sun::star::uno::RuntimeException);
491 virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw(::com::sun::star::uno::RuntimeException);
493 // ::com::sun::star::frame::XFrameActionListener
494 virtual void SAL_CALL frameAction(const ::com::sun::star::frame::FrameActionEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException );
495 // lang::XInitialization
496 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);
498 // XServiceInfo
499 virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException) = 0;
500 virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw(::com::sun::star::uno::RuntimeException);
501 virtual ::com::sun::star::uno::Sequence< OUString> SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException) = 0;
503 // XDispatchInformationProvider
504 virtual ::com::sun::star::uno::Sequence< ::sal_Int16 > SAL_CALL getSupportedCommandGroups() throw (::com::sun::star::uno::RuntimeException);
505 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchInformation > SAL_CALL getConfigurableDispatchInformation( ::sal_Int16 ) throw (::com::sun::star::uno::RuntimeException);
507 // XTitle
508 virtual OUString SAL_CALL getTitle( ) throw (::com::sun::star::uno::RuntimeException);
509 virtual void SAL_CALL setTitle( const OUString& sTitle ) throw (::com::sun::star::uno::RuntimeException);
511 // XTitleChangeBroadcaster
512 virtual void SAL_CALL addTitleChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTitleChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
513 virtual void SAL_CALL removeTitleChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTitleChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
515 // XUserInputInterception
516 virtual void SAL_CALL addKeyHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException);
517 virtual void SAL_CALL removeKeyHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException);
518 virtual void SAL_CALL addMouseClickHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseClickHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException);
519 virtual void SAL_CALL removeMouseClickHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseClickHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException);
521 protected:
522 #ifdef _MSC_VER
523 OGenericUnoController(); // never implemented
524 #endif
528 #endif //DBAUI_GENERICCONTROLLER_HXX
531 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */