Version 3.6.0.2, tag libreoffice-3.6.0.2
[LibreOffice.git] / dbaccess / source / ui / app / AppController.hxx
blob644de951d7c1f99defe4951c5782a072915af3f6
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef DBAUI_APPCONTROLLER_HXX
30 #define DBAUI_APPCONTROLLER_HXX
32 #include "IApplicationController.hxx"
33 #include "AppElementType.hxx"
34 #include "callbacks.hxx"
35 #include "commontypes.hxx"
36 #include "dsntypes.hxx"
37 #include "genericcontroller.hxx"
38 #include "linkeddocuments.hxx"
39 #include "moduledbu.hxx"
40 #include "TableCopyHelper.hxx"
42 /** === begin UNO includes === **/
43 #include <com/sun/star/beans/XPropertyChangeListener.hpp>
44 #include <com/sun/star/container/XContainerListener.hpp>
45 #include <com/sun/star/sdb/application/XDatabaseDocumentUI.hpp>
46 #include <com/sun/star/util/XModifiable.hpp>
47 #include <com/sun/star/ui/XContextMenuInterception.hpp>
48 /** === end UNO includes === **/
50 #include <comphelper/stl_types.hxx>
51 #include <comphelper/namedvaluecollection.hxx>
52 #include <comphelper/uno3.hxx>
53 #include <cppuhelper/implbase5.hxx>
54 #include <sot/storage.hxx>
55 #include <svtools/transfer.hxx>
56 #include <svx/dataaccessdescriptor.hxx>
57 #include <vcl/timer.hxx>
59 #include <memory>
61 class ListBox;
62 class SvLBoxEntry;
63 class SvTreeListBox;
64 class TransferableHelper;
65 class TransferableClipboardListener;
66 class SfxFilter;
68 namespace com { namespace sun { namespace star {
69 namespace container {
70 class XNameContainer;
71 class XContainer;
73 namespace ucb {
74 class XContent;
76 }}}
78 //........................................................................
79 namespace dbaui
81 //........................................................................
83 class SubComponentManager;
85 //====================================================================
86 //= OApplicationController
87 //====================================================================
88 class OApplicationController;
89 class OApplicationView;
90 class OLinkedDocumentsAccess;
91 typedef OGenericUnoController OApplicationController_CBASE;
92 typedef ::cppu::ImplHelper5 < ::com::sun::star::container::XContainerListener
93 , ::com::sun::star::beans::XPropertyChangeListener
94 , ::com::sun::star::sdb::application::XDatabaseDocumentUI
95 , ::com::sun::star::ui::XContextMenuInterception
96 , ::com::sun::star::view::XSelectionSupplier
97 > OApplicationController_Base;
99 class SelectionNotifier;
101 class OApplicationController
102 :public OApplicationController_CBASE
103 ,public OApplicationController_Base
104 ,public IApplicationController
106 public:
107 typedef ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainer > TContainer;
108 typedef ::std::vector< TContainer > TContainerVector;
110 private:
112 OTableCopyHelper::DropDescriptor m_aAsyncDrop;
114 SharedConnection m_xDataSourceConnection;
115 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >
116 m_xMetaData;
118 OModuleClient m_aModuleClient;
119 TransferableDataHelper m_aSystemClipboard; // content of the clipboard
120 ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >
121 m_xDataSource;
122 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >
123 m_xModel;
124 ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifiable >
125 m_xDocumentModify;
126 ::cppu::OInterfaceContainerHelper
127 m_aContextMenuInterceptors;
129 TContainerVector m_aCurrentContainers; // the containers where we are listener on
130 ::rtl::Reference< SubComponentManager >
131 m_pSubComponentManager;
132 ::dbaccess::ODsnTypeCollection
133 m_aTypeCollection;
134 OTableCopyHelper m_aTableCopyHelper;
135 TransferableClipboardListener*
136 m_pClipbordNotifier; // notifier for changes in the clipboard
137 sal_uLong m_nAsyncDrop;
138 OAsyncronousLink m_aControllerConnectedEvent;
139 OAsyncronousLink m_aSelectContainerEvent;
140 PreviewMode m_ePreviewMode; // the mode of the preview
141 ElementType m_eCurrentType;
142 sal_Bool m_bNeedToReconnect; // true when the settings of the data source were modified and the connection is no longer up to date
143 sal_Bool m_bSuspended; // is true when the controller was already suspended
145 ::std::auto_ptr< SelectionNotifier >
146 m_pSelectionNotifier;
147 typedef ::std::map< ElementType, ::std::vector< ::rtl::OUString > > SelectionByElementType;
148 SelectionByElementType m_aPendingSelection;
150 private:
152 OApplicationView* getContainer() const;
155 /** returns the database name
156 @return
157 the database name
159 ::rtl::OUString getDatabaseName() const;
161 /** returns the stripped database name.
162 @return
163 The stripped database name either the registered naem or if it is a file url the last segment.
165 ::rtl::OUString getStrippedDatabaseName() const;
167 /** return the element type for given container
168 @param _xContainer The container where the element type has to be found
169 @return the element type coressponding to the given container
171 ElementType getElementType(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainer >& _xContainer) const;
173 /** opens a new frame with either the table or the query or report or form or view
174 @param _sName
175 The name of the object to open
176 @param _eType
177 Defines the type to open
178 @param _eOpenMode
179 denotes the mode in which to open the object
180 @param _nInstigatorCommand
181 denotes the command which instigated the action. Might be 0.
182 @return the form or report model will only be returned, otherwise <NULL/>
184 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > openElement(
185 const ::rtl::OUString& _sName,
186 ElementType _eType,
187 ElementOpenMode _eOpenMode,
188 sal_uInt16 _nInstigatorCommand = 0
191 /** opens a new sub frame with a table/query/form/report/view, passing additional arguments
193 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > openElementWithArguments(
194 const ::rtl::OUString& _sName,
195 ElementType _eType,
196 ElementOpenMode _eOpenMode,
197 sal_uInt16 _nInstigatorCommand,
198 const ::comphelper::NamedValueCollection& _rAdditionalArguments
201 /** opens a new frame for creation or auto pilot
202 @param _eType
203 Defines the type to open
204 @param i_rAdditionalArguments
205 Additional arguments to pass when creating the component
207 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >
208 newElement(
209 ElementType _eType,
210 const ::comphelper::NamedValueCollection& i_rAdditionalArguments,
211 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& o_rDocumentDefinition
214 /** creates a new database object, using an auto pilot
215 @param _eType
216 Defines the type of the object to create
217 @precond
218 Our mutex must not be locked.
219 @since #i39203#
221 void newElementWithPilot( ElementType _eType );
223 /** converts the query to a view
224 @param _sName
225 The name of the query.
227 void convertToView(const ::rtl::OUString& _sName);
229 /** checks if the connection for the selected data source is read only. If the connection doesn't exist, <TRUE/> will be returned.
230 @return
231 <TRUE/> if read only or doesn't exist, otherwise <FALSE/>
233 sal_Bool isConnectionReadOnly() const;
235 /// fills the list with the selected entries.
236 void getSelectionElementNames( ::std::vector< ::rtl::OUString>& _rNames ) const;
238 /// deletes the entries selected.
239 void deleteEntries();
241 /// renames the selected entry in the detail page
242 void renameEntry();
244 /** deletes queries, forms, or reports
245 @param _eType
246 the type of the objects
247 @param _rList
248 The names of the elements to delete
249 @param _bConfirm
250 determines whether the user must confirm the deletion
252 void deleteObjects( ElementType _eType,
253 const ::std::vector< ::rtl::OUString>& _rList,
254 bool _bConfirm );
256 /** deletes tables.
257 @param _rList
258 The list of tables.
260 void deleteTables(const ::std::vector< ::rtl::OUString>& _rList);
262 /// copies the current object into clipboard
263 TransferableHelper* copyObject();
265 /// returns the nameaccess
266 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > getElements(ElementType _eType);
268 /** returns the document access for the specific type
269 @param _eType
270 the type
271 @return ::std::auto_ptr<OLinkedDocumentsAccess>
273 ::std::auto_ptr<OLinkedDocumentsAccess> getDocumentsAccess(ElementType _eType);
275 /// returns the query definitions of the active data source.
276 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer> getQueryDefintions() const;
278 /** pastes a special format from the system clipboard to the currently selected object types
279 @param _nFormatId
280 The format to be copied.
282 void pasteFormat(sal_uInt32 _nFormatId);
284 /** pastes a query, form or report into the data source
285 @param _eType
286 The type of the object to paste.
287 @param _rPasteData
288 The data descriptor.
289 @param _sParentFolder
290 The name of the parent folder if it exists.
291 @param _bMove
292 if <TRUE/> the name of the content must be inserted without any change, otherwise not.
293 @return
294 <TRUE/> if the paste opertions was successfull, otherwise <FALSE/>.
296 sal_Bool paste( ElementType _eType,const ::svx::ODataAccessDescriptor& _rPasteData ,const String& _sParentFolder = String(),sal_Bool _bMove = sal_False);
298 /// returns the system clipboard.
299 const TransferableDataHelper& getViewClipboard() const { return m_aSystemClipboard; }
301 /// returns <TRUE/> if the clipboard supports a table format, otherwise <FALSE/>.
302 sal_Bool isTableFormat() const;
304 /** fills the vector with all supported formats
305 @param _eType
306 The type for which we need the formats
307 @param _rFormatIds
308 The vector to be filled up.
310 void getSupportedFormats(ElementType _eType,::std::vector<SotFormatStringId>& _rFormatIds) const;
312 /** adds a listener to the current name access.
313 @param _xCollection
314 The collection where we want to listen on.
316 void addContainerListener(const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _xCollection);
318 /** opens a uno dialog withthe currently selected data source as initialize argument
319 @param _sServiceName
320 The serivce name of the dialog to be executed.
322 void openDialog(const ::rtl::OUString& _sServiceName);
324 /** opens the administration dialog for the selected data source
326 void openDataSourceAdminDialog();
328 /** opens the table filter dialog for the selected data source
330 void openTableFilterDialog();
332 /** opens the DirectSQLDialog to execute hand made sql statements.
334 void openDirectSQLDialog();
336 /** when the settings of the data source changed,
337 it opens a dialog which ask to close all depending documents, then recreate the connection.
338 The SolarMutex has to be locked before calling this.
340 void askToReconnect();
342 /** remember a newly opened sub document for later access
344 void onDocumentOpened(
345 const ::rtl::OUString& _rName,
346 const sal_Int32 _nType,
347 const ElementOpenMode _eMode,
348 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& _xDocument,
349 const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& _xDefinition
352 /** Inserts a new object into the hierachy given be the type.
353 @param _eType
354 Where to insert the new item.
355 @param _sParentFolder
356 The name of the parent folder if it exists.
357 @param _xContent
358 The content to insert.
359 @param _bMove
360 if <TRUE/> the name of the content must be inserted without any change, otherwise not.
361 @return
362 <TRUE/> if the insert opertions was successfull, otherwise <FALSE/>.
364 sal_Bool insertHierachyElement( ElementType _eType
365 ,const String& _sParentFolder
366 ,sal_Bool _bCollection = sal_True
367 ,const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>& _xContent = ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContent>()
368 ,sal_Bool _bMove = sal_False);
369 /** checks if delete command or rename comamnd is allowed
370 @param _eType
371 The element type.
372 @param _bDelete
373 If <TRUE> then the delete command should be checked.
374 @return
375 <TRUE> if the command is allowed
377 sal_Bool isRenameDeleteAllowed(ElementType _eType,sal_Bool _bDelete) const;
378 /** all selected entries will be opened, or edited, or converted to a view
379 @param _nId
380 The slot which should be executed.
381 @param _eOpenMode
382 Defines the mode of opening. @see ElementOpenMode
384 void doAction(sal_uInt16 _nId ,ElementOpenMode _eOpenMode);
386 /** returns the currently selected table or query name.
388 * \return the name of the currently table or query. If the tables or query container is selected otherwise an empty string will be returned.
390 ::rtl::OUString getCurrentlySelectedName(sal_Int32& _rnCommandType) const;
392 /** shows the preview for the given entry
394 void showPreviewFor( const ElementType _eType,const ::rtl::OUString& _sName );
396 /** called we were attached to a frame
398 In particular, this is called *after* the controller has been announced to the model
399 (XModel::connectController)
401 void onAttachedFrame();
403 /// determines whether the given table name denotes a view which can be altered
404 bool impl_isAlterableView_nothrow( const ::rtl::OUString& _rTableOrViewName ) const;
406 /** does the macro/script migration, where macros/scripts in forms/reports are moved
407 to the database document itself.
409 void impl_migrateScripts_nothrow();
411 /** verifies the object type denotes a valid DatabaseObject, and the object name denotes an existing
412 object of this type. Throws if not.
414 void impl_validateObjectTypeAndName_throw( const sal_Int32 _nObjectType, const ::boost::optional< ::rtl::OUString >& i_rObjectName );
416 protected:
417 // ----------------------------------------------------------------
418 // initalizing members
419 /** forces usage of a connection which we do not own
420 <p>To be used from within XInitialization::initialize only.</p>
422 void initializeConnection( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxForeignConn );
424 // 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.
425 virtual FeatureState GetState(sal_uInt16 nId) const;
426 // execute a feature
427 virtual void Execute(sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
429 // OGenericUnoController
430 virtual void onLoadedMenu( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager >& _xLayoutManager );
432 virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > getPrivateModel() const
434 return m_xModel;
437 virtual ~OApplicationController();
439 public:
440 OApplicationController(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
442 DECLARE_XINTERFACE( )
443 DECLARE_XTYPEPROVIDER( )
445 // XServiceInfo
446 virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
447 virtual ::com::sun::star::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
448 // need by registration
449 static ::rtl::OUString getImplementationName_Static() throw( ::com::sun::star::uno::RuntimeException );
450 static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void) throw( ::com::sun::star::uno::RuntimeException );
451 static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
452 SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
454 // ::com::sun::star::frame::XController
455 virtual void SAL_CALL attachFrame(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & xFrame) throw( ::com::sun::star::uno::RuntimeException );
456 virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) throw( ::com::sun::star::uno::RuntimeException );
457 virtual sal_Bool SAL_CALL attachModel(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xModel) throw( ::com::sun::star::uno::RuntimeException );
458 virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > SAL_CALL getModel(void) throw( ::com::sun::star::uno::RuntimeException );
460 // ::com::sun::star::container::XContainerListener
461 virtual void SAL_CALL elementInserted(const ::com::sun::star::container::ContainerEvent& Event) throw( ::com::sun::star::uno::RuntimeException );
462 virtual void SAL_CALL elementRemoved(const ::com::sun::star::container::ContainerEvent& Event) throw( ::com::sun::star::uno::RuntimeException );
463 virtual void SAL_CALL elementReplaced(const ::com::sun::star::container::ContainerEvent& Event) throw( ::com::sun::star::uno::RuntimeException );
465 // XPropertyChangeListener
466 virtual void SAL_CALL propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw (::com::sun::star::uno::RuntimeException);
468 // XDatabaseDocumentUI
469 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource > SAL_CALL getDataSource() throw (::com::sun::star::uno::RuntimeException);
470 virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL getApplicationMainWindow() throw (::com::sun::star::uno::RuntimeException);
471 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > SAL_CALL getActiveConnection() throw (::com::sun::star::uno::RuntimeException);
472 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);
473 virtual ::sal_Bool SAL_CALL isConnected( ) throw (::com::sun::star::uno::RuntimeException);
474 virtual void SAL_CALL connect( ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
475 virtual ::com::sun::star::beans::Pair< ::sal_Int32, ::rtl::OUString > SAL_CALL identifySubComponent( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& SubComponent ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
476 virtual ::sal_Bool SAL_CALL closeSubComponents( ) throw (::com::sun::star::uno::RuntimeException);
477 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);
478 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);
479 virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > SAL_CALL createComponent( ::sal_Int32 ObjectType, ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& o_DocumentDefinition ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
480 virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > SAL_CALL createComponentWithArguments( ::sal_Int32 ObjectType, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Arguments, ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent >& o_DocumentDefinition ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
482 // XContextMenuInterception
483 virtual void SAL_CALL registerContextMenuInterceptor( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XContextMenuInterceptor >& Interceptor ) throw (::com::sun::star::uno::RuntimeException);
484 virtual void SAL_CALL releaseContextMenuInterceptor( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::XContextMenuInterceptor >& Interceptor ) throw (::com::sun::star::uno::RuntimeException);
486 // XSelectionSupplier
487 virtual ::sal_Bool SAL_CALL select( const ::com::sun::star::uno::Any& xSelection ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
488 virtual ::com::sun::star::uno::Any SAL_CALL getSelection( ) throw (::com::sun::star::uno::RuntimeException);
489 virtual void SAL_CALL addSelectionChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
490 virtual void SAL_CALL removeSelectionChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
492 /** retrieves the current connection, creates it if necessary
494 If an error occurs, then this is either stored in the location pointed to by <arg>_pErrorInfo</arg>,
495 or, if <code>_pErrorInfo</code> is <NULL/>, then the error is displayed to the user.
497 const SharedConnection& ensureConnection( ::dbtools::SQLExceptionInfo* _pErrorInfo = NULL );
499 /** retrieves the current connection
501 const SharedConnection& getConnection() const { return m_xDataSourceConnection; }
503 /// determines whether we're currently connected to the database
504 bool isConnected() const { return m_xDataSourceConnection.is(); }
506 const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >&
507 getConnectionMetaData() const { return m_xMetaData; }
509 /** refreshes the tables
511 void refreshTables();
513 // IApplicationController
514 virtual bool onEntryDoubleClick(SvTreeListBox& _rTree);
515 virtual sal_Bool onContainerSelect(ElementType _eType);
516 virtual void onSelectionChanged();
517 virtual void onCutEntry();
518 virtual void onCopyEntry();
519 virtual void onPasteEntry();
520 virtual void onDeleteEntry();
521 virtual void previewChanged( sal_Int32 _nMode);
522 virtual void containerFound( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainer >& _xContainer);
524 // IController (base of IApplicationController)
525 virtual void executeUnChecked(const ::com::sun::star::util::URL& _rCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
526 virtual void executeChecked(const ::com::sun::star::util::URL& _rCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
527 virtual void executeUnChecked(sal_uInt16 _nCommandId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
528 virtual void executeChecked(sal_uInt16 _nCommandId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs);
529 virtual sal_Bool isCommandEnabled(sal_uInt16 _nCommandId) const;
530 virtual sal_Bool isCommandEnabled( const ::rtl::OUString& _rCompleteCommandURL ) const;
531 virtual sal_uInt16 registerCommandURL( const ::rtl::OUString& _rCompleteCommandURL );
532 virtual void notifyHiContrastChanged();
533 virtual sal_Bool isDataSourceReadOnly() const;
534 virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController >
535 getXController(void) throw( ::com::sun::star::uno::RuntimeException );
536 virtual bool interceptUserInput( const NotifyEvent& _rEvent );
538 // IControlActionListener overridables
539 virtual sal_Bool requestQuickHelp( const SvLBoxEntry* _pEntry, String& _rText ) const;
540 virtual sal_Bool requestDrag( sal_Int8 _nAction, const Point& _rPosPixel );
541 virtual sal_Int8 queryDrop( const AcceptDropEvent& _rEvt, const DataFlavorExVector& _rFlavors );
542 virtual sal_Int8 executeDrop( const ExecuteDropEvent& _rEvt );
544 // IContextMenuProvider (base of IApplicationController)
545 virtual PopupMenu* getContextMenu( Control& _rControl ) const;
546 virtual IController& getCommandController();
547 virtual ::cppu::OInterfaceContainerHelper*
548 getContextMenuInterceptors();
549 virtual ::com::sun::star::uno::Any
550 getCurrentSelection( Control& _rControl ) const;
552 void OnInvalidateClipboard();
553 DECL_LINK( OnClipboardChanged, void* );
554 DECL_LINK( OnAsyncDrop, void* );
555 DECL_LINK( OnCreateWithPilot, void* );
556 DECL_LINK( OnSelectContainer, void* );
557 DECL_LINK( OnFirstControllerConnected, void* );
559 protected:
560 using OApplicationController_CBASE::connect;
562 /** disconnects from our XConnection, and cleans up this connection
564 virtual void disconnect();
566 // late construction
567 virtual sal_Bool Construct(Window* pParent);
568 virtual void describeSupportedFeatures();
570 protected:
571 // XEventListener
572 virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException );
574 // OComponentHelper
575 virtual void SAL_CALL disposing();
578 //........................................................................
579 } // namespace dbaui
580 //........................................................................
582 #endif // DBAUI_APPCONTROLLER_HXX
584 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */