LibreOffice Module dbaccess (master) 1
Public Types | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
dbaui::OApplicationController Class Reference

#include <AppController.hxx>

Inheritance diagram for dbaui::OApplicationController:
[legend]
Collaboration diagram for dbaui::OApplicationController:
[legend]

Public Types

typedef std::vector< css::uno::Reference< css::container::XContainer > > TContainerVector
 

Public Member Functions

 OApplicationController (const css::uno::Reference< css::uno::XComponentContext > &_rxORB)
 
virtual OUString SAL_CALL getImplementationName () override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
virtual void SAL_CALL attachFrame (const css::uno::Reference< css::frame::XFrame > &xFrame) override
 
virtual sal_Bool SAL_CALL suspend (sal_Bool bSuspend) override
 
virtual sal_Bool SAL_CALL attachModel (const css::uno::Reference< css::frame::XModel > &xModel) override
 
virtual css::uno::Reference< css::frame::XModel > SAL_CALL getModel () override
 
virtual void SAL_CALL elementInserted (const css::container::ContainerEvent &Event) override
 
virtual void SAL_CALL elementRemoved (const css::container::ContainerEvent &Event) override
 
virtual void SAL_CALL elementReplaced (const css::container::ContainerEvent &Event) override
 
virtual void SAL_CALL propertyChange (const css::beans::PropertyChangeEvent &evt) override
 
virtual css::uno::Reference< css::sdbc::XDataSource > SAL_CALL getDataSource () override
 
virtual css::uno::Reference< css::awt::XWindow > SAL_CALL getApplicationMainWindow () override
 
virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL getActiveConnection () override
 
virtual css::uno::Sequence< css::uno::Reference< css::lang::XComponent > > SAL_CALL getSubComponents () override
 
virtual sal_Bool SAL_CALL isConnected () override
 
virtual void SAL_CALL connect () override
 
virtual css::beans::Pair< ::sal_Int32, OUString > SAL_CALL identifySubComponent (const css::uno::Reference< css::lang::XComponent > &SubComponent) override
 
virtual sal_Bool SAL_CALL closeSubComponents () override
 
virtual css::uno::Reference< css::lang::XComponent > SAL_CALL loadComponent (::sal_Int32 ObjectType, const OUString &ObjectName, sal_Bool ForEditing) override
 
virtual css::uno::Reference< css::lang::XComponent > SAL_CALL loadComponentWithArguments (::sal_Int32 ObjectType, const OUString &ObjectName, sal_Bool ForEditing, const css::uno::Sequence< css::beans::PropertyValue > &Arguments) override
 
virtual css::uno::Reference< css::lang::XComponent > SAL_CALL createComponent (::sal_Int32 ObjectType, css::uno::Reference< css::lang::XComponent > &o_DocumentDefinition) override
 
virtual css::uno::Reference< css::lang::XComponent > SAL_CALL createComponentWithArguments (::sal_Int32 ObjectType, const css::uno::Sequence< css::beans::PropertyValue > &Arguments, css::uno::Reference< css::lang::XComponent > &o_DocumentDefinition) override
 
virtual void SAL_CALL registerContextMenuInterceptor (const css::uno::Reference< css::ui::XContextMenuInterceptor > &Interceptor) override
 
virtual void SAL_CALL releaseContextMenuInterceptor (const css::uno::Reference< css::ui::XContextMenuInterceptor > &Interceptor) override
 
virtual sal_Bool SAL_CALL select (const css::uno::Any &xSelection) override
 
virtual css::uno::Any SAL_CALL getSelection () override
 
virtual void SAL_CALL addSelectionChangeListener (const css::uno::Reference< css::view::XSelectionChangeListener > &xListener) override
 
virtual void SAL_CALL removeSelectionChangeListener (const css::uno::Reference< css::view::XSelectionChangeListener > &xListener) override
 
const SharedConnectionensureConnection (::dbtools::SQLExceptionInfo *_pErrorInfo=nullptr)
 retrieves the current connection, creates it if necessary More...
 
const SharedConnectiongetConnection () const
 retrieves the current connection More...
 
bool isConnected () const
 determines whether we're currently connected to the database More...
 
void refreshTables ()
 refreshes the tables More...
 
bool onEntryDoubleClick (const weld::TreeView &rTree)
 called when an entry in a tree list box has been double-clicked More...
 
bool onContainerSelect (ElementType _eType)
 called when a container (category) in the application view has been selected More...
 
void onSelectionChanged ()
 called when an entry in a tree view has been selected More...
 
void onCopyEntry ()
 called when a "Copy" command is executed in a tree view More...
 
void onPasteEntry ()
 called when a "Paste" command is executed in a tree view More...
 
void onDeleteEntry ()
 called when a "Delete" command is executed in a tree view More...
 
void previewChanged (sal_Int32 _nMode)
 called when the preview mode was changed More...
 
void containerFound (const css::uno::Reference< css::container::XContainer > &_xContainer)
 called when an object container of any kind was found during enumerating tree view elements More...
 
virtual bool isDataSourceReadOnly () const override
 checks if the selected data source is read only More...
 
virtual bool requestQuickHelp (const void *pUserData, OUString &rText) const override
 requests a quick help text to display More...
 
virtual bool requestDrag (const weld::TreeIter &rEntry) override
 handler for StartDrag requests More...
 
virtual sal_Int8 queryDrop (const AcceptDropEvent &_rEvt, const DataFlavorExVector &_rFlavors) override
 check whether or not a drop request should be accepted More...
 
virtual sal_Int8 executeDrop (const ExecuteDropEvent &_rEvt) override
 execute a drop request More...
 
virtual OUString getContextMenuResourceName () const override
 returns the context menu resource name for the control More...
 
virtual IControllergetCommandController () override
 returns the controller which is responsible for providing states of certain features, and executing them. More...
 
virtual ::comphelper::OInterfaceContainerHelper2getContextMenuInterceptors () override
 returns the container of registered context menu interceptors, or NULL if the implementation does not support context menu interception More...
 
virtual css::uno::Any getCurrentSelection (weld::TreeView &rControl) const override
 returns the current selection in the given control More...
 
virtual vcl::WindowgetMenuParent () const override
 
virtual void adjustMenuPosition (const weld::TreeView &rControl, ::Point &rPos) const override
 adjust rPos which is initially relative to rControl to be relative to the window of getMenuParent More...
 
void OnInvalidateClipboard ()
 
 DECL_LINK (OnClipboardChanged, TransferableDataHelper *, void)
 
 DECL_LINK (OnAsyncDrop, void *, void)
 
 DECL_LINK (OnCreateWithPilot, void *, void)
 
 DECL_LINK (OnSelectContainer, void *, void)
 
void OnFirstControllerConnected ()
 
- Public Member Functions inherited from dbaui::OGenericUnoController
const css::uno::Reference< css::uno::XComponentContext > & getORB () const
 
ODataViewgetView () const
 
weld::WindowgetFrameWeld () const
 
void setView (const VclPtr< ODataView > &i_rView)
 
void clearView ()
 
void showError (const ::dbtools::SQLExceptionInfo &_rInfo)
 
void InvalidateFeature (sal_uInt16 nId, const css::uno::Reference< css::frame::XStatusListener > &xListener=nullptr, bool _bForceBroadcast=false)
 
void InvalidateAll ()
 InvalidateAll invalidates all features currently known. More...
 
virtual bool Construct (vcl::Window *pParent)
 
virtual void executeUnChecked (const css::util::URL &_rCommand, const css::uno::Sequence< css::beans::PropertyValue > &aArgs) override
 executes the given command without checking if it is allowed More...
 
virtual void executeChecked (const css::util::URL &_rCommand, const css::uno::Sequence< css::beans::PropertyValue > &aArgs) override
 executes the given command only when it is allowed More...
 
virtual void executeUnChecked (sal_uInt16 _nCommandId, const css::uno::Sequence< css::beans::PropertyValue > &aArgs) override
 executes the given command without checking if it is allowed More...
 
virtual void executeChecked (sal_uInt16 _nCommandId, const css::uno::Sequence< css::beans::PropertyValue > &aArgs) override
 executes the given command only when it is allowed More...
 
virtual bool isCommandEnabled (sal_uInt16 _nCommandId) const override
 checks if the given Command is enabled More...
 
virtual bool isCommandEnabled (const OUString &_rCompleteCommandURL) const override
 checks if the given Command is enabled More...
 
virtual bool isDataSourceReadOnly () const override
 checks if the selected data source is read only More...
 
virtual css::uno::Reference< css::frame::XController > getXController () override
 provides access to the model of the controller More...
 
virtual bool interceptUserInput (const NotifyEvent &_rEvent) override
 allows interception of user input, aka mouse clicks and key events More...
 
bool isCommandChecked (sal_uInt16 _nCommandId) const
 
virtual void SAL_CALL disposing (const css::lang::EventObject &Source) override
 
virtual void SAL_CALL modified (const css::lang::EventObject &aEvent) override
 
virtual void SAL_CALL acquire () noexcept override
 
virtual void SAL_CALL release () noexcept override
 
