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