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

tab dialog for administrating the office wide registered data sources More...

#include <dbadmin.hxx>

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

Public Member Functions

 ODbAdminDialog (weld::Window *pParent, SfxItemSet const *_pItems, const css::uno::Reference< css::uno::XComponentContext > &_rxORB)
 ctor. More...
 
virtual ~ODbAdminDialog () override
 
void selectDataSource (const css::uno::Any &_aDataSourceName)
 selects the DataSource More...
 
virtual const SfxItemSetgetOutputSet () const override
 
virtual SfxItemSetgetWriteOutputSet () override
 
virtual css::uno::Reference< css::uno::XComponentContext > getORB () const override
 
virtual std::pair< css::uno::Reference< css::sdbc::XConnection >, bool > createConnection () override
 
virtual css::uno::Reference< css::sdbc::XDriver > getDriver () override
 
virtual OUString getDatasourceType (const SfxItemSet &_rSet) const override
 
virtual void clearPassword () override
 
virtual void saveDatasource () override
 
virtual void setTitle (const OUString &_sTitle) override
 
virtual void enableConfirmSettings (bool _bEnable) override
 enables or disables the user's possibility to confirm the settings More...
 
- Public Member Functions inherited from SfxTabDialogController
 SfxTabDialogController (weld::Widget *pParent, const OUString &rUIXMLDescription, const OUString &rID, const SfxItemSet *=nullptr, bool bEditFmt=false)
 
virtual ~SfxTabDialogController () override
 
void AddTabPage (const OUString &rName, CreateTabPage pCreateFunc, GetTabPageRanges pRangesFunc)
 
void AddTabPage (const OUString &rName, sal_uInt16 nPageCreateId)
 
void AddTabPage (const OUString &rName, const OUString &rLabel, CreateTabPage pCreateFunc)
 
void AddTabPage (const OUString &rName, const OUString &rLabel, sal_uInt16 nPageCreateId)
 
void RemoveTabPage (const OUString &rName)
 
void SetCurPageId (const OUString &rName)
 
void ShowPage (const OUString &rName)
 
OUString GetCurPageId () const
 
SfxTabPageGetCurTabPage () const
 
const WhichRangesContainerGetInputRanges (const SfxItemPool &)
 
void SetInputSet (const SfxItemSet *pInSet)
 
const SfxItemSetGetOutputItemSet () const
 
virtual weld::ButtonGetOKButton () const override
 
weld::ButtonGetCancelButton () const
 
weld::ButtonGetUserButton () const
 
weld::ButtonGetStandardButton () const
 
weld::ButtonGetApplyButton () const
 
weld::ButtonGetResetButton () const
 
void RemoveResetButton ()
 
void RemoveStandardButton ()
 
virtual short run () override
 
virtual const SfxItemSetGetExampleSet () const override
 
void SetApplyHandler (const Link< weld::Button &, void > &_rHdl)
 
bool Apply ()
 
void Applied ()
 
std::vector< OUString > getAllPageUIXMLDescriptions () const
 
bool selectPageByUIXMLDescription (const OUString &rUIXMLDescription)
 
BitmapEx createScreenshot () const
 
OUString GetScreenshotId () const
 
- Public Member Functions inherited from SfxOkDialogController
 SfxOkDialogController (weld::Widget *pParent, const OUString &rUIXMLDescription, const OUString &rID)
 
virtual weld::ButtonGetOKButton () const=0
 
virtual const SfxItemSetGetExampleSet () const=0
 
- Public Member Functions inherited from SfxDialogController
 SfxDialogController (weld::Widget *pParent, const OUString &rUIFile, const OUString &rDialogId)
 
virtual void Activate ()
 
virtual void Deactivate ()
 
virtual void ChildWinDispose ()
 
virtual void Close ()
 
virtual void EndDialog (int nResponse)
 
virtual bool CloseOnHide () const
 
virtual const SfxItemSetgetOutputSet () const =0
 
virtual SfxItemSetgetWriteOutputSet ()=0
 
virtual css::uno::Reference< css::uno::XComponentContext > getORB () const =0
 
virtual std::pair< css::uno::Reference< css::sdbc::XConnection >, bool > createConnection ()=0
 
virtual css::uno::Reference< css::sdbc::XDriver > getDriver ()=0
 
virtual OUString getDatasourceType (const SfxItemSet &_rSet) const =0
 
virtual void clearPassword ()=0
 
virtual void saveDatasource ()=0
 
virtual void setTitle (const OUString &_sTitle)=0
 
virtual void enableConfirmSettings (bool _bEnable)=0
 enables or disables the user's possibility to confirm the settings More...
 

Static Public Member Functions

static void createItemSet (std::unique_ptr< SfxItemSet > &_rpSet, rtl::Reference< SfxItemPool > &_rpPool, std::vector< SfxPoolItem * > *&_rpDefaults, ::dbaccess::ODsnTypeCollection *_pTypeCollection)
 create and return an item set for use with the dialog. More...
 
static void destroyItemSet (std::unique_ptr< SfxItemSet > &_rpSet, rtl::Reference< SfxItemPool > &_rpPool, std::vector< SfxPoolItem * > *&_rpDefaults)
 destroy and item set / item pool / pool defaults previously created by <method>createItemSet</method> More...
 
- Static Public Member Functions inherited from SfxTabDialogController
static bool runAsync (const std::shared_ptr< SfxTabDialogController > &rController, const std::function< void(sal_Int32)> &)
 

Private Types

enum  ApplyResult {
  AR_LEAVE_MODIFIED ,
  AR_KEEP
}
 

Private Member Functions

void addDetailPage (const OUString &rPageId, TranslateId pTextId, CreateTabPage pCreateFunc)
 
virtual void PageCreated (const OUString &rId, SfxTabPage &_rPage) override
 
virtual short Ok () override
 
void impl_selectDataSource (const css::uno::Any &_aDataSourceName)
 select a datasource with a given name, adjust the item set accordingly, and everything like that .. More...
 
void impl_resetPages (const css::uno::Reference< css::beans::XPropertySet > &_rxDatasource)
 reset the tag pages according to m_sCurrentDatasource and <arg>_rxDatasource</arg> More...
 
ApplyResult implApplyChanges ()
 apply all changes made More...
 

Private Attributes

std::unique_ptr< ODbDataSourceAdministrationHelperm_pImpl
 
OUString m_sMainPageID
 

Additional Inherited Members

- Protected Member Functions inherited from SfxTabDialogController
 DECL_LINK (OkHdl, weld::Button &, void)
 
 DECL_DLLPRIVATE_LINK (ResetHdl, weld::Button &, void)
 
 DECL_DLLPRIVATE_LINK (BaseFmtHdl, weld::Button &, void)
 
 DECL_DLLPRIVATE_LINK (UserHdl, weld::Button &, void)
 
 DECL_DLLPRIVATE_LINK (CancelHdl, weld::Button &, void)
 
virtual short Ok ()
 
virtual void RefreshInputSet ()
 
virtual SfxItemSetCreateInputItemSet (const OUString &rName)
 
virtual void PageCreated (const OUString &rName, SfxTabPage &rPage)
 
virtual void ActivatePage (const OUString &rPage)
 
bool DeactivatePage (std::u16string_view aPage)
 
SfxItemSetGetInputSetImpl ()
 
SfxTabPageGetTabPage (std::u16string_view rPageId) const
 
bool PrepareLeaveCurrentPage ()
 
void SavePosAndId ()
 
- Protected Member Functions inherited from dbaui::IItemSetHelper
 ~IItemSetHelper ()
 
- Protected Member Functions inherited from dbaui::IDatabaseSettingsDialog
 ~IDatabaseSettingsDialog ()
 
- Protected Attributes inherited from SfxTabDialogController
std::unique_ptr< weld::Notebookm_xTabCtrl
 
std::unique_ptr< SfxItemSetm_xExampleSet
 

Detailed Description

tab dialog for administrating the office wide registered data sources

Definition at line 47 of file dbadmin.hxx.

Member Enumeration Documentation

◆ ApplyResult

Enumerator
AR_LEAVE_MODIFIED 
AR_KEEP 

Definition at line 102 of file dbadmin.hxx.

Constructor & Destructor Documentation

◆ ODbAdminDialog()

dbaui::ODbAdminDialog::ODbAdminDialog ( weld::Window pParent,
SfxItemSet const *  _pItems,
const css::uno::Reference< css::uno::XComponentContext > &  _rxORB 
)

ctor.

The itemset given should have been created by <method>createItemSet</method> and should be destroyed after the dialog has been destroyed

Definition at line 47 of file dbadmin.cxx.

References SfxTabDialogController::AddTabPage(), dbaui::OConnectionTabPage::Create(), m_pImpl, m_sMainPageID, m_xDialog, and SfxTabDialogController::RemoveResetButton().

◆ ~ODbAdminDialog()

dbaui::ODbAdminDialog::~ODbAdminDialog ( )
overridevirtual

Definition at line 62 of file dbadmin.cxx.

References SfxTabDialogController::SetInputSet().

Member Function Documentation

◆ addDetailPage()

void dbaui::ODbAdminDialog::addDetailPage ( const OUString &  rPageId,
TranslateId  pTextId,
CreateTabPage  pCreateFunc 
)
private

Definition at line 83 of file dbadmin.cxx.

References SfxTabDialogController::AddTabPage(), and DBA_RES.

Referenced by impl_selectDataSource().

◆ clearPassword()

void dbaui::ODbAdminDialog::clearPassword ( )
overridevirtual

Implements dbaui::IDatabaseSettingsDialog.

Definition at line 262 of file dbadmin.cxx.

References m_pImpl.

◆ createConnection()

std::pair< Reference< XConnection >, bool > dbaui::ODbAdminDialog::createConnection ( )
overridevirtual

Implements dbaui::IDatabaseSettingsDialog.

Definition at line 242 of file dbadmin.cxx.

References m_pImpl.

◆ createItemSet()

void dbaui::ODbAdminDialog::createItemSet ( std::unique_ptr< SfxItemSet > &  _rpSet,
rtl::Reference< SfxItemPool > &  _rpPool,
std::vector< SfxPoolItem * > *&  _rpDefaults,
::dbaccess::ODsnTypeCollection _pTypeCollection 
)
static

create and return an item set for use with the dialog.

Parameters
_pTypeCollectionpointer to an <type>ODatasourceMap</type>. May be NULL, in this case the pool will not contain a typecollection default.

Definition at line 267 of file dbadmin.cxx.

References aItemInfos, DSID_ADDITIONALOPTIONS, DSID_ALLOWLONGTABLENAMES, DSID_APPEND_TABLE_ALIAS, DSID_AS_BEFORE_CORRNAME, DSID_AUTOINCREMENTVALUE, DSID_AUTORETRIEVEENABLED, DSID_AUTORETRIEVEVALUE, DSID_BOOLEANCOMPARISON, DSID_CATALOG, DSID_CHARSET, DSID_CHECK_REQUIRED_FIELDS, DSID_CONN_CACHESIZE, DSID_CONN_CTRLPWD, DSID_CONN_CTRLUSER, DSID_CONN_DATAINC, DSID_CONN_HOSTNAME, DSID_CONN_LDAP_BASEDN, DSID_CONN_LDAP_PORTNUMBER, DSID_CONN_LDAP_ROWCOUNT, DSID_CONN_LDAP_USESSL, DSID_CONN_PORTNUMBER, DSID_CONN_SHUTSERVICE, DSID_CONN_SOCKET, DSID_CONNECTURL, DSID_DATABASENAME, DSID_DECIMALDELIMITER, DSID_DOCUMENT_URL, DSID_DOSLINEENDS, DSID_ENABLEOUTERJOIN, DSID_ESCAPE_DATETIME, DSID_FIELDDELIMITER, DSID_FIRST_ITEM_ID, DSID_IGNORECURRENCY, DSID_IGNOREDRIVER_PRIV, DSID_INDEXAPPENDIX, DSID_INVALID_SELECTION, DSID_JDBCDRIVERCLASS, DSID_LAST_ITEM_ID, DSID_MAX_ROW_SCAN, DSID_MYSQL_PORTNUMBER, DSID_NAME, DSID_NAMED_PIPE, DSID_ORACLE_PORTNUMBER, DSID_ORIGINALNAME, DSID_PARAMETERNAMESUBST, DSID_PASSWORD, DSID_PASSWORDREQUIRED, DSID_POSTGRES_PORTNUMBER, DSID_PRIMARY_KEY_SUPPORT, DSID_READONLY, DSID_RESPECTRESULTSETTYPE, DSID_SCHEMA, DSID_SHOWDELETEDROWS, DSID_SQL92CHECK, DSID_SUPPRESSVERSIONCL, DSID_TABLEFILTER, DSID_TEXTDELIMITER, DSID_TEXTFILEEXTENSION, DSID_TEXTFILEHEADER, DSID_THOUSANDSDELIMITER, DSID_TYPECOLLECTION, DSID_USECATALOG, DSID_USER, and u.

Referenced by dbaui::ODatabaseAdministrationDialog::ODatabaseAdministrationDialog().

◆ destroyItemSet()

void dbaui::ODbAdminDialog::destroyItemSet ( std::unique_ptr< SfxItemSet > &  _rpSet,
rtl::Reference< SfxItemPool > &  _rpPool,
std::vector< SfxPoolItem * > *&  _rpDefaults 
)
static