virtual css::uno::Reference< css::awt::XWindow > SAL_CALL getComponentWindow () override
 
virtual OUString SAL_CALL getViewControllerName () override
 
virtual css::uno::Sequence< css::beans::PropertyValue > SAL_CALL getCreationArguments () override
 
virtual css::uno::Reference< css::ui::XSidebarProvider > SAL_CALL getSidebar () override
 
virtual void SAL_CALL attachFrame (const css::uno::Reference< css::frame::XFrame > &xFrame) override
 
virtual sal_Bool SAL_CALL attachModel (const css::uno::Reference< css::frame::XModel > &xModel) override
 
virtual sal_Bool SAL_CALL suspend (sal_Bool bSuspend) override=0
 
virtual css::uno::Any SAL_CALL getViewData () override
 
virtual void SAL_CALL restoreViewData (const css::uno::Any &Data) override
 
virtual css::uno::Reference< css::frame::XModel > SAL_CALL getModel () override
 
virtual css::uno::Reference< css::frame::XFrame > SAL_CALL getFrame () override
 
virtual void SAL_CALL dispatch (const css::util::URL &aURL, const css::uno::Sequence< css::beans::PropertyValue > &aArgs) override
 
virtual void SAL_CALL addStatusListener (const css::uno::Reference< css::frame::XStatusListener > &aListener, const css::util::URL &aURL) override
 
virtual void SAL_CALL removeStatusListener (const css::uno::Reference< css::frame::XStatusListener > &aListener, const css::util::URL &aURL) override
 
virtual css::uno::Reference< css::frame::XDispatchProvider > SAL_CALL getSlaveDispatchProvider () override
 
virtual void SAL_CALL setSlaveDispatchProvider (const css::uno::Reference< css::frame::XDispatchProvider > &_xNewProvider) override
 
virtual css::uno::Reference< css::frame::XDispatchProvider > SAL_CALL getMasterDispatchProvider () override
 
virtual void SAL_CALL setMasterDispatchProvider (const css::uno::Reference< css::frame::XDispatchProvider > &_xNewProvider) override
 
virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch (const css::util::URL &aURL, const OUString &aTargetFrameName, sal_Int32 nSearchFlags) override
 
virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches (const css::uno::Sequence< css::frame::DispatchDescriptor > &aDescripts) override
 
virtual void SAL_CALL dispose () override
 
virtual void SAL_CALL disposing () override
 
virtual void SAL_CALL addEventListener (const css::uno::Reference< css::lang::XEventListener > &aListener) override
 
virtual void SAL_CALL removeEventListener (const css::uno::Reference< css::lang::XEventListener > &aListener) override
 
virtual void SAL_CALL frameAction (const css::frame::FrameActionEvent &aEvent) override
 
virtual void SAL_CALL initialize (const css::uno::Sequence< css::uno::Any > &aArguments) override
 
virtual OUString SAL_CALL getImplementationName () override=0
 
virtual sal_Bool SAL_CALL supportsService (const OUString &ServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override=0
 
virtual css::uno::Sequence< ::sal_Int16 > SAL_CALL getSupportedCommandGroups () override
 
virtual css::uno::Sequence< css::frame::DispatchInformation > SAL_CALL getConfigurableDispatchInformation (::sal_Int16) override
 
virtual OUString SAL_CALL getTitle () override
 
virtual void SAL_CALL setTitle (const OUString &sTitle) override
 
virtual void SAL_CALL addTitleChangeListener (const css::uno::Reference< css::frame::XTitleChangeListener > &xListener) override
 
virtual void SAL_CALL removeTitleChangeListener (const css::uno::Reference< css::frame::XTitleChangeListener > &xListener) override
 
virtual void SAL_CALL addKeyHandler (const css::uno::Reference< css::awt::XKeyHandler > &xHandler) override
 
virtual void SAL_CALL removeKeyHandler (const css::uno::Reference< css::awt::XKeyHandler > &xHandler) override
 
virtual void SAL_CALL addMouseClickHandler (const css::uno::Reference< css::awt::XMouseClickHandler > &xHandler) override
 
virtual void SAL_CALL removeMouseClickHandler (const css::uno::Reference< css::awt::XMouseClickHandler > &xHandler) override
 
virtual void executeUnChecked (const css::util::URL &_rCommand, const css::uno::Sequence< css::beans::PropertyValue > &aArgs)=0
 executes the given command without checking if it is allowed More...
 
virtual void executeChecked (const css::util::URL &_rCommand, const css::uno::Sequence< css::beans::PropertyValue > &aArgs)=0
 executes the given command only when it is allowed More...
 
virtual void executeUnChecked (sal_uInt16 _nCommandId, const css::uno::Sequence< css::beans::PropertyValue > &aArgs)=0
 executes the given command without checking if it is allowed More...
 
virtual void executeChecked (sal_uInt16 _nCommandId, const css::uno::Sequence< css::beans::PropertyValue > &aArgs)=0
 executes the given command only when it is allowed More...
 
virtual bool isCommandEnabled (sal_uInt16 _nCommandId) const =0
 checks if the given Command is enabled More...
 
virtual bool isCommandEnabled (const OUString &_rCompleteCommandURL) const =0
 checks if the given Command is enabled More...
 
virtual bool isDataSourceReadOnly () const =0
 checks if the selected data source is read only More...
 
virtual css::uno::Reference< css::frame::XController > getXController ()=0
 provides access to the model of the controller More...
 
virtual bool interceptUserInput (const NotifyEvent &_rEvent)=0
 allows interception of user input, aka mouse clicks and key events More...
 
virtual void SAL_CALL acquire () noexcept=0
 
virtual void SAL_CALL release () noexcept=0
 
- Public Member Functions inherited from cppu::ImplHelper5< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 >
virtual css::uno::Any SAL_CALL queryInterface (css::uno::Type const &rType) SAL_OVERRIDE
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () SAL_OVERRIDE
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () SAL_OVERRIDE
 
virtual bool requestQuickHelp (const void *pUserData, OUString &rText) const =0
 requests a quick help text to display More...
 
virtual bool requestDrag (const weld::TreeIter &rEntry)=0
 handler for StartDrag requests More...
 
virtual sal_Int8 queryDrop (const AcceptDropEvent &_rEvt, const DataFlavorExVector &_rFlavors)=0
 check whether or not a drop request should be accepted More...
 
virtual sal_Int8 executeDrop (const ExecuteDropEvent &_rEvt)=0
 execute a drop request More...
 
virtual OUString getContextMenuResourceName () const =0
 returns the context menu resource name for the control More...
 
virtual IControllergetCommandController ()=0
 returns the controller which is responsible for providing states of certain features, and executing them. More...
 
virtual ::comphelper::OInterfaceContainerHelper2getContextMenuInterceptors ()=0
 returns the container of registered context menu interceptors, or NULL if the implementation does not support context menu interception More...
 
virtual css::uno::Any getCurrentSelection (weld::TreeView &rControl) const =0
 returns the current selection in the given control More...
 
virtual vcl::WindowgetMenuParent () const =0
 
virtual void adjustMenuPosition (const weld::TreeView &rControl, ::Point &rPos) const =0
 adjust rPos which is initially relative to rControl to be relative to the window of getMenuParent More...
 

Protected Member Functions

virtual FeatureState GetState (sal_uInt16 nId) const override
 
virtual void Execute (sal_uInt16 nId, const css::uno::Sequence< css::beans::PropertyValue > &aArgs) override
 
virtual void onLoadedMenu (const css::uno::Reference< css::frame::XLayoutManager > &_xLayoutManager) override
 called when our menu has been loaded into our frame, can be used to load sub toolbars More...
 
virtual css::uno::Reference< css::frame::XModel > getPrivateModel () const override
 
virtual ~OApplicationController () override
 
void disconnect ()
 disconnects from our XConnection, and cleans up this connection More...
 
virtual bool Construct (vcl::Window *pParent) override
 
virtual void describeSupportedFeatures () override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &Source) override
 
virtual void SAL_CALL disposing () override
 
css::uno::Reference< css::sdbc::XConnection > connect (const css::uno::Reference< css::sdbc::XDataSource > &_xDataSource)
 
css::uno::Reference< css::sdbc::XConnection > connect (const OUString &_rsDataSourceName, const OUString &_rContextInformation, ::dbtools::SQLExceptionInfo *_pErrorInfo)
 
- Protected Member Functions inherited from dbaui::OGenericUnoController
::cppu::OBroadcastHelpergetBroadcastHelper ()
 
 OGenericUnoController (const css::uno::Reference< css::uno::XComponentContext > &_rM)
 
 OGenericUnoController ()=delete
 
const ::comphelper::NamedValueCollectiongetInitParams () const
 
void closeTask ()
 
virtual void loadMenu (const css::uno::Reference< css::frame::XFrame > &_xFrame)
 
virtual void onLoadedMenu (const css::uno::Reference< css::frame::XLayoutManager > &_xLayoutManager)
 called when our menu has been loaded into our frame, can be used to load sub toolbars More...
 
virtual void describeSupportedFeatures ()
 
