From 6d5791332d4ba6a3f506d8cb27f7a44fe84855c7 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 24 Oct 2018 16:31:05 +0100 Subject: rename DBOConnectionURLEdit and DBOConnectionHelper back MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I9353efc407d9dab04b72d7ddedd43bfa125c63ca Reviewed-on: https://gerrit.libreoffice.org/62328 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- dbaccess/source/ui/control/curledit.cxx | 16 ++++---- dbaccess/source/ui/dlg/ConnectionHelper.cxx | 56 +++++++++++++------------- dbaccess/source/ui/dlg/ConnectionHelper.hxx | 8 ++-- dbaccess/source/ui/dlg/ConnectionPage.cxx | 4 +- dbaccess/source/ui/dlg/ConnectionPage.hxx | 2 +- dbaccess/source/ui/dlg/ConnectionPageSetup.cxx | 4 +- dbaccess/source/ui/dlg/ConnectionPageSetup.hxx | 2 +- dbaccess/source/ui/dlg/adminpages.cxx | 2 +- dbaccess/source/ui/dlg/adminpages.hxx | 8 ++-- dbaccess/source/ui/inc/curledit.hxx | 6 +-- 10 files changed, 54 insertions(+), 54 deletions(-) diff --git a/dbaccess/source/ui/control/curledit.cxx b/dbaccess/source/ui/control/curledit.cxx index 234ebdb935f9..7c8df5e88e21 100644 --- a/dbaccess/source/ui/control/curledit.cxx +++ b/dbaccess/source/ui/control/curledit.cxx @@ -26,7 +26,7 @@ namespace dbaui { -DBOConnectionURLEdit::DBOConnectionURLEdit(std::unique_ptr xEntry, std::unique_ptr xForcedPrefix) +OConnectionURLEdit::OConnectionURLEdit(std::unique_ptr xEntry, std::unique_ptr xForcedPrefix) : m_pTypeCollection(nullptr) , m_bShowPrefix(false) , m_xEntry(std::move(xEntry)) @@ -34,27 +34,27 @@ DBOConnectionURLEdit::DBOConnectionURLEdit(std::unique_ptr xEntry, { } -DBOConnectionURLEdit::~DBOConnectionURLEdit() +OConnectionURLEdit::~OConnectionURLEdit() { } -void DBOConnectionURLEdit::SetTextNoPrefix(const OUString& _rText) +void OConnectionURLEdit::SetTextNoPrefix(const OUString& _rText) { m_xEntry->set_text(_rText); } -OUString DBOConnectionURLEdit::GetTextNoPrefix() const +OUString OConnectionURLEdit::GetTextNoPrefix() const { return m_xEntry->get_text(); } -void DBOConnectionURLEdit::SetText(const OUString& _rStr) +void OConnectionURLEdit::SetText(const OUString& _rStr) { Selection aNoSelection(0,0); SetText(_rStr, aNoSelection); } -void DBOConnectionURLEdit::SetText(const OUString& _rStr, const Selection& /*_rNewSelection*/) +void OConnectionURLEdit::SetText(const OUString& _rStr, const Selection& /*_rNewSelection*/) { m_xForcedPrefix->show(m_bShowPrefix); @@ -77,12 +77,12 @@ void DBOConnectionURLEdit::SetText(const OUString& _rStr, const Selection& /*_rN m_xEntry->set_text(sNewText); } -OUString DBOConnectionURLEdit::GetText() const +OUString OConnectionURLEdit::GetText() const { return m_xForcedPrefix->get_label() + m_xEntry->get_text(); } -void DBOConnectionURLEdit::ShowPrefix(bool _bShowPrefix) +void OConnectionURLEdit::ShowPrefix(bool _bShowPrefix) { m_bShowPrefix = _bShowPrefix; m_xForcedPrefix->show(m_bShowPrefix); diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index d9067ffeff97..1288ff708241 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -81,39 +81,39 @@ namespace dbaui using namespace ::dbtools; using namespace ::svt; - DBOConnectionHelper::DBOConnectionHelper(TabPageParent pParent, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs) + OConnectionHelper::OConnectionHelper(TabPageParent pParent, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs) : OGenericAdministrationPage(pParent, _rUIXMLDescription, _rId, _rCoreAttrs) , m_bUserGrabFocus(false) , m_pCollection(nullptr) , m_xFT_Connection(m_xBuilder->weld_label("browseurllabel")) , m_xPB_Connection(m_xBuilder->weld_button("browse")) , m_xPB_CreateDB(m_xBuilder->weld_button("create")) - , m_xConnectionURL(new DBOConnectionURLEdit(m_xBuilder->weld_entry("browseurl"), m_xBuilder->weld_label("browselabel"))) + , m_xConnectionURL(new OConnectionURLEdit(m_xBuilder->weld_entry("browseurl"), m_xBuilder->weld_label("browselabel"))) { // extract the datasource type collection from the item set const DbuTypeCollectionItem* pCollectionItem = dynamic_cast( _rCoreAttrs.GetItem(DSID_TYPECOLLECTION) ); if (pCollectionItem) m_pCollection = pCollectionItem->getCollection(); - m_xPB_Connection->connect_clicked(LINK(this, DBOConnectionHelper, OnBrowseConnections)); - m_xPB_CreateDB->connect_clicked(LINK(this, DBOConnectionHelper, OnCreateDatabase)); + m_xPB_Connection->connect_clicked(LINK(this, OConnectionHelper, OnBrowseConnections)); + m_xPB_CreateDB->connect_clicked(LINK(this, OConnectionHelper, OnCreateDatabase)); OSL_ENSURE(m_pCollection, "OConnectionHelper::OConnectionHelper : really need a DSN type collection !"); m_xConnectionURL->SetTypeCollection(m_pCollection); - m_xConnectionURL->connect_focus_in(LINK(this, DBOConnectionHelper, GetFocusHdl)); - m_xConnectionURL->connect_focus_out(LINK(this, DBOConnectionHelper, LoseFocusHdl)); + m_xConnectionURL->connect_focus_in(LINK(this, OConnectionHelper, GetFocusHdl)); + m_xConnectionURL->connect_focus_out(LINK(this, OConnectionHelper, LoseFocusHdl)); } - DBOConnectionHelper::~DBOConnectionHelper() + OConnectionHelper::~OConnectionHelper() { } - void DBOConnectionHelper::dispose() + void OConnectionHelper::dispose() { m_xConnectionURL.reset(); OGenericAdministrationPage::dispose(); } - void DBOConnectionHelper::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) + void OConnectionHelper::implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) { // check whether or not the selection is invalid or readonly (invalid implies readonly, but not vice versa) bool bValid, bReadonly; @@ -144,7 +144,7 @@ namespace dbaui OGenericAdministrationPage::implInitControls(_rSet, _bSaveValue); } - void DBOConnectionHelper::implUpdateURLDependentStates() const + void OConnectionHelper::implUpdateURLDependentStates() const { OSL_PRECOND( m_pAdminDialog && m_pCollection, "OConnectionHelper::implUpdateURLDependentStates: no admin dialog!" ); if ( !m_pAdminDialog || !m_pCollection ) @@ -154,7 +154,7 @@ namespace dbaui m_pAdminDialog->enableConfirmSettings( !getURLNoPrefix().isEmpty() ); } - IMPL_LINK_NOARG(DBOConnectionHelper, OnBrowseConnections, weld::Button&, void) + IMPL_LINK_NOARG(OConnectionHelper, OnBrowseConnections, weld::Button&, void) { OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF"); const ::dbaccess::DATASOURCE_TYPE eType = m_pCollection->determineType(m_eType); @@ -341,7 +341,7 @@ namespace dbaui checkTestConnection(); } - IMPL_LINK_NOARG(DBOConnectionHelper, OnCreateDatabase, weld::Button&, void) + IMPL_LINK_NOARG(OConnectionHelper, OnCreateDatabase, weld::Button&, void) { OSL_ENSURE(m_pAdminDialog,"No Admin dialog set! ->GPF"); const ::dbaccess::DATASOURCE_TYPE eType = m_pCollection->determineType(m_eType); @@ -366,12 +366,12 @@ namespace dbaui checkTestConnection(); } - bool DBOConnectionHelper::checkTestConnection() + bool OConnectionHelper::checkTestConnection() { return true; } - void DBOConnectionHelper::impl_setURL( const OUString& _rURL, bool _bPrefix ) + void OConnectionHelper::impl_setURL( const OUString& _rURL, bool _bPrefix ) { OUString sURL( comphelper::string::stripEnd(_rURL, '*') ); OSL_ENSURE( m_pCollection, "OConnectionHelper::impl_setURL: have no interpreter for the URLs!" ); @@ -414,7 +414,7 @@ namespace dbaui implUpdateURLDependentStates(); } - OUString DBOConnectionHelper::impl_getURL() const + OUString OConnectionHelper::impl_getURL() const { // get the pure text OUString sURL = m_xConnectionURL->GetTextNoPrefix(); @@ -444,22 +444,22 @@ namespace dbaui return sURL; } - void DBOConnectionHelper::setURL( const OUString& _rURL ) + void OConnectionHelper::setURL( const OUString& _rURL ) { impl_setURL( _rURL, true ); } - OUString DBOConnectionHelper::getURLNoPrefix( ) const + OUString OConnectionHelper::getURLNoPrefix( ) const { return impl_getURL(); } - void DBOConnectionHelper::setURLNoPrefix( const OUString& _rURL ) + void OConnectionHelper::setURLNoPrefix( const OUString& _rURL ) { impl_setURL( _rURL, false ); } - sal_Int32 DBOConnectionHelper::checkPathExistence(const OUString& _rURL) + sal_Int32 OConnectionHelper::checkPathExistence(const OUString& _rURL) { IS_PATH_EXIST e_exists = pathExists(_rURL, false); if (!m_pCollection->supportsDBCreation(m_eType) && @@ -536,7 +536,7 @@ namespace dbaui return RET_OK; } - IS_PATH_EXIST DBOConnectionHelper::pathExists(const OUString& _rURL, bool bIsFile) const + IS_PATH_EXIST OConnectionHelper::pathExists(const OUString& _rURL, bool bIsFile) const { ::ucbhelper::Content aCheckExistence; IS_PATH_EXIST eExists = PATH_NOT_EXIST; @@ -559,7 +559,7 @@ namespace dbaui return eExists; } - IMPL_LINK_NOARG(DBOConnectionHelper, GetFocusHdl, weld::Widget&, void) + IMPL_LINK_NOARG(OConnectionHelper, GetFocusHdl, weld::Widget&, void) { if (!m_pCollection->isFileSystemBased(m_eType)) return; @@ -569,7 +569,7 @@ namespace dbaui m_xConnectionURL->SaveValueNoPrefix(); } - IMPL_LINK_NOARG(DBOConnectionHelper, LoseFocusHdl, weld::Widget&, void) + IMPL_LINK_NOARG(OConnectionHelper, LoseFocusHdl, weld::Widget&, void) { if (!m_pCollection->isFileSystemBased(m_eType)) return; @@ -579,7 +579,7 @@ namespace dbaui commitURL(); } - bool DBOConnectionHelper::createDirectoryDeep(const OUString& _rPathURL) + bool OConnectionHelper::createDirectoryDeep(const OUString& _rPathURL) { // get an URL object analyzing the URL for us ... INetURLObject aParser; @@ -646,19 +646,19 @@ namespace dbaui return true; } - void DBOConnectionHelper::fillWindows(std::vector< std::unique_ptr >& _rControlList) + void OConnectionHelper::fillWindows(std::vector< std::unique_ptr >& _rControlList) { _rControlList.emplace_back(new ODisableWidgetWrapper(m_xFT_Connection.get())); _rControlList.emplace_back(new ODisableWidgetWrapper(m_xPB_Connection.get())); _rControlList.emplace_back(new ODisableWidgetWrapper(m_xPB_CreateDB.get())); } - void DBOConnectionHelper::fillControls(std::vector< std::unique_ptr >& _rControlList) + void OConnectionHelper::fillControls(std::vector< std::unique_ptr >& _rControlList) { - _rControlList.emplace_back( new OSaveValueWidgetWrapper( m_xConnectionURL.get() ) ); + _rControlList.emplace_back( new OSaveValueWidgetWrapper( m_xConnectionURL.get() ) ); } - bool DBOConnectionHelper::commitURL() + bool OConnectionHelper::commitURL() { OUString sURL; OUString sOldPath; @@ -713,7 +713,7 @@ namespace dbaui return true; } - void DBOConnectionHelper::askForFileName(::sfx2::FileDialogHelper& _aFileOpen) + void OConnectionHelper::askForFileName(::sfx2::FileDialogHelper& _aFileOpen) { OUString sOldPath = getURLNoPrefix(); if ( !sOldPath.isEmpty() ) diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.hxx b/dbaccess/source/ui/dlg/ConnectionHelper.hxx index 2c558e38d04f..094d9336356d 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.hxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.hxx @@ -35,13 +35,13 @@ namespace dbaui PATH_NOT_KNOWN }; - class DBOConnectionHelper : public OGenericAdministrationPage + class OConnectionHelper : public OGenericAdministrationPage { bool m_bUserGrabFocus; public: - DBOConnectionHelper(TabPageParent pParent, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs); - virtual ~DBOConnectionHelper() override; + OConnectionHelper(TabPageParent pParent, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs); + virtual ~OConnectionHelper() override; virtual void dispose() override; OUString m_eType; // the type can't be changed in this class, so we hold it as member. @@ -52,7 +52,7 @@ namespace dbaui std::unique_ptr m_xFT_Connection; std::unique_ptr m_xPB_Connection; std::unique_ptr m_xPB_CreateDB; - std::unique_ptr m_xConnectionURL; + std::unique_ptr m_xConnectionURL; public: diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx index f896451c2919..d11f83269de9 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx @@ -83,7 +83,7 @@ namespace dbaui // OConnectionTabPage OConnectionTabPage::OConnectionTabPage(TabPageParent pParent, const SfxItemSet& _rCoreAttrs) - : DBOConnectionHelper(pParent, "dbaccess/ui/connectionpage.ui", "ConnectionPage", _rCoreAttrs) + : OConnectionHelper(pParent, "dbaccess/ui/connectionpage.ui", "ConnectionPage", _rCoreAttrs) , m_xFL2(m_xBuilder->weld_label("userlabel")) , m_xUserNameLabel(m_xBuilder->weld_label("userNameLabel")) , m_xUserName(m_xBuilder->weld_entry("userNameEntry")) @@ -115,7 +115,7 @@ namespace dbaui getFlags(_rSet, bValid, bReadonly); m_eType = m_pAdminDialog->getDatasourceType(_rSet); - DBOConnectionHelper::implInitControls( _rSet, _bSaveValue); + OConnectionHelper::implInitControls( _rSet, _bSaveValue); ::dbaccess::DATASOURCE_TYPE eType = m_pCollection->determineType(m_eType); switch( eType ) diff --git a/dbaccess/source/ui/dlg/ConnectionPage.hxx b/dbaccess/source/ui/dlg/ConnectionPage.hxx index d7d4be7b5fe8..2d09046d72b1 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.hxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.hxx @@ -32,7 +32,7 @@ namespace dbaui /** implements the connection page of the data source properties dialog. */ - class OConnectionTabPage final : public DBOConnectionHelper + class OConnectionTabPage final : public OConnectionHelper { friend class VclPtr; private: diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx index 6d7588b077f9..2b20943c745c 100644 --- a/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.cxx @@ -87,7 +87,7 @@ namespace dbaui } OConnectionTabPageSetup::OConnectionTabPageSetup(TabPageParent pParent, const OUString& _rUIXMLDescription, const OString& _rId, const SfxItemSet& _rCoreAttrs, const char* pHelpTextResId, const char* pHeaderResId, const char* pUrlResId) - : DBOConnectionHelper(pParent, _rUIXMLDescription, _rId, _rCoreAttrs) + : OConnectionHelper(pParent, _rUIXMLDescription, _rId, _rCoreAttrs) , m_xHelpText(m_xBuilder->weld_label("helptext")) , m_xHeaderText(m_xBuilder->weld_label("header")) { @@ -133,7 +133,7 @@ namespace dbaui SetRoadmapStateValue(true); } - DBOConnectionHelper::implInitControls(_rSet, _bSaveValue); + OConnectionHelper::implInitControls(_rSet, _bSaveValue); //! TODO //if ( m_eType >= ::dbaccess::DST_USERDEFINE1 ) diff --git a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx index c1ef26cdc656..c66ba64f3259 100644 --- a/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx +++ b/dbaccess/source/ui/dlg/ConnectionPageSetup.hxx @@ -34,7 +34,7 @@ namespace dbaui /** implements the connection page of the data source properties dialog. */ - class OConnectionTabPageSetup : public DBOConnectionHelper + class OConnectionTabPageSetup : public OConnectionHelper { friend class VclPtr; protected: diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx index 94563a153fd8..43c6fbf3f32b 100644 --- a/dbaccess/source/ui/dlg/adminpages.cxx +++ b/dbaccess/source/ui/dlg/adminpages.cxx @@ -292,7 +292,7 @@ namespace dbaui _bChangedSomething = true; } } - void OGenericAdministrationPage::fillString(SfxItemSet& _rSet, const dbaui::DBOConnectionURLEdit* pEdit, sal_uInt16 _nID, bool& _bChangedSomething) + void OGenericAdministrationPage::fillString(SfxItemSet& _rSet, const dbaui::OConnectionURLEdit* pEdit, sal_uInt16 _nID, bool& _bChangedSomething) { if (pEdit && pEdit->get_value_changed_from_saved()) { diff --git a/dbaccess/source/ui/dlg/adminpages.hxx b/dbaccess/source/ui/dlg/adminpages.hxx index 64c787014e8b..feabe5fb8c47 100644 --- a/dbaccess/source/ui/dlg/adminpages.hxx +++ b/dbaccess/source/ui/dlg/adminpages.hxx @@ -74,11 +74,11 @@ namespace dbaui virtual void Disable() override { m_pSaveValue->set_sensitive(false); } }; - template <> class OSaveValueWidgetWrapper : public ISaveValueWrapper + template <> class OSaveValueWidgetWrapper : public ISaveValueWrapper { - dbaui::DBOConnectionURLEdit* m_pSaveValue; + dbaui::OConnectionURLEdit* m_pSaveValue; public: - explicit OSaveValueWidgetWrapper(dbaui::DBOConnectionURLEdit* _pSaveValue) : m_pSaveValue(_pSaveValue) + explicit OSaveValueWidgetWrapper(dbaui::OConnectionURLEdit* _pSaveValue) : m_pSaveValue(_pSaveValue) { OSL_ENSURE(m_pSaveValue,"Illegal argument!"); } virtual void SaveValue() override { m_pSaveValue->save_value(); } @@ -250,7 +250,7 @@ namespace dbaui */ static void fillString(SfxItemSet& _rSet,Edit const * _pEdit,sal_uInt16 _nID, bool& _bChangedSomething); static void fillString(SfxItemSet& _rSet,const weld::Entry* pEdit,sal_uInt16 _nID, bool& _bChangedSomething); - static void fillString(SfxItemSet& _rSet,const dbaui::DBOConnectionURLEdit* pEdit,sal_uInt16 _nID, bool& _bChangedSomething); + static void fillString(SfxItemSet& _rSet,const dbaui::OConnectionURLEdit* pEdit,sal_uInt16 _nID, bool& _bChangedSomething); protected: /** This link be used for controls where the tabpage does not need to take any special action when the control diff --git a/dbaccess/source/ui/inc/curledit.hxx b/dbaccess/source/ui/inc/curledit.hxx index 92b62ac9a6ab..f87695ef7e3d 100644 --- a/dbaccess/source/ui/inc/curledit.hxx +++ b/dbaccess/source/ui/inc/curledit.hxx @@ -28,7 +28,7 @@ namespace dbaui { -class DBOConnectionURLEdit +class OConnectionURLEdit { OUString m_sSavedValue; @@ -40,8 +40,8 @@ class DBOConnectionURLEdit std::unique_ptr m_xForcedPrefix; public: - DBOConnectionURLEdit(std::unique_ptr xEntry, std::unique_ptr xForcedPrefix); - ~DBOConnectionURLEdit(); + OConnectionURLEdit(std::unique_ptr xEntry, std::unique_ptr xForcedPrefix); + ~OConnectionURLEdit(); public: bool get_visible() const { return m_xEntry->get_visible(); } -- cgit