LibreOffice Module dbaccess (master) 1
Public Member Functions | Private Attributes | List of all members
dbaui::ODatasourceConnector Class Referencefinal

#include <datasourceconnector.hxx>

Collaboration diagram for dbaui::ODatasourceConnector:
[legend]

Public Member Functions

 ODatasourceConnector (const css::uno::Reference< css::uno::XComponentContext > &_rxContext, weld::Window *_pMessageParent)
 
 ODatasourceConnector (const css::uno::Reference< css::uno::XComponentContext > &_rxContext, weld::Window *_pMessageParent, OUString _sContextInformation)
 
bool isValid () const
 returns <TRUE> if the object is able to create data source connections More...
 
css::uno::Reference< css::sdbc::XConnection > connect (const OUString &_rDataSourceName, ::dbtools::SQLExceptionInfo *_pErrorInfo) const
 creates a connection to the data source, displays the possible error to the user, or returns it More...
 
css::uno::Reference< css::sdbc::XConnection > connect (const css::uno::Reference< css::sdbc::XDataSource > &_xDataSource, ::dbtools::SQLExceptionInfo *_pErrorInfo) const
 creates a connection to the data source, displays the possible error to the user, or returns it More...
 

Private Attributes

weld::Windowm_pErrorMessageParent
 
css::uno::Reference< css::uno::XComponentContext > m_xContext
 
OUString m_sContextInformation
 

Detailed Description

Definition at line 36 of file datasourceconnector.hxx.

Constructor & Destructor Documentation

◆ ODatasourceConnector() [1/2]

dbaui::ODatasourceConnector::ODatasourceConnector ( const css::uno::Reference< css::uno::XComponentContext > &  _rxContext,
weld::Window _pMessageParent 
)

◆ ODatasourceConnector() [2/2]

dbaui::ODatasourceConnector::ODatasourceConnector ( const css::uno::Reference< css::uno::XComponentContext > &  _rxContext,
weld::Window _pMessageParent,
OUString  _sContextInformation 
)

Member Function Documentation

◆ connect() [1/2]

css::uno::Reference< css::sdbc::XConnection > dbaui::ODatasourceConnector::connect ( const css::uno::Reference< css::sdbc::XDataSource > &  _xDataSource,
::dbtools::SQLExceptionInfo _pErrorInfo 
) const

creates a connection to the data source, displays the possible error to the user, or returns it

◆ connect() [2/2]

Reference< XConnection > dbaui::ODatasourceConnector::connect ( const OUString &  _rDataSourceName,
::dbtools::SQLExceptionInfo _pErrorInfo 
) const

creates a connection to the data source, displays the possible error to the user, or returns it

Definition at line 71 of file datasourceconnector.cxx.

References dbaui::getDataSourceByName(), and m_xContext.

Referenced by dbaui::OGenericUnoController::connect(), and dbaui::ODirectSQLDialog::createDialog().

◆ isValid()

bool dbaui::ODatasourceConnector::isValid ( ) const
inline

returns <TRUE> if the object is able to create data source connections

Definition at line 55 of file datasourceconnector.hxx.

References m_xContext.

Member Data Documentation

◆ m_pErrorMessageParent

weld::Window* dbaui::ODatasourceConnector::m_pErrorMessageParent
private

Definition at line 38 of file datasourceconnector.hxx.

◆ m_sContextInformation

OUString dbaui::ODatasourceConnector::m_sContextInformation
private

Definition at line 41 of file datasourceconnector.hxx.

◆ m_xContext

css::uno::Reference< css::uno::XComponentContext > dbaui::ODatasourceConnector::m_xContext
private

Definition at line 40 of file datasourceconnector.hxx.

Referenced by isValid().


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