virtual FeatureState GetState (sal_uInt16 nId) const
 
virtual void Execute (sal_uInt16 nId, const css::uno::Sequence< css::beans::PropertyValue > &aArgs)
 
void implDescribeSupportedFeature (const OUString &_rCommandURL, sal_uInt16 _nFeatureId, sal_Int16 _nCommandGroup=css::frame::CommandGroup::INTERNAL)
 describes a feature supported by the controller More...
 
bool isFeatureSupported (sal_Int32 _nId)
 returns <TRUE> if the feature is supported, otherwise <FALSE> More...
 
css::util::URL getURLForId (sal_Int32 _nId) const
 
bool isUserDefinedFeature (const OUString &_rFeatureURL) const
 determines whether the given feature URL denotes a user-defined feature More...
 
css::uno::Reference< css::sdbc::XConnection > connect (const css::uno::Reference< css::sdbc::XDataSource > &_xDataSource)
 
css::uno::Reference< css::sdbc::XConnection > connect (const OUString &_rsDataSourceName, const OUString &_rContextInformation, ::dbtools::SQLExceptionInfo *_pErrorInfo)
 
void startConnectionListening (const css::uno::Reference< css::sdbc::XConnection > &_rxConnection)
 
void stopConnectionListening (const css::uno::Reference< css::sdbc::XConnection > &_rxConnection)
 
css::uno::Reference< css::awt::XWindow > getTopMostContainerWindow () const
 return the container window of the top most frame More...
 
virtual void impl_initialize ()
 
virtual OUString getPrivateTitle () const
 
css::uno::Reference< css::frame::XTitle > impl_getTitleHelper_throw (bool bCreateIfNecessary=true)
 
virtual css::uno::Reference< css::frame::XModel > getPrivateModel () const
 
virtual void startFrameListening (const css::uno::Reference< css::frame::XFrame > &_rxFrame)
 
virtual void stopFrameListening (const css::uno::Reference< css::frame::XFrame > &_rxFrame)
 
void releaseNumberForComponent ()
 
virtual ~OGenericUnoController () override
 
::osl::Mutex & getMutex () const
 
- Protected Member Functions inherited from comphelper::SharedMutexBase
 SharedMutexBase ()
 
 ~SharedMutexBase ()
 
::osl::Mutex & getMutex () const
 
SharedMutexgetSharedMutex () const
 
- Protected Member Functions inherited from dbaui::IController
 ~IController ()
 
- Protected Member Functions inherited from cppu::ImplHelper5< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 >
 ~ImplHelper5 () SAL_NOEXCEPT
 
- Protected Member Functions inherited from dbaui::IControlActionListener
 ~IControlActionListener ()
 
- Protected Member Functions inherited from dbaui::IContextMenuProvider
 ~IContextMenuProvider ()
 

Private Types

typedef std::map< ElementType, std::vector< OUString > > SelectionByElementType
 

Private Member Functions

OApplicationViewgetContainer () const
 
OUString getDatabaseName () const
 returns the database name More...
 
OUString getStrippedDatabaseName () const
 returns the stripped database name. More...
 
css::uno::Reference< css::lang::XComponent > openElementWithArguments (const OUString &_sName, ElementType _eType, ElementOpenMode _eOpenMode, sal_uInt16 _nInstigatorCommand, const ::comphelper::NamedValueCollection &_rAdditionalArguments)
 opens a new sub frame with a table/query/form/report/view, passing additional arguments More...
 
css::uno::Reference< css::lang::XComponent > newElement (ElementType _eType, const ::comphelper::NamedValueCollection &i_rAdditionalArguments, css::uno::Reference< css::lang::XComponent > &o_rDocumentDefinition)
 opens a new frame for creation or auto pilot More...
 
void newElementWithPilot (ElementType _eType)
 creates a new database object, using an auto pilot More...
 
void convertToView (const OUString &_sName)
 converts the query to a view More...
 
bool isConnectionReadOnly () const
 checks if the connection for the selected data source is read only. More...
 
void getSelectionElementNames (std::vector< OUString > &_rNames) const
 fills the list with the selected entries. More...
 
void deleteEntries ()
 deletes the entries selected. More...
 
void renameEntry ()
 renames the selected entry in the detail page More...
 
void deleteObjects (ElementType _eType, const std::vector< OUString > &_rList, bool _bConfirm)
 deletes queries, forms, or reports More...
 
void deleteTables (const std::vector< OUString > &_rList)
 deletes tables. More...
 
rtl::Reference< TransferableHelpercopyObject ()
 copies the current object into clipboard More...
 
bool copySQLObject (ODataClipboard &rExchange)
 fills rExchange with current object if it's a Table or Query More...
 
bool copyDocObject (svx::OComponentTransferable &rExchange)
 fills rExchange with current object if it's a Form or Report More...
 
css::uno::Reference< css::container::XNameAccess > getElements (ElementType _eType)
 returns the nameaccess More...
 
std::unique_ptr< OLinkedDocumentsAccessgetDocumentsAccess (ElementType _eType)
 returns the document access for the specific type More...
 
css::uno::Reference< css::container::XNameContainer > getQueryDefinitions () const
 returns the query definitions of the active data source. More...
 
void pasteFormat (SotClipboardFormatId _nFormatId)
 pastes a special format from the system clipboard to the currently selected object types More...
 
bool paste (ElementType _eType, const svx::ODataAccessDescriptor &_rPasteData, const OUString &_sParentFolder=OUString(), bool _bMove=false)
 pastes a query, form or report into the data source More...
 
const TransferableDataHelpergetViewClipboard () const
 returns the system clipboard. More...
 
bool isTableFormat () const
 returns <TRUE> if the clipboard supports a table format, otherwise <FALSE>. More...
 
void addContainerListener (const css::uno::Reference< css::container::XNameAccess > &_xCollection)
 adds a listener to the current name access. More...
 
void openDialog (const OUString &_sServiceName)
 opens a uno dialog with the currently selected data source as initialize argument More...
 
void askToReconnect ()
 when the settings of the data source changed, it opens a dialog which ask to close all depending documents, then recreate the connection. More...
 
void onDocumentOpened (const OUString &_rName, const sal_Int32 _nType, const ElementOpenMode _eMode, const css::uno::Reference< css::lang::XComponent > &_xDocument, const css::uno::Reference< css::lang::XComponent > &_xDefinition)
 remember a newly opened sub document for later access More...
 
bool insertHierarchyElement (ElementType _eType, const OUString &_sParentFolder, bool _bCollection=true, const css::uno::Reference< css::ucb::XContent > &_xContent=css::uno::Reference< css::ucb::XContent >(), bool _bMove=false)
 Inserts a new object into the hierarchy given be the type. More...
 
bool isRenameDeleteAllowed (ElementType _eType, bool _bDelete) const
 checks if delete command or rename command is allowed More...
 
void doAction (sal_uInt16 _nId, ElementOpenMode _eOpenMode)
 all selected entries will be opened, or edited, or converted to a view More...
 
OUString getCurrentlySelectedName (sal_Int32 &_rnCommandType) const
 returns the currently selected table or query name. More...
 
void showPreviewFor (const ElementType _eType, const OUString &_sName)
 shows the preview for the given entry More...
 
void onAttachedFrame ()
 called we were attached to a frame More...
 
bool impl_isAlterableView_nothrow (const OUString &_rTableOrViewName) const
 determines whether the given table name denotes a view which can be altered More...
 
void impl_validateObjectTypeAndName_throw (const sal_Int32 _nObjectType, const ::std::optional< OUString > &i_rObjectName)
 verifies the object type denotes a valid DatabaseObject, and the object name denotes an existing object of this type. More...
 

Static Private Member Functions

static ElementType getElementType (const css::uno::Reference< css::container::XContainer > &_xContainer)
 return the element type for given container More...
 
static void getSupportedFormats (ElementType _eType, std::vector< SotClipboardFormatId > &_rFormatIds)
 fills the vector with all supported formats More...
 

Private Attributes

OTableCopyHelper::DropDescriptor m_aAsyncDrop
 
SharedConnection m_xDataSourceConnection
 
css::uno::Reference< css::sdbc::XDatabaseMetaData > m_xMetaData
 
TransferableDataHelper m_aSystemClipboard
 
css::uno::Reference< css::beans::XPropertySetm_xDataSource
 
css::uno::Reference< css::frame::XModel > m_xModel
 
::comphelper::OInterfaceContainerHelper2 m_aContextMenuInterceptors
 
TContainerVector m_aCurrentContainers
 
::rtl::Reference< SubComponentManagerm_pSubComponentManager
 
::dbaccess::ODsnTypeCollection m_aTypeCollection
 
OTableCopyHelper m_aTableCopyHelper
 
rtl::Reference< TransferableClipboardListenerm_pClipboardNotifier
 
ImplSVEventm_nAsyncDrop
 
OAsynchronousLink m_aSelectContainerEvent
 
PreviewMode m_ePreviewMode
 
ElementType m_eCurrentType
 
bool m_bNeedToReconnect
 
bool m_bSuspended
 