destroy and item set / item pool / pool defaults previously created by <method>createItemSet</method>

Definition at line 415 of file dbadmin.cxx.

Referenced by dbaui::ODatabaseAdministrationDialog::~ODatabaseAdministrationDialog().

◆ enableConfirmSettings()

void dbaui::ODbAdminDialog::enableConfirmSettings ( bool  _bEnable)
overridevirtual

enables or disables the user's possibility to confirm the settings

In a wizard, disabling this will usually disable the "Finish" button. In a normal tab dialog, this will usually disable the "OK" button.

Implements dbaui::IDatabaseSettingsDialog.

Definition at line 207 of file dbadmin.cxx.

◆ getDatasourceType()

OUString dbaui::ODbAdminDialog::getDatasourceType ( const SfxItemSet _rSet) const
overridevirtual

◆ getDriver()

Reference< XDriver > dbaui::ODbAdminDialog::getDriver ( )
overridevirtual

Implements dbaui::IDatabaseSettingsDialog.

Definition at line 252 of file dbadmin.cxx.

References m_pImpl.

◆ getORB()

Reference< XComponentContext > dbaui::ODbAdminDialog::getORB ( ) const
overridevirtual

Implements dbaui::IDatabaseSettingsDialog.

Definition at line 247 of file dbadmin.cxx.

References m_pImpl.

Referenced by PageCreated().

◆ getOutputSet()

const SfxItemSet * dbaui::ODbAdminDialog::getOutputSet ( ) const
overridevirtual

Implements dbaui::IItemSetHelper.

Definition at line 232 of file dbadmin.cxx.

References SfxTabDialogController::GetExampleSet().

Referenced by impl_resetPages(), and impl_selectDataSource().

◆ getWriteOutputSet()

SfxItemSet * dbaui::ODbAdminDialog::getWriteOutputSet ( )
overridevirtual

Implements dbaui::IItemSetHelper.

Definition at line 237 of file dbadmin.cxx.

References SfxTabDialogController::m_xExampleSet.

◆ impl_resetPages()

void dbaui::ODbAdminDialog::impl_resetPages ( const css::uno::Reference< css::beans::XPropertySet > &  _rxDatasource)
private

◆ impl_selectDataSource()

void dbaui::ODbAdminDialog::impl_selectDataSource ( const css::uno::Any &  _aDataSourceName)
private

◆ implApplyChanges()

ODbAdminDialog::ApplyResult dbaui::ODbAdminDialog::implApplyChanges ( )
private

apply all changes made

Definition at line 214 of file dbadmin.cxx.

References AR_KEEP, AR_LEAVE_MODIFIED, m_pImpl, SfxTabDialogController::m_xExampleSet, and SfxTabDialogController::PrepareLeaveCurrentPage().

Referenced by Ok().

◆ Ok()

short dbaui::ODbAdminDialog::Ok ( )
overrideprivatevirtual

Reimplemented from SfxTabDialogController.

Definition at line 67 of file dbadmin.cxx.

References AR_LEAVE_MODIFIED, implApplyChanges(), SfxTabDialogController::Ok(), RET_CANCEL, and RET_OK.

◆ PageCreated()

void dbaui::ODbAdminDialog::PageCreated ( const OUString &  rId,
SfxTabPage _rPage 
)
overrideprivatevirtual

Reimplemented from SfxTabDialogController.

Definition at line 74 of file dbadmin.cxx.

References getORB(), and SfxTabDialogController::PageCreated().

◆ saveDatasource()

void dbaui::ODbAdminDialog::saveDatasource ( )
overridevirtual

◆ selectDataSource()

void dbaui::ODbAdminDialog::selectDataSource ( const css::uno::Any &  _aDataSourceName)

selects the DataSource

Parameters
_rNameThe name of the data source

Definition at line 227 of file dbadmin.cxx.

References impl_selectDataSource().

◆ setTitle()

void dbaui::ODbAdminDialog::setTitle ( const OUString &  _sTitle)
overridevirtual

Implements dbaui::IDatabaseSettingsDialog.

Definition at line 202 of file dbadmin.cxx.

References m_xDialog.

Member Data Documentation

◆ m_pImpl

std::unique_ptr<ODbDataSourceAdministrationHelper> dbaui::ODbAdminDialog::m_pImpl
private

◆ m_sMainPageID

OUString dbaui::ODbAdminDialog::m_sMainPageID
private

Definition at line 52 of file dbadmin.hxx.

Referenced by impl_resetPages(), and ODbAdminDialog().


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