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