std::unique_ptr< SelectionNotifierm_pSelectionNotifier
 
SelectionByElementType m_aPendingSelection
 

Additional Inherited Members

- Static Public Member Functions inherited from dbaui::OGenericUnoController
static css::uno::Reference< css::frame::XLayoutManager > getLayoutManager (const css::uno::Reference< css::frame::XFrame > &_xFrame)
 get the layout manager More...
 
- Protected Types inherited from dbaui::OGenericUnoController
typedef std::map< sal_uInt16, FeatureStateStateCache
 
typedef std::vector< DispatchTargetDispatch
 
- Static Protected Member Functions inherited from dbaui::OGenericUnoController
static bool isUserDefinedFeature (const sal_uInt16 nFeatureId)
 determines whether the given feature ID denotes a user-defined feature More...
 
- Protected Attributes inherited from dbaui::OGenericUnoController
::std::deque< FeatureListenerm_aFeaturesToInvalidate
 
std::mutex m_aFeatureMutex
 
StateCache m_aStateCache
 
Dispatch m_arrStatusListener
 
OAsynchronousLink m_aAsyncInvalidateAll
 
OAsynchronousLink m_aAsyncCloseTask
 
css::uno::Reference< css::util::XURLTransformer > m_xUrlTransformer
 
css::uno::Reference< css::uno::XComponentContext > m_xContext
 
ControllerFrame m_aCurrentFrame
 
css::uno::Reference< css::frame::XDispatchProvider > m_xSlaveDispatcher
 
css::uno::Reference< css::frame::XDispatchProvider > m_xMasterDispatcher
 
css::uno::Reference< css::sdb::XDatabaseContext > m_xDatabaseContext
 
css::uno::Reference< css::frame::XTitle > m_xTitleHelper
 
bool m_bPreview
 
bool m_bReadOnly
 
bool m_bCurrentlyModified: 1
 
bool m_bExternalTitle: 1
 

Detailed Description

Definition at line 85 of file AppController.hxx.

Member Typedef Documentation

◆ SelectionByElementType

typedef std::map< ElementType, std::vector< OUString > > dbaui::OApplicationController::SelectionByElementType
private

Definition at line 127 of file AppController.hxx.

◆ TContainerVector

typedef std::vector< css::uno::Reference< css::container::XContainer > > dbaui::OApplicationController::TContainerVector

Definition at line 92 of file AppController.hxx.

Constructor & Destructor Documentation

◆ ~OApplicationController()

dbaui::OApplicationController::~OApplicationController ( )
overrideprotectedvirtual

◆ OApplicationController()

dbaui::OApplicationController::OApplicationController ( const css::uno::Reference< css::uno::XComponentContext > &  _rxORB)
explicit

Definition at line 247 of file AppController.cxx.

References getMutex(), LINK, and NONE.

Member Function Documentation

◆ addContainerListener()

void dbaui::OApplicationController::addContainerListener ( const css::uno::Reference< css::container::XNameAccess > &  _xCollection)
private

adds a listener to the current name access.

Parameters
_xCollectionThe collection where we want to listen on.

Definition at line 1962 of file AppController.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, and m_aCurrentContainers.

Referenced by onContainerSelect().

◆ addSelectionChangeListener()

void SAL_CALL dbaui::OApplicationController::addSelectionChangeListener ( const css::uno::Reference< css::view::XSelectionChangeListener > &  xListener)
overridevirtual

Definition at line 2675 of file AppController.cxx.

References m_pSelectionNotifier.

◆ adjustMenuPosition()

void dbaui::OApplicationController::adjustMenuPosition ( const weld::TreeView rControl,
::Point rPos 
) const
overridevirtual

adjust rPos which is initially relative to rControl to be relative to the window of getMenuParent

Implements dbaui::IContextMenuProvider.

Definition at line 2275 of file AppController.cxx.

References dbaui::OApplicationView::adjustMenuPosition(), and getContainer().

◆ askToReconnect()

void dbaui::OApplicationController::askToReconnect ( )
private

when the settings of the data source changed, it opens a dialog which ask to close all depending documents, then recreate the connection.

The SolarMutex has to be locked before calling this.

Definition at line 503 of file AppControllerGen.cxx.

References dbaui::OApplicationDetailView::clearPages(), closeSubComponents(), Application::CreateMessageDialog(), DBA_RES, disconnect(), dbaui::E_NONE, eType, getContainer(), dbaui::OApplicationView::getDetailView(), dbaui::OApplicationView::getElementType(), dbaui::OGenericUnoController::getFrameWeld(), m_bNeedToReconnect, m_eCurrentType, m_pSubComponentManager, RET_YES, and dbaui::OApplicationView::selectContainer().

Referenced by Execute().

◆ attachFrame()

void SAL_CALL dbaui::OApplicationController::attachFrame ( const css::uno::Reference< css::frame::XFrame > &  xFrame)
overridevirtual

◆ attachModel()

sal_Bool SAL_CALL dbaui::OApplicationController::attachModel ( const css::uno::Reference< css::frame::XModel > &  xModel)
overridevirtual

◆ closeSubComponents()

sal_Bool SAL_CALL dbaui::OApplicationController::closeSubComponents ( )
overridevirtual

◆ connect() [1/3]

void SAL_CALL dbaui::OApplicationController::connect ( )
overridevirtual

◆ connect() [2/3]

css::uno::Reference< css::sdbc::XConnection > dbaui::OGenericUnoController::connect ( const css::uno::Reference< css::sdbc::XDataSource > &  _xDataSource)
protected

◆ connect() [3/3]

Reference< XConnection > dbaui::OGenericUnoController::connect ( const OUString &  _rsDataSourceName,
const OUString &  _rContextInformation,
::dbtools::SQLExceptionInfo _pErrorInfo 
)
protected

Definition at line 335 of file genericcontroller.cxx.

References Any.

◆ Construct()

bool dbaui::OApplicationController::Construct ( vcl::Window pParent)
overrideprotectedvirtual

◆ containerFound()

void dbaui::OApplicationController::containerFound ( const css::uno::Reference< css::container::XContainer > &  _xContainer)

called when an object container of any kind was found during enumerating tree view elements

Definition at line 2638 of file AppController.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, and m_aCurrentContainers.

Referenced by elementInserted(), and dbaui::OAppDetailPageHelper::fillNames().

◆ convertToView()

void dbaui::OApplicationController::convertToView ( const OUString &  _sName)
private

◆ copyDocObject()

bool dbaui::OApplicationController::copyDocObject ( svx::OComponentTransferable rExchange)
private

◆ copyObject()

rtl::Reference< TransferableHelper > dbaui::OApplicationController::copyObject ( )
private

◆ copySQLObject()

bool dbaui::OApplicationController::copySQLObject ( ODataClipboard rExchange)
private

◆ createComponent()

Reference< XComponent > SAL_CALL dbaui::OApplicationController::createComponent ( ::sal_Int32  ObjectType,
css::uno::Reference< css::lang::XComponent > &  o_DocumentDefinition 
)
overridevirtual

Definition at line 444 of file AppControllerGen.cxx.

References createComponentWithArguments().

◆ createComponentWithArguments()

Reference< XComponent > SAL_CALL dbaui::OApplicationController::createComponentWithArguments ( ::sal_Int32  ObjectType,
const css::uno::Sequence< css::beans::PropertyValue > &  Arguments,
css::uno::Reference< css::lang::XComponent > &  o_DocumentDefinition 
)
overridevirtual

◆ DECL_LINK() [1/4]

dbaui::OApplicationController::DECL_LINK ( OnAsyncDrop  ,
void *  ,
void   
)

◆ DECL_LINK() [2/4]

dbaui::OApplicationController::DECL_LINK ( OnClipboardChanged  ,
TransferableDataHelper ,
void   
)

◆ DECL_LINK() [3/4]

dbaui::OApplicationController::DECL_LINK ( OnCreateWithPilot  ,
void *  ,
void   
)

◆ DECL_LINK() [4/4]

dbaui::OApplicationController::DECL_LINK ( OnSelectContainer  ,
void *  ,
void   
)

◆ deleteEntries()

void dbaui::OApplicationController::deleteEntries ( )
private

◆ deleteObjects()

void dbaui::OApplicationController::deleteObjects ( ElementType  _eType,
const std::vector< OUString > &  _rList,
bool  _bConfirm 
)
private

deletes queries, forms, or reports

Parameters
_eTypethe type of the objects
_rListThe names of the elements to delete
_bConfirmdetermines whether the user must confirm the deletion

Definition at line 165 of file AppControllerDnD.cxx.

References DBG_UNHANDLED_EXCEPTION, dbaui::E_QUERY, svtools::QueryDeleteDlg_Impl::EnableAllButton(), Exception, getElements(), dbaui::OGenericUnoController::getFrameWeld(), m_pSubComponentManager, nCount, svtools::QUERYDELETE_ALL, svtools::QUERYDELETE_YES, and dbaui::OGenericUnoController::showError().

Referenced by deleteEntries().

◆ deleteTables()

void dbaui::OApplicationController::deleteTables ( const std::vector< OUString > &  _rList)
private

◆ describeSupportedFeatures()

void dbaui::OApplicationController::describeSupportedFeatures ( )
overrideprotectedvirtual

◆ disconnect()

void dbaui::OApplicationController::disconnect ( )
protected

disconnects from our XConnection, and cleans up this connection

Definition at line 277 of file AppController.cxx.

References DBG_UNHANDLED_EXCEPTION, and Exception.

Referenced by askToReconnect(), and disposing().

◆ disposing() [1/2]

void SAL_CALL dbaui::OApplicationController::disposing ( )
overrideprotectedvirtual

◆ disposing() [2/2]

virtual void SAL_CALL dbaui::OApplicationController::disposing ( const css::lang::EventObject &  Source)
overrideprotectedvirtual

Reimplemented from dbaui::OGenericUnoController.

◆ doAction()

void dbaui::OApplicationController::doAction ( sal_uInt16  _nId,
ElementOpenMode  _eOpenMode 
)
private

◆ elementInserted()

void SAL_CALL dbaui::OApplicationController::elementInserted ( const css::container::ContainerEvent &  Event)
overridevirtual

◆ elementRemoved()

void SAL_CALL dbaui::OApplicationController::elementRemoved ( const css::container::ContainerEvent &  Event)
overridevirtual

◆ elementReplaced()

void SAL_CALL dbaui::OApplicationController::elementReplaced ( const css::container::ContainerEvent &  Event)
overridevirtual

◆ ensureConnection()

const SharedConnection & dbaui::OApplicationController::ensureConnection ( ::dbtools::SQLExceptionInfo _pErrorInfo = nullptr)

◆ Execute()

void dbaui::OApplicationController::Execute ( sal_uInt16  nId,
const css::uno::Sequence< css::beans::PropertyValue > &  aArgs 
)
overrideprotectedvirtual

Reimplemented from dbaui::OGenericUnoController.

Definition at line 931 of file AppController.cxx.

References sfx2::FileDialogHelper::AddFilter(), askToReconnect(), SfxMailModel::AttachDocument(), aURL, sfx2::FileDialogHelper::BaseSaveAs, dbaui::OAsynchronousLink::Call(), copyObject(), SvxAbstractDialogFactory::Create(), dbaui::DatabaseObjectView::createNew(), dbaui::OApplicationView::cut(), DBG_UNHANDLED_EXCEPTION, deleteEntries(), dbaui::Design, doAction(), dbaui::Document, dbaui::DocumentInfo, dbaui::E_FORM, dbaui::E_NONE, dbaui::E_QUERY, dbaui::E_REPORT, dbaui::E_TABLE, ensureConnection(), ERRCODE_NONE, eType, Exception, sfx2::FileDialogHelper::Execute(), dbaui::OGenericUnoController::Execute(), getContainer(), getDatabaseName(), getElements(), dbaui::OApplicationView::getElementType(), getElementType(), dbaui::ControllerFrame::getFrame(), dbaui::OGenericUnoController::getFrame(), dbaui::OGenericUnoController::getFrameWeld(), getModel(), dbaui::OGenericUnoController::getMutex(), dbaui::OGenericUnoController::getORB(), sfx2::FileDialogHelper::GetPath(), dbaui::OApplicationView::getQualifiedName(), getSelectionElementNames(), dbaui::getStandardDatabaseFilter(), getSupportedFormats(), TransferableDataHelper::GetTransferable(), dbaui::OGenericUnoController::getView(), getViewClipboard(), TransferableDataHelper::HasFormat(), ID_APP_NEW_QUERY_AUTO_PILOT, ID_BROWSER_COPY, ID_BROWSER_CUT, ID_BROWSER_PASTE, ID_BROWSER_SAVEASDOC, ID_BROWSER_SAVEDOC, ID_BROWSER_SORTDOWN, ID_BROWSER_SORTUP, ID_DIRECT_SQL, ID_DOCUMENT_CREATE_REPWIZ, ID_NEW_QUERY_DESIGN, ID_NEW_QUERY_SQL, ID_NEW_TABLE_DESIGN, ID_NEW_TABLE_DESIGN_AUTO_PILOT, ID_NEW_VIEW_DESIGN, ID_NEW_VIEW_DESIGN_AUTO_PILOT, insertHierarchyElement(), vcl::Window::Invalidate(), dbaui::OGenericUnoController::InvalidateAll(), dbaui::OGenericUnoController::InvalidateFeature(), utl::SharedUNOComponent< class INTERFACE, class COMPONENT >::is(), dbaui::OGenericUnoController::isUserDefinedFeature(), LINK, dbaui::OGenericUnoController::m_aCurrentFrame, m_aSelectContainerEvent, m_aTableCopyHelper, dbaui::OGenericUnoController::m_bCurrentlyModified, dbaui::OGenericUnoController::m_bReadOnly, m_ePreviewMode, m_pSubComponentManager, m_xDataSource, m_xModel, dbaui::OGenericUnoController::m_xUrlTransformer, dbaui::Mail, newElement(), dbaui::NONE, INetURLObject::NONE, dbaui::Normal, onDocumentOpened(), openDialog(), paste(), pasteFormat(), dbaui::OTableCopyHelper::pasteTable(), vcl::Window::PostUserEvent(), PROPERTY_GRAPHICAL_DESIGN(), comphelper::NamedValueCollection::put(), refreshTables(), renameEntry(), dbaui::OTableCopyHelper::ResetTableNameForAppend(), dbaui::OApplicationView::selectAll(), dbaui::OApplicationView::selectContainer(), SfxMailModel::Send(), SfxMailModel::SEND_MAIL_OK, SERVICE_SDB_DIRECTSQLDIALOG, sfx2::FileDialogHelper::SetContext(), sfx2::FileDialogHelper::SetCurrentFilter(), sfx2::FileDialogHelper::SetDisplayDirectory(), dbaui::OTableCopyHelper::SetTableNameForAppend(), sName, dbaui::OApplicationView::sortDown(), dbaui::OApplicationView::sortUp(), dbaui::OApplicationView::switchPreview(), and URL.

Referenced by onCopyEntry(), onLoadedMenu(), onPasteEntry(), and suspend().

◆ executeDrop()

sal_Int8 dbaui::OApplicationController::executeDrop ( const ExecuteDropEvent _rEvt)
overridevirtual

◆ getActiveConnection()

Reference< XConnection > SAL_CALL dbaui::OApplicationController::getActiveConnection ( )
overridevirtual

◆ getApplicationMainWindow()

Reference< XWindow > SAL_CALL dbaui::OApplicationController::getApplicationMainWindow ( )
overridevirtual

◆ getCommandController()

IController & dbaui::OApplicationController::getCommandController ( )
overridevirtual

returns the controller which is responsible for providing states of certain features, and executing them.

Implements dbaui::IContextMenuProvider.

Definition at line 2253 of file AppController.cxx.

◆ getConnection()

const SharedConnection & dbaui::OApplicationController::getConnection ( ) const
inline

retrieves the current connection

Definition at line 444 of file AppController.hxx.

References m_xDataSourceConnection.

Referenced by convertToView(), getElements(), GetState(), openDialog(), paste(), and renameEntry().

◆ getContainer()

OApplicationView * dbaui::OApplicationController::getContainer ( ) const
private

◆ getContextMenuInterceptors()

comphelper::OInterfaceContainerHelper2 * dbaui::OApplicationController::getContextMenuInterceptors ( )
overridevirtual

returns the container of registered context menu interceptors, or NULL if the implementation does not support context menu interception

Implements dbaui::IContextMenuProvider.

Definition at line 2258 of file AppController.cxx.

References m_aContextMenuInterceptors.

◆ getContextMenuResourceName()

OUString dbaui::OApplicationController::getContextMenuResourceName ( ) const
overridevirtual

returns the context menu resource name for the control

Supposed to be a valid name from uiconfig/<module>/popupmenu folder.

Implements dbaui::IContextMenuProvider.

Definition at line 2248 of file AppController.cxx.

◆ getCurrentlySelectedName()

OUString dbaui::OApplicationController::getCurrentlySelectedName ( sal_Int32 &  _rnCommandType) const
private

returns the currently selected table or query name.

Returns
the name of the currently table or query. If the tables or query container is selected otherwise an empty string will be returned.

Definition at line 2654 of file AppController.cxx.

References DBG_UNHANDLED_EXCEPTION, dbaui::E_QUERY, dbaui::E_TABLE, Exception, getContainer(), dbaui::OApplicationView::getElementType(), getElementType(), dbaui::OApplicationView::getQualifiedName(), dbaccess::QUERY, sName, and dbaccess::TABLE.

Referenced by newElementWithPilot().

◆ getCurrentSelection()

Any dbaui::OApplicationController::getCurrentSelection ( weld::TreeView rControl) const
overridevirtual

returns the current selection in the given control

This selection is used for filling a ContextMenuExecuteEvent event for the given control.

Implements dbaui::IContextMenuProvider.

Definition at line 2263 of file AppController.cxx.

