merge the formfield patch from ooo-build
[ooovba.git] / dbaccess / source / ui / app / AppController.hxx
blobb4bed6193ccb5dd071e0df958e927534d253a37e
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: AppController.hxx,v $
10 * $Revision: 1.30.20.2 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef DBAUI_APPCONTROLLER_HXX
32 #define DBAUI_APPCONTROLLER_HXX
34 #include "IApplicationController.hxx"
35 #include "AppElementType.hxx"
36 #include "callbacks.hxx"
37 #include "commontypes.hxx"
38 #include "documentcontroller.hxx"
39 #include "dsntypes.hxx"
40 #include "genericcontroller.hxx"
41 #include "linkeddocuments.hxx"
42 #include "moduledbu.hxx"
43 #include "TableCopyHelper.hxx"
45 /** === begin UNO includes === **/
46 #include <com/sun/star/beans/XPropertyChangeListener.hpp>
47 #include <com/sun/star/container/XContainerListener.hpp>
48 #include <com/sun/star/sdb/application/XDatabaseDocumentUI.hpp>
49 #include <com/sun/star/util/XModifiable.hpp>
50 #include <com/sun/star/ui/XContextMenuInterception.hpp>
51 /** === end UNO includes === **/
53 #include <comphelper/stl_types.hxx>
54 #include <comphelper/namedvaluecollection.hxx>
55 #include <comphelper/uno3.hxx>
56 #include <cppuhelper/implbase5.hxx>
57 #include <sot/storage.hxx>
58 #include <svtools/transfer.hxx>
59 #include <svx/dataaccessdescriptor.hxx>
60 #include <vcl/timer.hxx>
62 #include <memory>
64 class ListBox;
65 class SvLBoxEntry;
66 class SvTreeListBox;
67 class TransferableHelper;
68 class TransferableClipboardListener;
69 class SfxFilter;
71 FORWARD_DECLARE_INTERFACE(container,XNameContainer)
72 FORWARD_DECLARE_INTERFACE(container,XContainer)
73 FORWARD_DECLARE_INTERFACE(ucb,XContent)
75 //........................................................................
76 namespace dbaui
78 //........................................................................
80 class SubComponentManager;
82 //====================================================================
83 //= OApplicationController
84 //====================================================================
85 class OApplicationController;
86 class OApplicationView;
87 class OLinkedDocumentsAccess;
88 typedef OGenericUnoController OApplicationController_CBASE;
89 typedef ::cppu::ImplHelper5 < ::com::sun::star::container::XContainerListener
90 , ::com::sun::star::beans::XPropertyChangeListener
91 , ::com::sun::star::sdb::application::XDatabaseDocumentUI
92 , ::com::sun::star::ui::XContextMenuInterception
93 , ::com::sun::star::view::XSelectionSupplier
94 > OApplicationController_Base;
96 class SelectionNotifier;
98 class OApplicationController
99 :public OApplicationController_CBASE
100 ,public OApplicationController_Base
101 ,public IApplicationController
103 public:
104 typedef ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainer > TContainer;
105 typedef ::std::vector< TContainer > TContainerVector;
107 private:
109 OTableCopyHelper::DropDescriptor m_aAsyncDrop;
111 SharedConnection m_xDataSourceConnection;
112 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >
113 m_xMetaData;
115 OModuleClient m_aModuleClient;
116 TransferableDataHelper m_aSystemClipboard; // content of the clipboard
117 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
118 m_xDataSource;
119 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
120 m_xModel;
121 ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifiable >
122 m_xDocumentModify;
123 ::cppu::OInterfaceContainerHelper
124 m_aContextMenuInterceptors;
126 ModelControllerConnector
127 m_aModelConnector;
128 TContainerVector m_aCurrentContainers; // the containers where we are listener on
129 ::rtl::Reference< SubComponentManager >
130 m_pSubComponentManager;
131 ::dbaccess::ODsnTypeCollection
132 m_aTypeCollection;
133 OTableCopyHelper m_aTableCopyHelper;
134 TransferableClipboardListener*
135 m_pClipbordNotifier; // notifier for changes in the clipboard
136 ULONG m_nAsyncDrop;
137 OAsyncronousLink m_aControllerConnectedEvent;
138 OAsyncronousLink m_aSelectContainerEvent;
139 PreviewMode m_ePreviewMode; // the mode of the preview
140 ElementType m_eCurrentType;
141 sal_Bool m_bNeedToReconnect; // true when the settings of the data source were modified and the connection is no longer up to date
142 sal_Bool m_bSuspended; // is true when the controller was already suspended
144 ::std::auto_ptr< SelectionNotifier >
145 m_pSelectionNotifier;
146 typedef ::std::map< ElementType, ::std::vector< ::rtl::OUString > > SelectionByElementType;
147 SelectionByElementType m_aPendingSelection;
149 private:
151 OApplicationView* getContainer() const;
154 /** returns the database name
155 @return
156 the database name
158 ::rtl::OUString getDatabaseName() const;
160 /** returns the stripped database name.
161 @return
162 The stripped database name either the registered naem or if it is a file url the last segment.
164 ::rtl::OUString getStrippedDatabaseName() const;
166 /** return the element type for given container
167 @param _xContainer The container where the element type has to be found
168 @return the element type coressponding to the given container
170 ElementType getElementType(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainer >& _xContainer) const;
172 /** opens a new frame with either the table or the query or report or form or view
173 @param _sName
174 The name of the object to open
175 @param _eType
176 Defines the type to open
177 @param _eOpenMode
178 denotes the mode in which to open the object
179 @param _nInstigatorCommand
180 denotes the command which instigated the action. Might be 0.
181 @return the form or report model will only be returned, otherwise <NULL/>
183 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > openElement(
184 const ::rtl::OUString& _sName,
185 ElementType _eType,
186 ElementOpenMode _eOpenMode,
187 sal_uInt16 _nInstigatorCommand = 0
190 /** opens a new sub frame with a table/query/form/report/view, passing additional arguments
192 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > openElementWithArguments(
193 const ::rtl::OUString& _sName,
194 ElementType _eType,
195 ElementOpenMode _eOpenMode,
196 sal_uInt16 _nInstigatorCommand,
197 const ::comphelper::NamedValueCollection& _rAdditionalArguments
200 /** opens a new frame for creation or auto pilot
201 @param _eType
202 Defines the type to open
203 @param _bSQLView
204 If <TRUE/> the query design will be opened in SQL view, otherwise not.
206 void newElement( ElementType _eType , sal_Bool _bSQLView );
208 /** creates a new database object, using an auto pilot
209 @param _eType
210 Defines the type of the object to create
211 @precond
212 Our mutex must not be locked.
213 @since #i39203#
215 void newElementWithPilot( ElementType _eType );
217 /** converts the query to a view
218 @param _sName
219 The name of the query.
221 void convertToView(const ::rtl::OUString& _sName);
223 /** checks if the connection for the selected data source is read only. If the connection doesn't exist, <TRUE/> will be returned.
224 @return
225 <TRUE/> if read only or doesn't exist, otherwise <FALSE/>
227 sal_Bool isConnectionReadOnly() const;
229 /// fills the list with the selected entries.
230 void getSelectionElementNames( ::std::vector< ::rtl::OUString>& _rNames ) const;
232 /// deletes the entries selected.
233 void deleteEntries();
235 /// renames the selected entry in the detail page
236 void renameEntry();
238 /** deletes queries, forms, or reports
239 @param _eType
240 the type of the objects
241 @param _rList
242 The names of the elements to delete
243 @param _bConfirm
244 determines whether the user must confirm the deletion
246 void deleteObjects( ElementType _eType,
247 const ::std::vector< ::rtl::OUString>& _rList,
248 bool _bConfirm );
250 /** deletes tables.
251 @param _rList
252 The list of tables.
254 void deleteTables(const ::std::vector< ::rtl::OUString>& _rList);
256 /// copies the current object into clipboard
257 TransferableHelper* copyObject();
259 /// returns the nameaccess
260 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > getElements(ElementType _eType);
262 /** returns the document access for the specific type
263 @param _eType
264 the type
265 @return ::std::auto_ptr<OLinkedDocumentsAccess>
267 ::std::auto_ptr<OLinkedDocumentsAccess> getDocumentsAccess(ElementType _eType);
269 /// returns the query definitions of the active data source.
270 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer> getQueryDefintions() const;
272 /** pastes a special format from the system clipboard to the currently selected object types
273 @param _nFormatId
274 The format to be copied.
276 void pasteFormat(sal_uInt32 _nFormatId);
278 /** pastes a query, form or report into the data source
279 @param _eType
280 The type of the object to paste.
281 @param _rPasteData
282 The data descriptor.
283 @param _sParentFolder
284 The name of the parent folder if it exists.
285 @param _bMove
286 if <TRUE/> the name of the content must be inserted without any change, otherwise not.
287 @return
288 <TRUE/> if the paste opertions was successfull, otherwise <FALSE/>.
290 sal_Bool paste( ElementType _eType,const ::svx::ODataAccessDescriptor& _rPasteData ,const String& _sParentFolder = String(),sal_Bool _bMove = sal_False);
292 /// returns the system clipboard.
293 const TransferableDataHelper& getViewClipboard() const { return m_aSystemClipboard; }
295 /// returns <TRUE/> if the clipboard supports a table format, otherwise <FALSE/>.
296 sal_Bool isTableFormat() const;
298 /** copies a table which was constructed by tags like HTML or RTF
299 @param _rDesc
300 The Drop descriptor
301 @param _bCheck
302 If set to <TRUE/> than the controller checks only if a copy is possible.
304 sal_Bool copyTagTable( OTableCopyHelper::DropDescriptor& _rDesc
305 , sal_Bool _bCheck);
307 /** fills the vector with all supported formats
308 @param _eType
309 The type for which we need the formats
310 @param _rFormatIds
311 The vector to be filled up.
313 void getSupportedFormats(ElementType _eType,::std::vector<SotFormatStringId>& _rFormatIds) const;
315 /** adds a listener to the current name access.
316 @param _xCollection
317 The collection where we want to listen on.
319 void addContainerListener(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _xCollection);
321 /** opens a uno dialog withthe currently selected data source as initialize argument
322 @param _sServiceName
323 The serivce name of the dialog to be executed.
325 void openDialog(const ::rtl::OUString& _sServiceName);
327 /** opens the administration dialog for the selected data source
329 void openDataSourceAdminDialog();
331 /** opens the table filter dialog for the selected data source
333 void openTableFilterDialog();
335 /** opens the DirectSQLDialog to execute hand made sql statements.
337 void openDirectSQLDialog();
339 /** when the settings of the data source changed,
340 it opens a dialog which ask to close all depending documents, then recreate the connection.
341 The SolarMutex has to be locked before calling this.
343 void askToReconnect();
345 /** remember a newly opened sub document for later access
347 void onDocumentOpened(
348 const ::rtl::OUString& _rName,
349 const sal_Int32 _nType,
350 const ElementOpenMode _eMode,
351 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& _xDocument,
352 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& _xDefinition
355 /** Inserts a new object into the hierachy given be the type.
356 @param _eType
357 Where to insert the new item.
358 @param _sParentFolder
359 The name of the parent folder if it exists.
360 @param _xContent
361 The content to insert.
362 @param _bMove
363 if <TRUE/> the name of the content must be inserted without any change, otherwise not.
364 @return
365 <TRUE/> if the insert opertions was successfull, otherwise <FALSE/>.
367 sal_Bool insertHierachyElement( ElementType _eType
368 ,const String& _sParentFolder
369 ,sal_Bool _bCollection = sal_True
370 ,const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>& _xContent = ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>()
371 ,sal_Bool _bMove = sal_False);
372 /** checks if delete command or rename comamnd is allowed
373 @param _eType
374 The element type.
375 @param _bDelete
376 If <TRUE> then the delete command should be checked.
377 @return
378 <TRUE> if the command is allowed
380 sal_Bool isRenameDeleteAllowed(ElementType _eType,sal_Bool _bDelete) const;
381 /** all selected entries will be opened, or edited, or converted to a view
382 @param _nId
383 The slot which should be executed.
384 @param _eOpenMode
385 Defines the mode of opening. @see ElementOpenMode
387 void doAction(sal_uInt16 _nId ,ElementOpenMode _eOpenMode);
389 /** returns the currently selected table or query name.
391 * \return the name of the currently table or query. If the tables or query container is selected otherwise an empty string will be returned.
393 ::rtl::OUString getCurrentlySelectedName(sal_Int32& _rnCommandType) const;
395 /** shows the preview for the given entry
397 void showPreviewFor( const ElementType _eType,const ::rtl::OUString& _sName );
399 /** called when we just connected to a new, non-NULL model
401 In particular, this is called *after* the controller has been announced to the model
402 (XModel::connectController)
404 void onConnectedModel();
406 /// determines whether the given table name denotes a view which can be altered
407 bool impl_isAlterableView_nothrow( const ::rtl::OUString& _rTableOrViewName ) const;
409 /** does the macro/script migration, where macros/scripts in forms/reports are moved
410 to the database document itself.
412 void impl_migrateScripts_nothrow();
414 /** verifies the object type denotes a valid DatabaseObject, and the object name denotes an existing
415 object of this type. Throws if not.
417 void impl_validateObjectTypeAndName_throw( const sal_Int32 _nObjectType, const ::rtl::OUString& _rObjectName );
419 protected:
420 // ----------------------------------------------------------------
421 // initalizing members
422 /** forces usage of a connection which we do not own
423 <p>To be used from within XInitialization::initialize only.</p>
425 void initializeConnection( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxForeignConn );
427 // 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.
428 virtual FeatureState GetState(sal_uInt16 nId) const;
429 // execute a feature
430 virtual void Execute(sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
432 // OGenericUnoController
433 virtual void onLoadedMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager >& _xLayoutManager );
435 virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > getPrivateModel() const
437 return m_xModel;
440 virtual ~OApplicationController();
442 public:
443 OApplicationController(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
445 DECLARE_XINTERFACE( )
446 DECLARE_XTYPEPROVIDER( )
448 // XServiceInfo
449 virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
450 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
451 // need by registration
452 static ::rtl::OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException );
453 static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
454 static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
455 SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
457 // ::com::sun::star::frame::XController
458 virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) throw( ::com::sun::star::uno::RuntimeException );
459 virtual sal_Bool SAL_CALL attachModel(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xModel) throw( ::com::sun::star::uno::RuntimeException );
460 virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > SAL_CALL getModel(void) throw( ::com::sun::star::uno::RuntimeException );
462 // ::com::sun::star::container::XContainerListener
463 virtual void SAL_CALL elementInserted(const ::com::sun::star::container::ContainerEvent& Event) throw( ::com::sun::star::uno::RuntimeException );
464 virtual void SAL_CALL elementRemoved(const ::com::sun::star::container::ContainerEvent& Event) throw( ::com::sun::star::uno::RuntimeException );
465 virtual void SAL_CALL elementReplaced(const ::com::sun::star::container::ContainerEvent& Event) throw( ::com::sun::star::uno::RuntimeException );
467 // XPropertyChangeListener
468 virtual void SAL_CALL propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw (::com::sun::star::uno::RuntimeException);
470 // XDatabaseDocumentUI
471 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource > SAL_CALL getDataSource() throw (::com::sun::star::uno::RuntimeException);
472 virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL getApplicationMainWindow() throw (::com::sun::star::uno::RuntimeException);
473 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > SAL_CALL getActiveConnection() throw (::com::sun::star::uno::RuntimeException);
474 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > > SAL_CALL getSubComponents() throw (::com::sun::star::uno::RuntimeException);
475 virtual ::sal_Bool SAL_CALL isConnected( ) throw (::com::sun::star::uno::RuntimeException);
476 virtual void SAL_CALL connect( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
477 virtual ::sal_Bool SAL_CALL closeSubComponents( ) throw (::com::sun::star::uno::RuntimeException);
478 virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > SAL_CALL loadComponent( ::sal_Int32 ObjectType, const ::rtl::OUString& ObjectName, ::sal_Bool ForEditing ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
479 virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > SAL_CALL loadComponentWithArguments( ::sal_Int32 ObjectType, const ::rtl::OUString& ObjectName, ::sal_Bool ForEditing, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Arguments ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::NoSuchElementException, ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
481 // XContextMenuInterception
482 virtual void SAL_CALL registerContextMenuInterceptor( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XContextMenuInterceptor >& Interceptor ) throw (::com::sun::star::uno::RuntimeException);
483 virtual void SAL_CALL releaseContextMenuInterceptor( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XContextMenuInterceptor >& Interceptor ) throw (::com::sun::star::uno::RuntimeException);
485 // XSelectionSupplier
486 virtual ::sal_Bool SAL_CALL select( const ::com::sun::star::uno::Any& xSelection ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
487 virtual ::com::sun::star::uno::Any SAL_CALL getSelection( ) throw (::com::sun::star::uno::RuntimeException);
488 virtual void SAL_CALL addSelectionChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
489 virtual void SAL_CALL removeSelectionChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
491 /** retrieves the current connection, creates it if necessary
493 If an error occurs, then this is either stored in the location pointed to by <arg>_pErrorInfo</arg>,
494 or, if <code>_pErrorInfo</code> is <NULL/>, then the error is displayed to the user.
496 const SharedConnection& ensureConnection( ::dbtools::SQLExceptionInfo* _pErrorInfo = NULL );
498 /** retrieves the current connection
500 const SharedConnection& getConnection() const { return m_xDataSourceConnection; }
502 /// determines whether we're currently connected to the database
503 bool isConnected() const { return m_xDataSourceConnection.is(); }
505 const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >&
506 getConnectionMetaData() const { return m_xMetaData; }
508 /** refreshes the tables
510 void refreshTables();
512 // IApplicationController
513 virtual bool onEntryDoubleClick(SvTreeListBox& _rTree);
514 virtual sal_Bool onContainerSelect(ElementType _eType);
515 virtual void onSelectionChanged();
516 virtual void onCutEntry();
517 virtual void onCopyEntry();
518 virtual void onPasteEntry();
519 virtual void onDeleteEntry();
520 virtual void previewChanged( sal_Int32 _nMode);
521 virtual void containerFound( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainer >& _xContainer);
523 // IController (base of IApplicationController)
524 virtual void executeUnChecked(const ::com::sun::star::util::URL& _rCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
525 virtual void executeChecked(const ::com::sun::star::util::URL& _rCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
526 virtual void executeUnChecked(sal_uInt16 _nCommandId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
527 virtual void executeChecked(sal_uInt16 _nCommandId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
528 virtual sal_Bool isCommandEnabled(sal_uInt16 _nCommandId) const;
529 virtual sal_Bool isCommandEnabled( const ::rtl::OUString& _rCompleteCommandURL ) const;
530 virtual sal_uInt16 registerCommandURL( const ::rtl::OUString& _rCompleteCommandURL );
531 virtual void notifyHiContrastChanged();
532 virtual sal_Bool isDataSourceReadOnly() const;
533 virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >
534 getXController(void) throw( ::com::sun::star::uno::RuntimeException );
535 virtual bool interceptUserInput( const NotifyEvent& _rEvent );
537 // IControlActionListener overridables
538 virtual sal_Bool requestQuickHelp( const SvLBoxEntry* _pEntry, String& _rText ) const;
539 virtual sal_Bool requestDrag( sal_Int8 _nAction, const Point& _rPosPixel );
540 virtual sal_Int8 queryDrop( const AcceptDropEvent& _rEvt, const DataFlavorExVector& _rFlavors );
541 virtual sal_Int8 executeDrop( const ExecuteDropEvent& _rEvt );
543 // IContextMenuProvider (base of IApplicationController)
544 virtual PopupMenu* getContextMenu( Control& _rControl ) const;
545 virtual IController& getCommandController();
546 virtual ::cppu::OInterfaceContainerHelper*
547 getContextMenuInterceptors();
548 virtual ::com::sun::star::uno::Any
549 getCurrentSelection( Control& _rControl ) const;
551 DECL_LINK( OnInvalidateClipboard, void* );
552 DECL_LINK( OnClipboardChanged, void* );
553 DECL_LINK( OnAsyncDrop, void* );
554 DECL_LINK( OnCreateWithPilot, void* );
555 DECL_LINK( OnSelectContainer, void* );
556 DECL_LINK( OnFirstControllerConnected, void* );
558 protected:
559 using OApplicationController_CBASE::connect;
561 /** disconnects from our XConnection, and cleans up this connection
563 virtual void disconnect();
565 // late construction
566 virtual sal_Bool Construct(Window* pParent);
567 virtual void describeSupportedFeatures();
569 protected:
570 // XEventListener
571 virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException );
573 // OComponentHelper
574 virtual void SAL_CALL disposing();
577 //........................................................................
578 } // namespace dbaui
579 //........................................................................
581 #endif // DBAUI_APPCONTROLLER_HXX