Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 :
20 : #ifndef DBAUI_GENERICCONTROLLER_HXX
21 : #define DBAUI_GENERICCONTROLLER_HXX
22 :
23 : #include "AsyncronousLink.hxx"
24 : #include "controllerframe.hxx"
25 : #include "dbaccessdllapi.h"
26 : #include "IController.hxx"
27 :
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>
46 :
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>
54 :
55 : #include <boost/optional.hpp>
56 : #include <sfx2/userinputinterception.hxx>
57 :
58 : namespace dbtools
59 : {
60 : class SQLExceptionInfo;
61 : }
62 :
63 : class Window;
64 : namespace dbaui
65 : {
66 : class ODataView;
67 :
68 : // ====================================================================
69 : // = optional
70 : // ====================================================================
71 : /** convenience wrapper around boost::optional, allowing typed assignments
72 : */
73 : template < typename T >
74 1599 : class optional : public ::boost::optional< T >
75 : {
76 : typedef ::boost::optional< T > base_type;
77 :
78 : public:
79 1005 : optional ( ) : base_type( ) { }
80 0 : explicit optional ( T const& val ) : base_type( val ) { }
81 594 : optional ( optional const& rhs ) : base_type( (base_type const&)rhs ) { }
82 :
83 : public:
84 42 : optional& operator= ( T const& rhs )
85 : {
86 42 : base_type::reset( rhs );
87 42 : return *this;
88 : }
89 504 : optional& operator= ( optional< T > const& rhs )
90 : {
91 504 : if ( rhs.is_initialized() )
92 36 : base_type::reset( rhs.get() );
93 : else
94 468 : base_type::reset();
95 504 : return *this;
96 : }
97 : };
98 :
99 : template< typename T >
100 0 : inline bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & _any, optional< T >& _value )
101 : {
102 0 : _value.reset(); // de-init the optional value
103 :
104 0 : T directValue = T();
105 0 : if ( _any >>= directValue )
106 0 : _value.reset( directValue );
107 :
108 0 : return !!_value;
109 : }
110 :
111 : // ====================================================================
112 : // = FeatureState
113 : // ====================================================================
114 : /** describes the state of a feature
115 :
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.
119 : */
120 899 : struct FeatureState
121 : {
122 : sal_Bool bEnabled;
123 :
124 : optional< bool > bChecked;
125 : optional< bool > bInvisible;
126 : ::com::sun::star::uno::Any aValue;
127 : optional< OUString > sTitle;
128 :
129 335 : FeatureState() : bEnabled(sal_False) { }
130 : };
131 :
132 : // ====================================================================
133 : // = helper
134 : // ====================================================================
135 :
136 : // ....................................................................
137 175 : struct ControllerFeature : public ::com::sun::star::frame::DispatchInformation
138 : {
139 : sal_uInt16 nFeatureId;
140 : };
141 :
142 : // ....................................................................
143 : typedef ::std::map < OUString
144 : , ControllerFeature
145 : , ::std::less< OUString >
146 : > SupportedFeatures;
147 :
148 : // ....................................................................
149 : struct CompareFeatureById : ::std::binary_function< SupportedFeatures::value_type, sal_Int32, bool >
150 : {
151 : // ................................................................
152 595 : inline bool operator()( const SupportedFeatures::value_type& _aType, const sal_Int32& _nId ) const
153 : {
154 595 : return !!( _nId == _aType.second.nFeatureId );
155 : }
156 : };
157 :
158 : // ....................................................................
159 271 : struct FeatureListener
160 : {
161 : ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >
162 : xListener;
163 : sal_Int32 nId;
164 : sal_Bool bForceBroadcast;
165 : };
166 :
167 : // ....................................................................
168 : typedef ::std::deque< FeatureListener > FeatureListeners;
169 :
170 : // ....................................................................
171 : struct FindFeatureListener : ::std::binary_function< FeatureListener, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >, bool >
172 : {
173 : // ................................................................
174 6 : inline bool operator()( const FeatureListener& lhs, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& rhs ) const
175 : {
176 6 : return !!( lhs.xListener == rhs );
177 : }
178 : };
179 :
180 : // ....................................................................
181 : typedef ::comphelper::SharedMutexBase OGenericUnoController_MBASE;
182 :
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;
195 :
196 : struct OGenericUnoController_Data;
197 : // ====================================================================
198 : class DBACCESS_DLLPUBLIC OGenericUnoController
199 : :public OGenericUnoController_MBASE
200 : ,public OGenericUnoController_Base
201 : ,public IController
202 : {
203 : private:
204 : SupportedFeatures m_aSupportedFeatures;
205 : ::comphelper::NamedValueCollection
206 : m_aInitParameters;
207 :
208 : ::std::auto_ptr< OGenericUnoController_Data >
209 : m_pData;
210 : ODataView* m_pView; // our (VCL) "main window"
211 :
212 : #ifdef DBG_UTIL
213 : bool m_bDescribingSupportedFeatures;
214 : #endif
215 :
216 : protected:
217 : // ----------------------------------------------------------------
218 : // attributes
219 5999 : struct DispatchTarget
220 : {
221 : ::com::sun::star::util::URL aURL;
222 : ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > xListener;
223 :
224 : DispatchTarget() { }
225 21 : DispatchTarget(const ::com::sun::star::util::URL& rURL, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > xRef) : aURL(rURL), xListener(xRef) { }
226 : };
227 :
228 : DECLARE_STL_MAP( sal_uInt16, FeatureState, ::std::less< sal_uInt16 >, StateCache );
229 : DECLARE_STL_VECTOR( DispatchTarget, Dispatch);
230 :
231 : FeatureListeners m_aFeaturesToInvalidate;
232 :
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
238 :
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;
246 :
247 : sal_Bool m_bPreview;
248 : sal_Bool m_bReadOnly;
249 :
250 : sal_Bool m_bCurrentlyModified : 1;
251 : sal_Bool m_bExternalTitle : 1;
252 :
253 :
254 :
255 : // ----------------------------------------------------------------
256 : // attribute access
257 26 : ::osl::Mutex& getMutex() const { return OGenericUnoController_MBASE::getMutex(); }
258 0 : ::cppu::OBroadcastHelper& getBroadcastHelper() { return OGenericUnoController_Base::rBHelper; }
259 :
260 : // ----------------------------------------------------------------
261 : // methods
262 : OGenericUnoController( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rM );
263 : const ::comphelper::NamedValueCollection&
264 1 : getInitParams() const { return m_aInitParameters; }
265 :
266 :
267 : /** open the help agent for the given help id.
268 : @param _nHelpId
269 : The help id to dispatch.
270 : */
271 : void openHelpAgent( const OString& _sHelpId );
272 :
273 : /** open the help agent for the given help url.
274 : @param _pHelpStringURL
275 : The help url to dispatch.
276 : */
277 : void openHelpAgent( const OUString& _suHelpStringURL );
278 :
279 : /** opens the given Help URL in the help agent
280 :
281 : The URL does not need to be parsed already, it is passed through
282 : XURLTransformer::parseStrict before it is used.
283 : */
284 : void openHelpAgent( const ::com::sun::star::util::URL& _rURL );
285 :
286 : // closes the task when possible
287 : void closeTask();
288 :
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);
291 :
292 : /** called when our menu has been loaded into our frame, can be used to load sub toolbars
293 :
294 : @param _xLayoutManager
295 : The layout manager.
296 : */
297 : virtual void onLoadedMenu(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager >& _xLayoutManager);
298 :
299 : // all the features which should be handled by this class
300 : virtual void describeSupportedFeatures();
301 :
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);
306 :
307 : /** describes a feature supported by the controller
308 :
309 : Must not be called outside <member>describeSupportedFeatures</member>.
310 :
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
315 : URL
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>.
319 : */
320 : void implDescribeSupportedFeature(
321 : const sal_Char* _pAsciiCommandURL,
322 : sal_uInt16 _nFeatureId,
323 : sal_Int16 _nCommandGroup = ::com::sun::star::frame::CommandGroup::INTERNAL
324 : );
325 :
326 : /** returns <TRUE/> if the feature is supported, otherwise <FALSE/>
327 : @param _nId
328 : The ID of the feature.
329 : */
330 : sal_Bool isFeatureSupported( sal_Int32 _nId );
331 :
332 : // gets the URL which the given id is assigned to
333 : ::com::sun::star::util::URL getURLForId(sal_Int32 _nId) const;
334 :
335 : /** determines whether the given feature ID denotes a user-defined feature
336 :
337 : @see IController::registerCommandURL
338 : */
339 : bool isUserDefinedFeature( const sal_uInt16 nFeatureId ) const;
340 :
341 : /** determines whether the given feature URL denotes a user-defined feature
342 :
343 : @see IController::registerCommandURL
344 : */
345 : bool isUserDefinedFeature( const OUString& _rFeatureURL ) const;
346 :
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
351 : );
352 :
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
358 : );
359 :
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);
362 :
363 : /** return the container window of the top most frame
364 : @return
365 : The top most container window, nmay be <NULL/>.
366 : */
367 : ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow> getTopMostContainerWindow() const;
368 :
369 : // XInitialize will be called inside initialize
370 : virtual void impl_initialize();
371 :
372 0 : virtual OUString getPrivateTitle() const { return OUString(); }
373 :
374 : ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTitle > impl_getTitleHelper_throw();
375 2 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > getPrivateModel() const
376 : {
377 2 : return ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >();
378 : }
379 :
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 );
382 :
383 : void releaseNumberForComponent();
384 :
385 : virtual ~OGenericUnoController();
386 :
387 : private:
388 : void fillSupportedFeatures();
389 :
390 : void InvalidateAll_Impl();
391 : void InvalidateFeature_Impl();
392 :
393 : void ImplInvalidateFeature( sal_Int32 _nId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& _xListener, sal_Bool _bForceBroadcast );
394 :
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);
397 :
398 : // link methods
399 : DECL_LINK(OnAsyncInvalidateAll, void*);
400 : DECL_LINK(OnAsyncCloseTask, void*);
401 :
402 : public:
403 12 : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > getORB() const { return m_xContext; }
404 757 : ODataView* getView() const { return m_pView; }
405 1 : void setView( ODataView& i_rView ) { m_pView = &i_rView; }
406 1 : void clearView() { m_pView = NULL; }
407 : // shows a error box if the SQLExceptionInfo is valid
408 : void showError(const ::dbtools::SQLExceptionInfo& _rInfo);
409 :
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);
417 :
418 : /** InvalidateAll invalidates all features currently known
419 : */
420 : virtual void InvalidateAll();
421 : // late construction
422 : virtual sal_Bool Construct(Window* pParent);
423 :
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.
429 : */
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;
431 :
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 );
444 :
445 : // misc
446 : virtual sal_Bool isCommandChecked(sal_uInt16 _nCommandId) const;
447 :
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 );
450 :
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 );
453 :
454 : // XInterface
455 : virtual void SAL_CALL acquire( ) throw ();
456 : virtual void SAL_CALL release( ) throw ();
457 :
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);
462 :
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 );
471 :
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);
476 :
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);
482 :
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 );
486 :
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);
492 :
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);
497 :
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;
502 :
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);
506 :
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);
510 :
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);
514 :
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);
520 :
521 : protected:
522 : #ifdef _MSC_VER
523 : OGenericUnoController(); // never implemented
524 : #endif
525 : };
526 : }
527 :
528 : #endif //DBAUI_GENERICCONTROLLER_HXX
529 :
530 :
531 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|