References Any, dbaui::OApplicationView::describeCurrentSelectionForControl(), and getContainer().

◆ getDatabaseName()

OUString dbaui::OApplicationController::getDatabaseName ( ) const
private

◆ getDataSource()

Reference< XDataSource > SAL_CALL dbaui::OApplicationController::getDataSource ( )
overridevirtual

◆ getDocumentsAccess()

std::unique_ptr< OLinkedDocumentsAccess > dbaui::OApplicationController::getDocumentsAccess ( ElementType  _eType)
private

returns the document access for the specific type

Parameters
_eTypethe type
Returns
std::unique_ptr<OLinkedDocumentsAccess>

Definition at line 463 of file AppControllerDnD.cxx.

References dbaui::E_FORM, dbaui::E_QUERY, dbaui::E_REPORT, dbaui::E_TABLE, ensureConnection(), getDatabaseName(), getElements(), dbaui::OGenericUnoController::getFrameWeld(), and dbaui::OGenericUnoController::getORB().

Referenced by newElement(), newElementWithPilot(), and openElementWithArguments().

◆ getElements()

Reference< XNameAccess > dbaui::OApplicationController::getElements ( ElementType  _eType)
private

◆ getElementType()

ElementType dbaui::OApplicationController::getElementType ( const css::uno::Reference< css::container::XContainer > &  _xContainer)
staticprivate

return the element type for given container

Parameters
_xContainerThe container where the element type has to be found
Returns
the element type corresponding to the given container

Definition at line 716 of file AppControllerGen.cxx.

References dbaui::E_FORM, dbaui::E_NONE, dbaui::E_QUERY, dbaui::E_REPORT, dbaui::E_TABLE, SERVICE_NAME_FORM_COLLECTION, SERVICE_NAME_REPORT_COLLECTION, and SERVICE_SDBCX_TABLES.

Referenced by elementInserted(), elementRemoved(), elementReplaced(), Execute(), getCurrentlySelectedName(), getSelection(), GetState(), onEntryDoubleClick(), refreshTables(), and renameEntry().

◆ getImplementationName()

OUString SAL_CALL dbaui::OApplicationController::getImplementationName ( )
overridevirtual

Implements dbaui::OGenericUnoController.

Definition at line 141 of file AppController.cxx.

References SERVICE_SDB_APPLICATIONCONTROLLER.

◆ getMenuParent()

vcl::Window * dbaui::OApplicationController::getMenuParent ( ) const
overridevirtual

◆ getModel()

Reference< XModel > SAL_CALL dbaui::OApplicationController::getModel ( )
overridevirtual

Reimplemented from dbaui::OGenericUnoController.

Definition at line 2462 of file AppController.cxx.

References m_xModel.

Referenced by Execute(), and suspend().

◆ getPrivateModel()

virtual css::uno::Reference< css::frame::XModel > dbaui::OApplicationController::getPrivateModel ( ) const
inlineoverrideprotectedvirtual

Reimplemented from dbaui::OGenericUnoController.

Definition at line 377 of file AppController.hxx.

References m_xModel.

◆ getQueryDefinitions()

Reference< XNameContainer > dbaui::OApplicationController::getQueryDefinitions ( ) const
private

returns the query definitions of the active data source.

Definition at line 800 of file AppControllerDnD.cxx.

References m_xDataSource.

Referenced by getElements(), and paste().

◆ getSelection()

Any SAL_CALL dbaui::OApplicationController::getSelection ( )
overridevirtual

◆ getSelectionElementNames()

void dbaui::OApplicationController::getSelectionElementNames ( std::vector< OUString > &  _rNames) const
private

◆ GetState()

FeatureState dbaui::OApplicationController::GetState ( sal_uInt16  nId) const
overrideprotectedvirtual

Reimplemented from dbaui::OGenericUnoController.

Definition at line 523 of file AppController.cxx.

References dbaui::FeatureState::bChecked, dbaui::FeatureState::bEnabled, dbaccess::ODsnTypeCollection::cutPrefix(), DBA_RES, DBG_UNHANDLED_EXCEPTION, dbaui::Document, dbaui::DocumentInfo, dbaui::AdvancedSettingsDialog::doesHaveAnyAdvancedSettings(), dbaui::E_FORM, dbaui::E_QUERY, dbaui::E_REPORT, dbaui::E_TABLE, eType, Exception, dbaccess::ODsnTypeCollection::extractHostNamePort(), svt::OFileNotation::get(), getConnection(), getContainer(), dbaui::OApplicationView::getElementCount(), dbaui::OApplicationView::getElementType(), getElementType(), dbaui::OApplicationView::getPreviewMode(), dbaui::OApplicationView::getSelectionCount(), getSelectionElementNames(), dbaui::OGenericUnoController::GetState(), dbaccess::ODsnTypeCollection::getType(), dbaccess::ODsnTypeCollection::getTypeDisplayName(), getViewClipboard(), TransferableDataHelper::HasFormat(), ID_APP_NEW_QUERY_AUTO_PILOT, ID_BROWSER_COPY, ID_BROWSER_CUT, ID_BROWSER_PASTE, ID_BROWSER_SAVEASDOC, ID_BROWSER_SAVEDOC, ID_BROWSER_SORTDOWN, ID_BROWSER_SORTUP, ID_BROWSER_UNDO, ID_DIRECT_SQL, ID_DOCUMENT_CREATE_REPWIZ, ID_NEW_QUERY_DESIGN, ID_NEW_QUERY_SQL, ID_NEW_TABLE_DESIGN, ID_NEW_TABLE_DESIGN_AUTO_PILOT, ID_NEW_VIEW_DESIGN, ID_NEW_VIEW_DESIGN_AUTO_PILOT, impl_isAlterableView_nothrow(), dbaui::OApplicationView::isALeafSelected(), isConnected(), isConnectionReadOnly(), dbaui::OApplicationView::isCutAllowed(), isDataSourceReadOnly(), dbaccess::ODsnTypeCollection::isEmbeddedDatabase(), dbaccess::ODsnTypeCollection::isFileSystemBased(), dbaui::OApplicationView::isFilled(), SvtModuleOptions::IsModuleInstalled(), isRenameDeleteAllowed(), dbaccess::ODsnTypeCollection::isShowPropertiesEnabled(), dbaui::OApplicationView::isSortUp(), isTableFormat(), m_aTypeCollection, dbaui::OGenericUnoController::m_bReadOnly, dbaui::OGenericUnoController::m_xContext, m_xDataSource, m_xModel, svt::OFileNotation::N_SYSTEM, nCount, dbaui::NONE, PROPERTY_URL(), PROPERTY_USER(), dbaui::FeatureState::sTitle, SvtPathOptions::SubstituteVariable(), u, and SvtModuleOptions::WRITER.

◆ getStrippedDatabaseName()

OUString dbaui::OApplicationController::getStrippedDatabaseName ( ) const
private

returns the stripped database name.

Returns
The stripped database name either the registered name or if it is a file url the last segment.

Definition at line 553 of file AppControllerGen.cxx.

References dbaui::getStrippedDatabaseName(), and m_xDataSource.

Referenced by connect(), disposing(), ensureConnection(), and suspend().

◆ getSubComponents()

Sequence< Reference< XComponent > > SAL_CALL dbaui::OApplicationController::getSubComponents ( )
overridevirtual

◆ getSupportedFormats()

void dbaui::OApplicationController::getSupportedFormats ( ElementType  _eType,
std::vector< SotClipboardFormatId > &  _rFormatIds 
)
staticprivate

fills the vector with all supported formats

Parameters
_eTypeThe type for which we need the formats
_rFormatIdsThe vector to be filled up.

Definition at line 811 of file AppControllerDnD.cxx.

References dbaui::E_QUERY, and dbaui::E_TABLE.

Referenced by Execute().

◆ getSupportedServiceNames()

Sequence< OUString > SAL_CALL dbaui::OApplicationController::getSupportedServiceNames ( )
overridevirtual

Implements dbaui::OGenericUnoController.

Definition at line 146 of file AppController.cxx.

◆ getViewClipboard()

const TransferableDataHelper & dbaui::OApplicationController::getViewClipboard ( ) const
inlineprivate

returns the system clipboard.

Definition at line 266 of file AppController.hxx.

References m_aSystemClipboard.

Referenced by Execute(), GetState(), isTableFormat(), and pasteFormat().

◆ identifySubComponent()

beans::Pair<::sal_Int32, OUString > SAL_CALL dbaui::OApplicationController::identifySubComponent ( const css::uno::Reference< css::lang::XComponent > &  SubComponent)
overridevirtual

◆ impl_isAlterableView_nothrow()

bool dbaui::OApplicationController::impl_isAlterableView_nothrow ( const OUString &  _rTableOrViewName) const
private

determines whether the given table name denotes a view which can be altered

Definition at line 1717 of file AppController.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, utl::SharedUNOComponent< class INTERFACE, class COMPONENT >::is(), and m_xDataSourceConnection.

Referenced by GetState(), and openElementWithArguments().

◆ impl_validateObjectTypeAndName_throw()

