LibreOffice Module dbaccess (master) 1
|
implements the connection page of the data source properties dialog. More...
#include <ConnectionPage.hxx>
Public Member Functions | |
OConnectionTabPage (weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &_rCoreAttrs) | |
virtual | ~OConnectionTabPage () override |
virtual bool | FillItemSet (SfxItemSet *_rCoreAttrs) override |
virtual void | implInitControls (const SfxItemSet &_rSet, bool _bSaveValue) override |
called from within Reset and ActivatePage, use to initialize the controls with the items from the given set More... | |
Public Member Functions inherited from dbaui::OConnectionHelper | |
OConnectionHelper (weld::Container *pPage, weld::DialogController *pController, const OUString &_rUIXMLDescription, const OUString &_rId, const SfxItemSet &_rCoreAttrs) | |
virtual | ~OConnectionHelper () override |
virtual void | fillControls (std::vector< std::unique_ptr< ISaveValueWrapper > > &_rControlList) override |
will be called inside <method>implInitControls</method> to save the value if necessary More... | |
virtual void | fillWindows (std::vector< std::unique_ptr< ISaveValueWrapper > > &_rControlList) override |
will be called inside <method>implInitControls</method> to disable if necessary More... | |
virtual void | implInitControls (const SfxItemSet &_rSet, bool _bSaveValue) override |
called from within Reset and ActivatePage, use to initialize the controls with the items from the given set More... | |
OUString | getURLNoPrefix () const |
void | setURLNoPrefix (std::u16string_view _rURL) |
sal_Int32 | checkPathExistence (const OUString &_rURL) |
checks if the path is existence More... | |
IS_PATH_EXIST | pathExists (const OUString &_rURL, bool bIsFile) const |
bool | createDirectoryDeep (std::u16string_view _rPathNormalized) |
bool | commitURL () |
void | askForFileName (::sfx2::FileDialogHelper &_aFileOpen) |
opens the FileOpen dialog and asks for a FileName More... | |
Public Member Functions inherited from dbaui::OGenericAdministrationPage | |
OGenericAdministrationPage (weld::Container *pPage, weld::DialogController *pController, const OUString &rUIXMLDescription, const OUString &rId, const SfxItemSet &rAttrSet) | |
void | SetModifiedHandler (const Link< OGenericAdministrationPage const *, void > &_rHandler) |
set a handler which gets called every time something on the page has been modified More... | |
void | SetAdminDialog (IDatabaseSettingsDialog *_pDialog, IItemSetHelper *_pItemSetHelper) |
Sets the ParentDialog. More... | |
void | SetServiceFactory (const css::uno::Reference< css::uno::XComponentContext > &rxORB) |
Sets the ServiceFactory. More... | |
bool | getSelectedDataSource (OUString &_sReturn, OUString const &_sCurr) |
opens a dialog filled with all data sources available for this type and returns the selected on. More... | |
virtual void | initializePage () override |
virtual bool | commitPage (::vcl::WizardTypes::CommitPageReason _eReason) override |
virtual bool | canAdvance () const override |
void | SetRoadmapStateValue (bool _bDoEnable) |
bool | GetRoadmapStateValue () const |
Public Member Functions inherited from SfxTabPage | |
void | SetDialogController (SfxOkDialogController *pDialog) |
virtual | ~SfxTabPage () override |
void | set_visible (bool bVisible) |
const SfxItemSet & | GetItemSet () const |
virtual bool | FillItemSet (SfxItemSet *) |
virtual void | Reset (const SfxItemSet *) |
virtual bool | DeferResetToFirstActivation () |
bool | HasExchangeSupport () const |
void | SetExchangeSupport () |
virtual void | ActivatePage (const SfxItemSet &) |
virtual DeactivateRC | DeactivatePage (SfxItemSet *pSet) |
void | SetUserData (const OUString &rString) |
const OUString & | GetUserData () const |
virtual void | FillUserData () |
virtual bool | IsReadOnly () const |
virtual void | PageCreated (const SfxAllItemSet &aSet) |
virtual void | ChangesApplied () |
void | SetFrame (const css::uno::Reference< css::frame::XFrame > &xFrame) |
css::uno::Reference< css::frame::XFrame > | GetFrame () const |
const SfxItemSet * | GetDialogExampleSet () const |
OUString | GetHelpId () const |
OUString | GetConfigId () const |
bool | IsVisible () const |
weld::Window * | GetFrameWeld () const |
std::unordered_map< OUString, css::uno::Any > & | getAdditionalProperties () |
Static Public Member Functions | |
static std::unique_ptr< SfxTabPage > | Create (weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *_rAttrSet) |
Static Public Member Functions inherited from dbaui::OGenericAdministrationPage | |
static void | fillBool (SfxItemSet &_rSet, const weld::CheckButton *pCheckBox, sal_uInt16 _nID, bool bOptionalBool, bool &_bChangedSomething, bool _bRevertValue=false) |
fills the Boolean value into the item set when the value changed. More... | |
static void | fillInt32 (SfxItemSet &_rSet, const weld::SpinButton *pEdit, TypedWhichId< SfxInt32Item > _nID, bool &_bChangedSomething) |
fills the int value into the item set when the value changed. More... | |
static void | fillString (SfxItemSet &_rSet, const weld::Entry *pEdit, TypedWhichId< SfxStringItem > _nID, bool &_bChangedSomething) |
fills the String value into the item set when the value changed. More... | |
static void | fillString (SfxItemSet &_rSet, const dbaui::OConnectionURLEdit *pEdit, TypedWhichId< SfxStringItem > _nID, bool &_bChangedSomething) |
Static Public Member Functions inherited from SfxTabPage | |
static const SfxPoolItem * | GetItem (const SfxItemSet &rSet, sal_uInt16 nSlot, bool bDeep=true) |
static const T * | GetItem (const SfxItemSet &rSet, TypedWhichId< T > nSlot, bool bDeep=true) |
Private Member Functions | |
DECL_LINK (OnTestJavaClickHdl, weld::Button &, void) | |
DECL_LINK (OnEditModified, weld::Entry &, void) | |
virtual bool | checkTestConnection () override |
changes the connection URL. More... | |
Private Attributes | |
std::unique_ptr< weld::Label > | m_xFL2 |
std::unique_ptr< weld::Label > | m_xUserNameLabel |
std::unique_ptr< weld::Entry > | m_xUserName |
std::unique_ptr< weld::CheckButton > | m_xPasswordRequired |
std::unique_ptr< weld::Label > | m_xFL3 |
std::unique_ptr< weld::Label > | m_xJavaDriverLabel |
std::unique_ptr< weld::Entry > | m_xJavaDriver |
std::unique_ptr< weld::Button > | m_xTestJavaDriver |
std::unique_ptr< weld::Button > | m_xTestConnection |
Additional Inherited Members | |
Public Attributes inherited from dbaui::OConnectionHelper | |
OUString | m_eType |
::dbaccess::ODsnTypeCollection * | m_pCollection |
std::unique_ptr< weld::Label > | m_xFT_Connection |
the DSN type collection instance More... | |
std::unique_ptr< weld::Button > | m_xPB_Connection |
std::unique_ptr< weld::Button > | m_xPB_CreateDB |
std::unique_ptr< OConnectionURLEdit > | m_xConnectionURL |
Protected Member Functions inherited from dbaui::OConnectionHelper | |
void | setURL (std::u16string_view _rURL) |
virtual bool | checkTestConnection () |
Protected Member Functions inherited from dbaui::OGenericAdministrationPage | |
virtual DeactivateRC | DeactivatePage (SfxItemSet *pSet) override |
default implementation: call FillItemSet, call prepareLeave, More... | |
virtual void | Reset (const SfxItemSet *_rCoreAttrs) override |
default implementation: call implInitControls with the given item set and _bSaveValue = sal_False More... | |
virtual void | ActivatePage (const SfxItemSet &_rSet) override |
default implementation: call implInitControls with the given item set and _bSaveValue = sal_True More... | |
virtual void | Activate () override |
virtual void | callModifiedHdl (weld::Widget *=nullptr) |
virtual bool | prepareLeave () |
called from within DeactivatePage. The page is allowed to be deactivated if this method returns sal_True More... | |
virtual void | implInitControls (const SfxItemSet &_rSet, bool _bSaveValue) |
called from within Reset and ActivatePage, use to initialize the controls with the items from the given set More... | |
virtual void | fillControls (std::vector< std::unique_ptr< ISaveValueWrapper > > &_rControlList)=0 |
will be called inside <method>implInitControls</method> to save the value if necessary More... | |
virtual void | fillWindows (std::vector< std::unique_ptr< ISaveValueWrapper > > &_rControlList)=0 |
will be called inside <method>implInitControls</method> to disable if necessary More... | |
DECL_LINK (OnControlModified, weld::Widget *, void) | |
This link be used for controls where the tabpage does not need to take any special action when the control is modified. More... | |
DECL_LINK (OnControlEntryModifyHdl, weld::Entry &, void) | |
DECL_LINK (OnControlSpinButtonModifyHdl, weld::SpinButton &, void) | |
DECL_LINK (OnControlModifiedButtonClick, weld::Toggleable &, void) | |
DECL_LINK (OnTestConnectionButtonClickHdl, weld::Button &, void) | |
Protected Member Functions inherited from SfxTabPage | |
SfxTabPage (weld::Container *pPage, weld::DialogController *pController, const OUString &rUIXMLDescription, const OUString &rID, const SfxItemSet *rAttrSet) | |
sal_uInt16 | GetWhich (sal_uInt16 nSlot, bool bDeep=true) const |
TypedWhichId< T > | GetWhich (TypedWhichId< T > nSlot, bool bDeep=true) const |
const SfxPoolItem * | GetOldItem (const SfxItemSet &rSet, sal_uInt16 nSlot, bool bDeep=true) |
const T * | GetOldItem (const SfxItemSet &rSet, TypedWhichId< T > nSlot, bool bDeep=true) |
SfxOkDialogController * | GetDialogController () const |
Static Protected Member Functions inherited from dbaui::OGenericAdministrationPage | |
static void | getFlags (const SfxItemSet &_rSet, bool &_rValid, bool &_rReadonly) |
analyze the invalid and the readonly flag which may be present in the set More... | |
Protected Attributes inherited from dbaui::OGenericAdministrationPage | |
IDatabaseSettingsDialog * | m_pAdminDialog |
IItemSetHelper * | m_pItemSetHelper |
css::uno::Reference< css::uno::XComponentContext > | m_xORB |
implements the connection page of the data source properties dialog.
Definition at line 31 of file ConnectionPage.hxx.
dbaui::OConnectionTabPage::OConnectionTabPage | ( | weld::Container * | pPage, |
weld::DialogController * | pController, | ||
const SfxItemSet & | _rCoreAttrs | ||
) |
Definition at line 58 of file ConnectionPage.cxx.
References LINK, dbaui::OConnectionHelper::m_xConnectionURL, m_xJavaDriver, m_xPasswordRequired, m_xTestConnection, m_xTestJavaDriver, and m_xUserName.
|
overridevirtual |
Definition at line 79 of file ConnectionPage.cxx.
|
overrideprivatevirtual |
changes the connection URL.
The new URL must be of the type which is currently selected, only the parts which do not affect the type may be changed (compared to the previous URL).
enables the test connection button, if allowed
Reimplemented from dbaui::OConnectionHelper.
Definition at line 264 of file ConnectionPage.cxx.
References dbaccess::ODsnTypeCollection::determineType(), dbaccess::DST_JDBC, dbaui::OConnectionHelper::m_eType, dbaui::OGenericAdministrationPage::m_pAdminDialog, dbaui::OConnectionHelper::m_pCollection, dbaui::OConnectionHelper::m_xConnectionURL, m_xJavaDriver, m_xTestConnection, and o3tl::trim().
Referenced by implInitControls().
|
static |
Definition at line 52 of file ConnectionPage.cxx.
Referenced by dbaui::ODbTypeWizDialog::createPage(), and dbaui::ODbAdminDialog::ODbAdminDialog().
|
private |
|
private |
|
overridevirtual |
Reimplemented from SfxTabPage.
Definition at line 218 of file ConnectionPage.cxx.
References dbaccess::ODsnTypeCollection::determineType(), DSID_CONNECTURL, DSID_JDBCDRIVERCLASS, DSID_PASSWORD, DSID_PASSWORDREQUIRED, DSID_USER, dbaccess::DST_JDBC, dbaui::OGenericAdministrationPage::fillBool(), dbaui::OGenericAdministrationPage::fillString(), dbaui::OConnectionHelper::m_eType, dbaui::OConnectionHelper::m_pCollection, dbaui::OConnectionHelper::m_xConnectionURL, m_xJavaDriver, m_xPasswordRequired, m_xUserName, and SfxItemSet::Put().
|
overridevirtual |
called from within Reset and ActivatePage, use to initialize the controls with the items from the given set
_bSaveValue | if set to sal_True, the implementation should call SaveValue on all relevant controls |
Reimplemented from dbaui::OConnectionHelper.
Definition at line 83 of file ConnectionPage.cxx.
References dbaui::AuthNone, dbaui::AuthUserPwd, checkTestConnection(), DBA_RES, dbaccess::ODsnTypeCollection::determineType(), DSID_CONNECTURL, DSID_JDBCDRIVERCLASS, DSID_PASSWORDREQUIRED, DSID_USER, dbaccess::DST_ADO, dbaccess::DST_CALC, dbaccess::DST_DBASE, dbaccess::DST_EVOLUTION, dbaccess::DST_EVOLUTION_GROUPWISE, dbaccess::DST_EVOLUTION_LDAP, dbaccess::DST_FLAT, dbaccess::DST_JDBC, dbaccess::DST_KAB, dbaccess::DST_LDAP, dbaccess::DST_MACAB, dbaccess::DST_MOZILLA, dbaccess::DST_MSACCESS, dbaccess::DST_MSACCESS_2007, dbaccess::DST_MYSQL_JDBC, dbaccess::DST_MYSQL_NATIVE, dbaccess::DST_MYSQL_ODBC, dbaccess::DST_ODBC, dbaccess::DST_ORACLE_JDBC, dbaccess::DST_OUTLOOK, dbaccess::DST_OUTLOOKEXP, dbaccess::DST_THUNDERBIRD, dbaccess::DST_WRITER, eType, dbaui::DataSourceMetaData::getAuthentication(), dbaui::IDatabaseSettingsDialog::getDatasourceType(), dbaui::OGenericAdministrationPage::getFlags(), SfxItemSet::GetItem(), dbaccess::ODsnTypeCollection::getJavaDriverClass(), CntUnencodedStringItem::GetValue(), HID_DSADMIN_BROWSECONN, HID_DSADMIN_CALC_PATH, HID_DSADMIN_DBASE_PATH, HID_DSADMIN_FLAT_PATH, HID_DSADMIN_LDAP_HOSTNAME, HID_DSADMIN_MOZILLA_PROFILE_NAME, HID_DSADMIN_MSACCESS_MDB_FILE, HID_DSADMIN_MYSQL_DATABASE, HID_DSADMIN_MYSQL_ODBC_DATASOURCE, HID_DSADMIN_ODBC_DATASOURCE, HID_DSADMIN_ORACLE_DATABASE, HID_DSADMIN_THUNDERBIRD_PROFILE_NAME, HID_DSADMIN_WRITER_PATH, dbaui::OConnectionHelper::implInitControls(), dbaui::OConnectionHelper::m_eType, dbaui::OGenericAdministrationPage::m_pAdminDialog, dbaui::OConnectionHelper::m_pCollection, dbaui::OConnectionHelper::m_xConnectionURL, m_xFL2, m_xFL3, dbaui::OConnectionHelper::m_xFT_Connection, m_xJavaDriver, m_xJavaDriverLabel, m_xPasswordRequired, dbaui::OConnectionHelper::m_xPB_Connection, m_xTestConnection, m_xTestJavaDriver, m_xUserName, m_xUserNameLabel, dbaui::OConnectionHelper::setURL(), and o3tl::trim().
|
private |
Definition at line 35 of file ConnectionPage.hxx.
Referenced by implInitControls().
|
private |
Definition at line 41 of file ConnectionPage.hxx.
Referenced by implInitControls().
|
private |
Definition at line 43 of file ConnectionPage.hxx.
Referenced by checkTestConnection(), FillItemSet(), implInitControls(), and OConnectionTabPage().
|
private |
Definition at line 42 of file ConnectionPage.hxx.
Referenced by implInitControls().
|
private |
Definition at line 38 of file ConnectionPage.hxx.
Referenced by FillItemSet(), implInitControls(), and OConnectionTabPage().
|
private |
Definition at line 47 of file ConnectionPage.hxx.
Referenced by checkTestConnection(), implInitControls(), and OConnectionTabPage().
|
private |
Definition at line 44 of file ConnectionPage.hxx.
Referenced by implInitControls(), and OConnectionTabPage().
|
private |
Definition at line 37 of file ConnectionPage.hxx.
Referenced by FillItemSet(), implInitControls(), and OConnectionTabPage().
|
private |
Definition at line 36 of file ConnectionPage.hxx.
Referenced by implInitControls().