LibreOffice Module dbaccess (master) 1
|
tab dialog for administrating the office wide registered data sources More...
#include <dbadmin.hxx>
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 SfxItemSet * | getOutputSet () const override |
virtual SfxItemSet * | getWriteOutputSet () 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 |
SfxTabPage * | GetCurTabPage () const |
const WhichRangesContainer & | GetInputRanges (const SfxItemPool &) |
void | SetInputSet (const SfxItemSet *pInSet) |
const SfxItemSet * | GetOutputItemSet () const |
virtual weld::Button & | GetOKButton () const override |
weld::Button & | GetCancelButton () const |
weld::Button * | GetUserButton () const |
weld::Button * | GetStandardButton () const |
weld::Button * | GetApplyButton () const |
weld::Button * | GetResetButton () const |
void | RemoveResetButton () |
void | RemoveStandardButton () |
virtual short | run () override |
virtual const SfxItemSet * | GetExampleSet () 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::Button & | GetOKButton () const=0 |
virtual const SfxItemSet * | GetExampleSet () 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 SfxItemSet * | getOutputSet () const =0 |
virtual SfxItemSet * | getWriteOutputSet ()=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< ODbDataSourceAdministrationHelper > | m_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 SfxItemSet * | CreateInputItemSet (const OUString &rName) |
virtual void | PageCreated (const OUString &rName, SfxTabPage &rPage) |
virtual void | ActivatePage (const OUString &rPage) |
bool | DeactivatePage (std::u16string_view aPage) |
SfxItemSet * | GetInputSetImpl () |
SfxTabPage * | GetTabPage (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::Notebook > | m_xTabCtrl |
std::unique_ptr< SfxItemSet > | m_xExampleSet |
tab dialog for administrating the office wide registered data sources
Definition at line 47 of file dbadmin.hxx.
|
private |
Enumerator | |
---|---|
AR_LEAVE_MODIFIED | |
AR_KEEP |
Definition at line 102 of file dbadmin.hxx.
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().
|
overridevirtual |
Definition at line 62 of file dbadmin.cxx.
References SfxTabDialogController::SetInputSet().
|
private |
Definition at line 83 of file dbadmin.cxx.
References SfxTabDialogController::AddTabPage(), and DBA_RES.
Referenced by impl_selectDataSource().
|
overridevirtual |
Implements dbaui::IDatabaseSettingsDialog.
Definition at line 262 of file dbadmin.cxx.
References m_pImpl.
|
overridevirtual |
Implements dbaui::IDatabaseSettingsDialog.
Definition at line 242 of file dbadmin.cxx.
References m_pImpl.
|
static |
create and return an item set for use with the dialog.
_pTypeCollection | pointer 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().
|
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().
|
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.
|
overridevirtual |
Implements dbaui::IDatabaseSettingsDialog.
Definition at line 257 of file dbadmin.cxx.
References dbaui::ODbDataSourceAdministrationHelper::getDatasourceType().
Referenced by impl_resetPages(), and impl_selectDataSource().
|
overridevirtual |
Implements dbaui::IDatabaseSettingsDialog.
Definition at line 252 of file dbadmin.cxx.
References m_pImpl.
|
overridevirtual |
Implements dbaui::IDatabaseSettingsDialog.
Definition at line 247 of file dbadmin.cxx.
References m_pImpl.
Referenced by PageCreated().
|
overridevirtual |
Implements dbaui::IItemSetHelper.
Definition at line 232 of file dbadmin.cxx.
References SfxTabDialogController::GetExampleSet().
Referenced by impl_resetPages(), and impl_selectDataSource().
|
overridevirtual |
Implements dbaui::IItemSetHelper.
Definition at line 237 of file dbadmin.cxx.
References SfxTabDialogController::m_xExampleSet.
|
private |
reset the tag pages according to m_sCurrentDatasource and <arg>_rxDatasource</arg>
Definition at line 153 of file dbadmin.cxx.
References SfxTabDialogController::AddTabPage(), SfxItemSet::ClearItem(), dbaui::ODriversSettings::CreateMySQLNATIVE(), DBA_RES, dbaccess::ODsnTypeCollection::determineType(), DSID_INVALID_SELECTION, DSID_TYPECOLLECTION, dbaccess::DST_MYSQL_NATIVE, dbaui::DbuTypeCollectionItem::getCollection(), getDatasourceType(), SfxTabDialogController::GetInputSetImpl(), SfxItemSet::GetItem(), getOutputSet(), SfxTabDialogController::GetTabPage(), m_pImpl, m_sMainPageID, m_xDialog, SfxTabDialogController::m_xExampleSet, SfxItemSet::Put(), SfxTabDialogController::RemoveTabPage(), SfxTabPage::Reset(), and SfxTabDialogController::SetCurPageId().
Referenced by impl_selectDataSource().
|
private |
select a datasource with a given name, adjust the item set accordingly, and everything like that ..
first user defined driver
Definition at line 88 of file dbadmin.cxx.
References addDetailPage(), SfxTabDialogController::AddTabPage(), dbaui::ODriversSettings::CreateAdo(), dbaui::ODriversSettings::CreateDbase(), dbaui::ODriversSettings::CreateLDAP(), dbaui::ODriversSettings::CreateMySQLJDBC(), dbaui::ODriversSettings::CreateMySQLODBC(), dbaui::ODriversSettings::CreateODBC(), dbaui::ODriversSettings::CreateOracleJDBC(), dbaui::ODriversSettings::CreateText(), dbaui::ODriversSettings::CreateUser(), DBA_RES, dbaccess::ODsnTypeCollection::determineType(), DSID_TYPECOLLECTION, dbaccess::DST_ADO, dbaccess::DST_DBASE, dbaccess::DST_FLAT, dbaccess::DST_LDAP, dbaccess::DST_MYSQL_JDBC, dbaccess::DST_MYSQL_ODBC, dbaccess::DST_ODBC, dbaccess::DST_ORACLE_JDBC, dbaccess::DST_USERDEFINE1, dbaccess::DST_USERDEFINE10, dbaccess::DST_USERDEFINE2, dbaccess::DST_USERDEFINE3, dbaccess::DST_USERDEFINE4, dbaccess::DST_USERDEFINE5, dbaccess::DST_USERDEFINE6, dbaccess::DST_USERDEFINE7, dbaccess::DST_USERDEFINE8, dbaccess::DST_USERDEFINE9, eType, dbaui::DbuTypeCollectionItem::getCollection(), getDatasourceType(), SfxItemSet::GetItem(), getOutputSet(), impl_resetPages(), and m_pImpl.
Referenced by selectDataSource().
|
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().
|
overrideprivatevirtual |
Reimplemented from SfxTabDialogController.
Definition at line 67 of file dbadmin.cxx.
References AR_LEAVE_MODIFIED, implApplyChanges(), SfxTabDialogController::Ok(), RET_CANCEL, and RET_OK.
|
overrideprivatevirtual |
Reimplemented from SfxTabDialogController.
Definition at line 74 of file dbadmin.cxx.
References getORB(), and SfxTabDialogController::PageCreated().
|
overridevirtual |
Implements dbaui::IDatabaseSettingsDialog.
Definition at line 209 of file dbadmin.cxx.
References SfxTabDialogController::PrepareLeaveCurrentPage().
void dbaui::ODbAdminDialog::selectDataSource | ( | const css::uno::Any & | _aDataSourceName | ) |
selects the DataSource
_rName | The name of the data source |
Definition at line 227 of file dbadmin.cxx.
References impl_selectDataSource().
|
overridevirtual |
Implements dbaui::IDatabaseSettingsDialog.
Definition at line 202 of file dbadmin.cxx.
References m_xDialog.
|
private |
Definition at line 50 of file dbadmin.hxx.
Referenced by clearPassword(), createConnection(), getDriver(), getORB(), impl_resetPages(), impl_selectDataSource(), implApplyChanges(), and ODbAdminDialog().
|
private |
Definition at line 52 of file dbadmin.hxx.
Referenced by impl_resetPages(), and ODbAdminDialog().