void dbaui::OApplicationController::impl_validateObjectTypeAndName_throw ( const sal_Int32  _nObjectType,
const ::std::optional< OUString > &  i_rObjectName 
)
private

verifies the object type denotes a valid DatabaseObject, and the object name denotes an existing object of this type.

Throws if not.

Definition at line 372 of file AppControllerGen.cxx.

References getElements(), isConnected(), dbaccess::QUERY, connectivity::SQLError::raiseException(), dbaccess::REPORT, and dbaccess::TABLE.

Referenced by createComponentWithArguments(), and loadComponentWithArguments().

◆ insertHierarchyElement()

bool dbaui::OApplicationController::insertHierarchyElement ( ElementType  _eType,
const OUString &  _sParentFolder,
bool  _bCollection = true,
const css::uno::Reference< css::ucb::XContent > &  _xContent = css::uno::Reference< css::ucb::XContent>(),
bool  _bMove = false 
)
private

Inserts a new object into the hierarchy given be the type.

Parameters
_eTypeWhere to insert the new item.
_sParentFolderThe name of the parent folder if it exists.
_xContentThe content to insert.
_bMoveif <TRUE> the name of the content must be inserted without any change, otherwise not.
Returns
<TRUE> if the insert operations was successful, otherwise <FALSE>.

Definition at line 583 of file AppControllerGen.cxx.

References dbaui::E_FORM, getElements(), dbaui::OGenericUnoController::getFrameWeld(), dbaui::OGenericUnoController::getORB(), and dbaui::insertHierarchyElement().

Referenced by Execute(), and paste().

◆ isConnected() [1/2]

bool dbaui::OApplicationController::isConnected ( ) const
inline

determines whether we're currently connected to the database

Definition at line 447 of file AppController.hxx.

References utl::SharedUNOComponent< class INTERFACE, class COMPONENT >::is(), and m_xDataSourceConnection.

◆ isConnected() [2/2]

sal_Bool SAL_CALL dbaui::OApplicationController::isConnected ( )
overridevirtual

◆ isConnectionReadOnly()

bool dbaui::OApplicationController::isConnectionReadOnly ( ) const
private

checks if the connection for the selected data source is read only.

If the connection doesn't exist, <TRUE> will be returned.

Returns
<TRUE> if read only or doesn't exist, otherwise <FALSE>

Definition at line 386 of file AppControllerDnD.cxx.

References DBG_UNHANDLED_EXCEPTION, and m_xMetaData.

Referenced by GetState(), isRenameDeleteAllowed(), and queryDrop().

◆ isDataSourceReadOnly()

bool dbaui::OApplicationController::isDataSourceReadOnly ( ) const
overridevirtual

checks if the selected data source is read only

Returns
<TRUE> if read only, otherwise <FALSE>

Reimplemented from dbaui::OGenericUnoController.

Definition at line 380 of file AppControllerDnD.cxx.

References m_xModel.

Referenced by GetState(), isRenameDeleteAllowed(), previewChanged(), and queryDrop().

◆ isRenameDeleteAllowed()

bool dbaui::OApplicationController::isRenameDeleteAllowed ( ElementType  _eType,
bool  _bDelete 
) const
private

checks if delete command or rename command is allowed

Parameters
_eTypeThe element type.
_bDeleteIf <TRUE> then the delete command should be checked.
Returns
<TRUE> if the command is allowed

Definition at line 596 of file AppControllerGen.cxx.

References dbaui::E_TABLE, eType, Exception, getContainer(), getElements(), dbaui::OApplicationView::getElementType(), dbaui::OApplicationView::getSelectionCount(), getSelectionElementNames(), dbaui::OApplicationView::isALeafSelected(), isConnectionReadOnly(), and isDataSourceReadOnly().

Referenced by GetState().

◆ isTableFormat()

bool dbaui::OApplicationController::isTableFormat ( ) const
private

returns <TRUE> if the clipboard supports a table format, otherwise <FALSE>.

Definition at line 828 of file AppControllerDnD.cxx.

References getViewClipboard(), and dbaui::OTableCopyHelper::isTableFormat().

Referenced by GetState().

◆ loadComponent()

Reference< XComponent > SAL_CALL dbaui::OApplicationController::loadComponent ( ::sal_Int32  ObjectType,
const OUString &  ObjectName,
sal_Bool  ForEditing 
)
overridevirtual

Definition at line 419 of file AppControllerGen.cxx.

References loadComponentWithArguments().

◆ loadComponentWithArguments()

Reference< XComponent > SAL_CALL dbaui::OApplicationController::loadComponentWithArguments ( ::sal_Int32  ObjectType,
const OUString &  ObjectName,
sal_Bool  ForEditing,
const css::uno::Sequence< css::beans::PropertyValue > &  Arguments 
)
overridevirtual

◆ newElement()

Reference< XComponent > dbaui::OApplicationController::newElement ( ElementType  _eType,
const ::comphelper::NamedValueCollection i_rAdditionalArguments,
css::uno::Reference< css::lang::XComponent > &  o_rDocumentDefinition 
)
private

opens a new frame for creation or auto pilot

Parameters
_eTypeDefines the type to open
i_rAdditionalArgumentsAdditional arguments to pass when creating the component

Definition at line 1908 of file AppController.cxx.

References aHelper, dbaui::Design, dbaui::E_FORM, dbaui::E_QUERY, dbaui::E_REPORT, dbaui::E_TABLE, ensureConnection(), getContainer(), getDocumentsAccess(), dbaui::OGenericUnoController::getFrame(), dbaui::OGenericUnoController::getORB(), ID_FORM_NEW_TEXT, ID_REPORT_NEW_TEXT, utl::SharedUNOComponent< class INTERFACE, class COMPONENT >::is(), m_xDataSource, and onDocumentOpened().

Referenced by createComponentWithArguments(), and Execute().

◆ newElementWithPilot()

void dbaui::OApplicationController::newElementWithPilot ( ElementType  _eType)
private

creates a new database object, using an auto pilot

Parameters
_eTypeDefines the type of the object to create @precond Our mutex must not be locked.
Available since: \n #i39203#

Definition at line 1863 of file AppController.cxx.

References aHelper, dbaui::E_FORM, dbaui::E_NONE, dbaui::E_QUERY, dbaui::E_REPORT, dbaui::E_TABLE, getContainer(), getCurrentlySelectedName(), getDocumentsAccess(), and dbaui::OGenericUnoController::getFrame().

◆ onAttachedFrame()

void dbaui::OApplicationController::onAttachedFrame ( )
private

called we were attached to a frame

In particular, this is called after the controller has been announced to the model (XModel::connectController)

Definition at line 2467 of file AppController.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, m_xModel, OnFirstControllerConnected(), xController, and xModel.

Referenced by attachFrame().

◆ onContainerSelect()

bool dbaui::OApplicationController::onContainerSelect ( ElementType  _eType)

◆ onCopyEntry()

void dbaui::OApplicationController::onCopyEntry ( )

called when a "Copy" command is executed in a tree view

Definition at line 2213 of file AppController.cxx.

References Execute(), and ID_BROWSER_COPY.

◆ onDeleteEntry()

void dbaui::OApplicationController::onDeleteEntry ( )

◆ onDocumentOpened()

void dbaui::OApplicationController::onDocumentOpened ( const OUString &  _rName,
const sal_Int32  _nType,
const ElementOpenMode  _eMode,
const css::uno::Reference< css::lang::XComponent > &  _xDocument,
const css::uno::Reference< css::lang::XComponent > &  _xDefinition 
)
private

remember a newly opened sub document for later access

Definition at line 559 of file AppControllerGen.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, m_pSubComponentManager, and PROPERTY_NAME().

Referenced by Execute(), newElement(), and openElementWithArguments().

◆ onEntryDoubleClick()

bool dbaui::OApplicationController::onEntryDoubleClick ( const weld::TreeView rTree)

called when an entry in a tree list box has been double-clicked

Parameters
_rTreeThe tree list box.
Returns
<TRUE> if the double click event has been handled by the called, and should not be processed further.

Definition at line 1685 of file AppController.cxx.

References DBG_UNHANDLED_EXCEPTION, Exception, weld::TreeView::get_cursor(), getContainer(), getElementType(), dbaui::OApplicationView::isLeaf(), weld::TreeView::make_iterator(), dbaui::Normal, and openElementWithArguments().

◆ OnFirstControllerConnected()

void dbaui::OApplicationController::OnFirstControllerConnected ( )

◆ OnInvalidateClipboard()

void dbaui::OApplicationController::OnInvalidateClipboard ( )

◆ onLoadedMenu()

void dbaui::OApplicationController::onLoadedMenu ( const css::uno::Reference< css::frame::XLayoutManager > &  _xLayoutManager)
overrideprotectedvirtual

called when our menu has been loaded into our frame, can be used to load sub toolbars

Parameters
_xLayoutManagerThe layout manager.

Reimplemented from dbaui::OGenericUnoController.

Definition at line 636 of file AppControllerGen.cxx.

References dbaui::OApplicationView::createIconAutoMnemonics(), Execute(), getContainer(), dbaui::OGenericUnoController::InvalidateAll(), dbaui::OApplicationView::setTaskExternalMnemonics(), and u.

◆ onPasteEntry()

void dbaui::OApplicationController::onPasteEntry ( )

called when a "Paste" command is executed in a tree view

Definition at line 2218 of file AppController.cxx.

References Execute(), and ID_BROWSER_PASTE.

◆ onSelectionChanged()

void dbaui::OApplicationController::onSelectionChanged ( )

◆ openDialog()

void dbaui::OApplicationController::openDialog ( const OUString &  _sServiceName)
private

◆ openElementWithArguments()

Reference< XComponent > dbaui::OApplicationController::openElementWithArguments ( const OUString &  _sName,
ElementType  _eType,
ElementOpenMode  _eOpenMode,
sal_uInt16  _nInstigatorCommand,
const ::comphelper::NamedValueCollection _rAdditionalArguments 
)
private

◆ paste()

bool dbaui::OApplicationController::paste ( ElementType  _eType,
const svx::ODataAccessDescriptor _rPasteData,
const OUString &  _sParentFolder = OUString(),
bool  _bMove = false 
)
private

pastes a query, form or report into the data source

Parameters
_eTypeThe type of the object to paste.
_rPasteDataThe data descriptor.
_sParentFolderThe name of the parent folder if it exists.
_bMoveif <TRUE> the name of the content must be inserted without any change, otherwise not.
Returns
<TRUE> if the paste operations was successful, otherwise <FALSE>.

Definition at line 616 of file AppControllerDnD.cxx.

References AdditionalDescription, Any, aSeq, DBA_RES, DBG_UNHANDLED_EXCEPTION, dbaui::E_QUERY, ensureConnection(), Exception, getConnection(), svx::ODataAccessDescriptor::getDataSource(), dbaui::getDataSourceByName(), dbaui::OGenericUnoController::getFrameWeld(), dbaui::OSaveAsDlg::getName(), dbaui::OGenericUnoController::getORB(), getQueryDefinitions(), svx::ODataAccessDescriptor::has(), insertHierarchyElement(), dbaui::DynamicTableOrQueryNameCheck::isNameValid(), PROPERTY_COMMAND(), PROPERTY_ESCAPE_PROCESSING(), dbaccess::QUERY, RET_OK, weld::DialogController::run(), SAL_WARN, dbaui::OGenericUnoController::showError(), dbaccess::TABLE, and TitlePasteAs.

Referenced by Execute(), and pasteFormat().

◆ pasteFormat()

void dbaui::OApplicationController::pasteFormat ( SotClipboardFormatId  _nFormatId)
private

pastes a special format from the system clipboard to the currently selected object types

Parameters
_nFormatIdThe format to be copied.

Definition at line 126 of file AppControllerGen.cxx.

References DBG_UNHANDLED_EXCEPTION, dbaui::E_TABLE, ensureConnection(), eType, Exception, getContainer(), getDatabaseName(), dbaui::OApplicationView::getElementType(), getViewClipboard(), m_aTableCopyHelper, paste(), and dbaui::OTableCopyHelper::pasteTable().

Referenced by Execute().

◆ previewChanged()

void dbaui::OApplicationController::previewChanged ( sal_Int32  _nMode)

◆ propertyChange()

void SAL_CALL dbaui::OApplicationController::propertyChange ( const css::beans::PropertyChangeEvent &  evt)
overridevirtual

◆ queryDrop()

sal_Int8 dbaui::OApplicationController::queryDrop ( const AcceptDropEvent _rEvt,
const DataFlavorExVector _rFlavors 
)
overridevirtual

◆ refreshTables()

void dbaui::OApplicationController::refreshTables ( )

◆ registerContextMenuInterceptor()

void SAL_CALL dbaui::OApplicationController::registerContextMenuInterceptor ( const css::uno::Reference< css::ui::XContextMenuInterceptor > &  Interceptor)
overridevirtual

◆ releaseContextMenuInterceptor()

void SAL_CALL dbaui::OApplicationController::releaseContextMenuInterceptor ( const css::uno::Reference< css::ui::XContextMenuInterceptor > &  Interceptor)
overridevirtual

◆ removeSelectionChangeListener()

void SAL_CALL dbaui::OApplicationController::removeSelectionChangeListener ( const css::uno::Reference< css::view::XSelectionChangeListener > &  xListener)
overridevirtual

Definition at line 2680 of file AppController.cxx.

References m_pSelectionNotifier.

◆ renameEntry()

void dbaui::OApplicationController::renameEntry ( )
private

◆ requestDrag()

bool dbaui::OApplicationController::requestDrag ( const weld::TreeIter rEntry)
overridevirtual

◆ requestQuickHelp()

bool dbaui::OApplicationController::requestQuickHelp ( const void *  pUserData,
OUString &  rText 
) const
overridevirtual

requests a quick help text to display

Returns
<FALSE> if the default quick help text should be used

Implements dbaui::IControlActionListener.

Definition at line 2280 of file AppController.cxx.

◆ select()

sal_Bool SAL_CALL dbaui::OApplicationController::select ( const css::uno::Any &  xSelection)
overridevirtual

◆ showPreviewFor()

void dbaui::OApplicationController::showPreviewFor ( const ElementType  _eType,
const OUString &  _sName 
)
private

◆ suspend()

sal_Bool SAL_CALL dbaui::OApplicationController::suspend ( sal_Bool  bSuspend)
overridevirtual

Member Data Documentation

◆ m_aAsyncDrop

OTableCopyHelper::DropDescriptor dbaui::OApplicationController::m_aAsyncDrop
private

Definition at line 96 of file AppController.hxx.

Referenced by executeDrop().

◆ m_aContextMenuInterceptors

::comphelper::OInterfaceContainerHelper2 dbaui::OApplicationController::m_aContextMenuInterceptors
private

◆ m_aCurrentContainers

TContainerVector dbaui::OApplicationController::m_aCurrentContainers
private

◆ m_aPendingSelection

SelectionByElementType dbaui::OApplicationController::m_aPendingSelection
private

Definition at line 128 of file AppController.hxx.

Referenced by onContainerSelect(), and select().

◆ m_aSelectContainerEvent

OAsynchronousLink dbaui::OApplicationController::m_aSelectContainerEvent
private

Definition at line 119 of file AppController.hxx.

Referenced by Execute(), and select().

◆ m_aSystemClipboard

TransferableDataHelper dbaui::OApplicationController::m_aSystemClipboard
private

Definition at line 102 of file AppController.hxx.

Referenced by Construct(), and getViewClipboard().

◆ m_aTableCopyHelper

OTableCopyHelper dbaui::OApplicationController::m_aTableCopyHelper
private

Definition at line 115 of file AppController.hxx.

Referenced by Execute(), executeDrop(), and pasteFormat().

◆ m_aTypeCollection

::dbaccess::ODsnTypeCollection dbaui::OApplicationController::m_aTypeCollection
private

Definition at line 114 of file AppController.hxx.

Referenced by GetState().

◆ m_bNeedToReconnect

bool dbaui::OApplicationController::m_bNeedToReconnect
private

Definition at line 122 of file AppController.hxx.

Referenced by askToReconnect(), and propertyChange().

◆ m_bSuspended

bool dbaui::OApplicationController::m_bSuspended
private

Definition at line 123 of file AppController.hxx.

Referenced by suspend().

◆ m_eCurrentType

ElementType dbaui::OApplicationController::m_eCurrentType
private

Definition at line 121 of file AppController.hxx.

Referenced by askToReconnect(), onContainerSelect(), and select().

◆ m_ePreviewMode

PreviewMode dbaui::OApplicationController::m_ePreviewMode
private

Definition at line 120 of file AppController.hxx.

Referenced by attachModel(), Construct(), Execute(), and showPreviewFor().

◆ m_nAsyncDrop

ImplSVEvent* dbaui::OApplicationController::m_nAsyncDrop
private

Definition at line 118 of file AppController.hxx.

Referenced by executeDrop().

◆ m_pClipboardNotifier

rtl::Reference<TransferableClipboardListener> dbaui::OApplicationController::m_pClipboardNotifier
private

Definition at line 117 of file AppController.hxx.

Referenced by Construct(), and disposing().

◆ m_pSelectionNotifier

std::unique_ptr< SelectionNotifier > dbaui::OApplicationController::m_pSelectionNotifier
private

◆ m_pSubComponentManager

::rtl::Reference< SubComponentManager > dbaui::OApplicationController::m_pSubComponentManager
private

◆ m_xDataSource

css::uno::Reference< css::beans::XPropertySet > dbaui::OApplicationController::m_xDataSource
private

◆ m_xDataSourceConnection

SharedConnection dbaui::OApplicationController::m_xDataSourceConnection
private

◆ m_xMetaData

css::uno::Reference< css::sdbc::XDatabaseMetaData > dbaui::OApplicationController::m_xMetaData
private

◆ m_xModel

css::uno::Reference< css::frame::XModel > dbaui::OApplicationController::m_xModel
private

The documentation for this class was generated from the following files: