diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-06-11 14:34:46 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-06-11 14:39:04 +0200 |
commit | bb761be472ea9a590837dc6c1ca295387ac4c0b7 (patch) | |
tree | 178b4187effe2a05f3d77660ad83eea97144a287 /dbaccess/source | |
parent | 4d120b6ab181f530d3fedc963b1c6ec777f2608a (diff) |
Change SfxTabPage ctor SfxItemSet param from ref to pointer
...and also corresponding param of CreateTabPage function type and corresponding
Craete functions. There were some call sites that passed undefined "null
pointer references" and SfxTabPage internally uses a pointer member pSet that is
checked for null anyway.
Change-Id: I4eb3636155eac46c9c9d26e6e6e842e85d7e95af
Diffstat (limited to 'dbaccess/source')
-rw-r--r-- | dbaccess/source/ui/dlg/ConnectionPage.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/ConnectionPage.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/DriverSettings.hxx | 26 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/UserAdmin.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/UserAdmin.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/adminpages.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dbwiz.cxx | 22 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/detailpages.cxx | 50 |
8 files changed, 56 insertions, 56 deletions
diff --git a/dbaccess/source/ui/dlg/ConnectionPage.cxx b/dbaccess/source/ui/dlg/ConnectionPage.cxx index 00648f52da29..a3eb7543ae6b 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.cxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.cxx @@ -83,9 +83,9 @@ namespace dbaui using namespace ::dbtools; using namespace ::svt; - SfxTabPage* OConnectionTabPage::Create( Window* pParent, const SfxItemSet& _rAttrSet ) + SfxTabPage* OConnectionTabPage::Create( Window* pParent, const SfxItemSet* _rAttrSet ) { - return ( new OConnectionTabPage( pParent, _rAttrSet ) ); + return ( new OConnectionTabPage( pParent, *_rAttrSet ) ); } // OConnectionTabPage OConnectionTabPage::OConnectionTabPage(Window* pParent, const SfxItemSet& _rCoreAttrs) diff --git a/dbaccess/source/ui/dlg/ConnectionPage.hxx b/dbaccess/source/ui/dlg/ConnectionPage.hxx index 8ce9296020dc..2e1c8366f32d 100644 --- a/dbaccess/source/ui/dlg/ConnectionPage.hxx +++ b/dbaccess/source/ui/dlg/ConnectionPage.hxx @@ -57,7 +57,7 @@ namespace dbaui DECL_LINK(OnEditModified,Edit*); public: - static SfxTabPage* Create( Window* pParent, const SfxItemSet& _rAttrSet ); + static SfxTabPage* Create( Window* pParent, const SfxItemSet* _rAttrSet ); virtual bool FillItemSet (SfxItemSet* _rCoreAttrs) SAL_OVERRIDE; virtual void implInitControls(const SfxItemSet& _rSet, bool _bSaveValue) SAL_OVERRIDE; diff --git a/dbaccess/source/ui/dlg/DriverSettings.hxx b/dbaccess/source/ui/dlg/DriverSettings.hxx index 3854bd61616e..a31fd62625fd 100644 --- a/dbaccess/source/ui/dlg/DriverSettings.hxx +++ b/dbaccess/source/ui/dlg/DriverSettings.hxx @@ -44,53 +44,53 @@ namespace dbaui /** Creates the detail page for Dbase */ - static SfxTabPage* CreateDbase2( Window* _pParent, const SfxItemSet& _rAttrSet ); + static SfxTabPage* CreateDbase2( Window* _pParent, const SfxItemSet* _rAttrSet ); /** Creates the detail page for ado */ - static SfxTabPage* CreateDbase( Window* _pParent, const SfxItemSet& _rAttrSet ); + static SfxTabPage* CreateDbase( Window* _pParent, const SfxItemSet* _rAttrSet ); /** Creates the detail page for ado */ - static SfxTabPage* CreateAdo( Window* _pParent, const SfxItemSet& _rAttrSet ); + static SfxTabPage* CreateAdo( Window* _pParent, const SfxItemSet* _rAttrSet ); /** Creates the detail page for ODBC */ - static SfxTabPage* CreateODBC( Window* _pParent, const SfxItemSet& _rAttrSet ); + static SfxTabPage* CreateODBC( Window* _pParent, const SfxItemSet* _rAttrSet ); /** Creates the detail page for user */ - static SfxTabPage* CreateUser( Window* _pParent, const SfxItemSet& _rAttrSet ); + static SfxTabPage* CreateUser( Window* _pParent, const SfxItemSet* _rAttrSet ); /** Creates the detail page for MySQLODBC */ - static SfxTabPage* CreateMySQLODBC( Window* _pParent, const SfxItemSet& _rAttrSet ); + static SfxTabPage* CreateMySQLODBC( Window* _pParent, const SfxItemSet* _rAttrSet ); /** Creates the detail page for MySQLJDBC */ - static SfxTabPage* CreateMySQLJDBC( Window* _pParent, const SfxItemSet& _rAttrSet ); + static SfxTabPage* CreateMySQLJDBC( Window* _pParent, const SfxItemSet* _rAttrSet ); /** Creates the detail page for MySQLNATIVE */ - static SfxTabPage* CreateMySQLNATIVE( Window* _pParent, const SfxItemSet& _rAttrSet ); + static SfxTabPage* CreateMySQLNATIVE( Window* _pParent, const SfxItemSet* _rAttrSet ); /** Creates the detail page for Oracle JDBC */ - static SfxTabPage* CreateOracleJDBC( Window* pParent, const SfxItemSet& _rAttrSet ); + static SfxTabPage* CreateOracleJDBC( Window* pParent, const SfxItemSet* _rAttrSet ); /** Creates the detail page for LDAP */ - static SfxTabPage* CreateLDAP( Window* _pParent, const SfxItemSet& _rAttrSet ); + static SfxTabPage* CreateLDAP( Window* _pParent, const SfxItemSet* _rAttrSet ); /// Creates the detail page for Text - static SfxTabPage* CreateText( Window* _pParent, const SfxItemSet& _rAttrSet ); + static SfxTabPage* CreateText( Window* _pParent, const SfxItemSet* _rAttrSet ); /// creates the GeneratedValues page - static SfxTabPage* CreateGeneratedValuesPage( Window* _pParent, const SfxItemSet& _rAttrSet ); + static SfxTabPage* CreateGeneratedValuesPage( Window* _pParent, const SfxItemSet* _rAttrSet ); /// creates the "Special Settings" page of the "Advanced Settings" dialog - static SfxTabPage* CreateSpecialSettingsPage( Window* _pParent, const SfxItemSet& _rAttrSet ); + static SfxTabPage* CreateSpecialSettingsPage( Window* _pParent, const SfxItemSet* _rAttrSet ); }; } diff --git a/dbaccess/source/ui/dlg/UserAdmin.cxx b/dbaccess/source/ui/dlg/UserAdmin.cxx index aff54572bba8..4c3eb4df340a 100644 --- a/dbaccess/source/ui/dlg/UserAdmin.cxx +++ b/dbaccess/source/ui/dlg/UserAdmin.cxx @@ -182,9 +182,9 @@ void OUserAdmin::FillUserNames() } -SfxTabPage* OUserAdmin::Create( Window* pParent, const SfxItemSet& _rAttrSet ) +SfxTabPage* OUserAdmin::Create( Window* pParent, const SfxItemSet* _rAttrSet ) { - return ( new OUserAdmin( pParent, _rAttrSet ) ); + return ( new OUserAdmin( pParent, *_rAttrSet ) ); } IMPL_LINK( OUserAdmin, UserHdl, PushButton *, pButton ) diff --git a/dbaccess/source/ui/dlg/UserAdmin.hxx b/dbaccess/source/ui/dlg/UserAdmin.hxx index 698fde194b52..96022dbd8976 100644 --- a/dbaccess/source/ui/dlg/UserAdmin.hxx +++ b/dbaccess/source/ui/dlg/UserAdmin.hxx @@ -65,7 +65,7 @@ protected: OUserAdmin( Window* pParent, const SfxItemSet& _rCoreAttrs); public: - static SfxTabPage* Create( Window* pParent, const SfxItemSet& _rAttrSet ); + static SfxTabPage* Create( Window* pParent, const SfxItemSet* _rAttrSet ); virtual ~OUserAdmin(); OUString GetUser(); diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx index 238c7fc29bd7..331ac2f3690b 100644 --- a/dbaccess/source/ui/dlg/adminpages.cxx +++ b/dbaccess/source/ui/dlg/adminpages.cxx @@ -70,7 +70,7 @@ namespace dbaui } OGenericAdministrationPage::OGenericAdministrationPage(Window* _pParent, const OString& _rId, const OUString& _rUIXMLDescription, const SfxItemSet& _rAttrSet) - :SfxTabPage(_pParent, _rId, _rUIXMLDescription, _rAttrSet) + :SfxTabPage(_pParent, _rId, _rUIXMLDescription, &_rAttrSet) ,m_abEnableRoadmap(false) ,m_pAdminDialog(NULL) ,m_pItemSetHelper(NULL) diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx index 559e9c373170..c67cd2f8ed28 100644 --- a/dbaccess/source/ui/dlg/dbwiz.cxx +++ b/dbaccess/source/ui/dlg/dbwiz.cxx @@ -244,39 +244,39 @@ TabPage* ODbTypeWizDialog::createPage(WizardState _nState) } break; case CONNECTION_PAGE: - pPage = OConnectionTabPage::Create(this,*m_pOutSet); + pPage = OConnectionTabPage::Create(this,m_pOutSet); nStringId = STR_PAGETITLE_CONNECTION; break; case ADDITIONAL_PAGE_DBASE: - pPage = ODriversSettings::CreateDbase(this,*m_pOutSet); + pPage = ODriversSettings::CreateDbase(this,m_pOutSet); break; case ADDITIONAL_PAGE_FLAT: - pPage = ODriversSettings::CreateText(this,*m_pOutSet); + pPage = ODriversSettings::CreateText(this,m_pOutSet); break; case ADDITIONAL_PAGE_LDAP: - pPage = ODriversSettings::CreateLDAP(this,*m_pOutSet); + pPage = ODriversSettings::CreateLDAP(this,m_pOutSet); break; case ADDITIONAL_PAGE_MYSQL_JDBC: - pPage = ODriversSettings::CreateMySQLJDBC(this,*m_pOutSet); + pPage = ODriversSettings::CreateMySQLJDBC(this,m_pOutSet); break; case ADDITIONAL_PAGE_MYSQL_NATIVE: - pPage = ODriversSettings::CreateMySQLNATIVE(this,*m_pOutSet); + pPage = ODriversSettings::CreateMySQLNATIVE(this,m_pOutSet); break; case ADDITIONAL_PAGE_MYSQL_ODBC: - pPage = ODriversSettings::CreateMySQLODBC(this,*m_pOutSet); + pPage = ODriversSettings::CreateMySQLODBC(this,m_pOutSet); break; case ADDITIONAL_PAGE_ORACLE_JDBC: - pPage = ODriversSettings::CreateOracleJDBC(this,*m_pOutSet); + pPage = ODriversSettings::CreateOracleJDBC(this,m_pOutSet); break; case ADDITIONAL_PAGE_ADO: - pPage = ODriversSettings::CreateAdo(this,*m_pOutSet); + pPage = ODriversSettings::CreateAdo(this,m_pOutSet); break; case ADDITIONAL_PAGE_ODBC: - pPage = ODriversSettings::CreateODBC(this,*m_pOutSet); + pPage = ODriversSettings::CreateODBC(this,m_pOutSet); break; case ADDITIONAL_USERDEFINED: - pPage = ODriversSettings::CreateUser(this,*m_pOutSet); + pPage = ODriversSettings::CreateUser(this,m_pOutSet); break; default: OSL_FAIL("Wrong state!"); diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx index 7786afd89990..629239337f56 100644 --- a/dbaccess/source/ui/dlg/detailpages.cxx +++ b/dbaccess/source/ui/dlg/detailpages.cxx @@ -224,9 +224,9 @@ namespace dbaui } - SfxTabPage* ODriversSettings::CreateDbase( Window* pParent, const SfxItemSet& _rAttrSet ) + SfxTabPage* ODriversSettings::CreateDbase( Window* pParent, const SfxItemSet* _rAttrSet ) { - return ( new ODbaseDetailsPage( pParent, _rAttrSet ) ); + return ( new ODbaseDetailsPage( pParent, *_rAttrSet ) ); } void ODbaseDetailsPage::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) @@ -302,9 +302,9 @@ namespace dbaui { } - SfxTabPage* ODriversSettings::CreateAdo( Window* pParent, const SfxItemSet& _rAttrSet ) + SfxTabPage* ODriversSettings::CreateAdo( Window* pParent, const SfxItemSet* _rAttrSet ) { - return ( new OAdoDetailsPage( pParent, _rAttrSet ) ); + return ( new OAdoDetailsPage( pParent, *_rAttrSet ) ); } // OOdbcDetailsPage @@ -325,9 +325,9 @@ namespace dbaui pWindows[i]->SetZOrder(pWindows[i-1], WINDOW_ZORDER_BEHIND); } - SfxTabPage* ODriversSettings::CreateODBC( Window* pParent, const SfxItemSet& _rAttrSet ) + SfxTabPage* ODriversSettings::CreateODBC( Window* pParent, const SfxItemSet* _rAttrSet ) { - return ( new OOdbcDetailsPage( pParent, _rAttrSet ) ); + return ( new OOdbcDetailsPage( pParent, *_rAttrSet ) ); } bool OOdbcDetailsPage::FillItemSet( SfxItemSet* _rSet ) @@ -373,9 +373,9 @@ namespace dbaui FreeResource(); } - SfxTabPage* ODriversSettings::CreateUser( Window* pParent, const SfxItemSet& _rAttrSet ) + SfxTabPage* ODriversSettings::CreateUser( Window* pParent, const SfxItemSet* _rAttrSet ) { - return ( new OUserDriverDetailsPage( pParent, _rAttrSet ) ); + return ( new OUserDriverDetailsPage( pParent, *_rAttrSet ) ); } bool OUserDriverDetailsPage::FillItemSet( SfxItemSet* _rSet ) @@ -430,9 +430,9 @@ namespace dbaui { } - SfxTabPage* ODriversSettings::CreateMySQLODBC( Window* pParent, const SfxItemSet& _rAttrSet ) + SfxTabPage* ODriversSettings::CreateMySQLODBC( Window* pParent, const SfxItemSet* _rAttrSet ) { - return ( new OMySQLODBCDetailsPage( pParent, _rAttrSet ) ); + return ( new OMySQLODBCDetailsPage( pParent, *_rAttrSet ) ); } // OMySQLJDBCDetailsPage @@ -675,18 +675,18 @@ namespace dbaui OCommonBehaviourTabPage::implInitControls(_rSet, _bSaveValue); } - SfxTabPage* ODriversSettings::CreateMySQLJDBC( Window* pParent, const SfxItemSet& _rAttrSet ) + SfxTabPage* ODriversSettings::CreateMySQLJDBC( Window* pParent, const SfxItemSet* _rAttrSet ) { - return ( new OGeneralSpecialJDBCDetailsPage( pParent,PAGE_MYSQL_JDBC, _rAttrSet,DSID_MYSQL_PORTNUMBER ) ); + return ( new OGeneralSpecialJDBCDetailsPage( pParent,PAGE_MYSQL_JDBC, *_rAttrSet,DSID_MYSQL_PORTNUMBER ) ); } - SfxTabPage* ODriversSettings::CreateMySQLNATIVE( Window* pParent, const SfxItemSet& _rAttrSet ) + SfxTabPage* ODriversSettings::CreateMySQLNATIVE( Window* pParent, const SfxItemSet* _rAttrSet ) { - return ( new MySQLNativePage( pParent, _rAttrSet ) ); + return ( new MySQLNativePage( pParent, *_rAttrSet ) ); } - SfxTabPage* ODriversSettings::CreateOracleJDBC( Window* pParent, const SfxItemSet& _rAttrSet ) + SfxTabPage* ODriversSettings::CreateOracleJDBC( Window* pParent, const SfxItemSet* _rAttrSet ) { - return ( new OGeneralSpecialJDBCDetailsPage( pParent,PAGE_ORACLE_JDBC, _rAttrSet,DSID_ORACLE_PORTNUMBER) ); + return ( new OGeneralSpecialJDBCDetailsPage( pParent,PAGE_ORACLE_JDBC, *_rAttrSet,DSID_ORACLE_PORTNUMBER) ); } // OLDAPDetailsPage @@ -713,9 +713,9 @@ namespace dbaui FreeResource(); } - SfxTabPage* ODriversSettings::CreateLDAP( Window* pParent, const SfxItemSet& _rAttrSet ) + SfxTabPage* ODriversSettings::CreateLDAP( Window* pParent, const SfxItemSet* _rAttrSet ) { - return ( new OLDAPDetailsPage( pParent, _rAttrSet ) ); + return ( new OLDAPDetailsPage( pParent, *_rAttrSet ) ); } bool OLDAPDetailsPage::FillItemSet( SfxItemSet* _rSet ) @@ -800,9 +800,9 @@ namespace dbaui } - SfxTabPage* ODriversSettings::CreateText( Window* pParent, const SfxItemSet& _rAttrSet ) + SfxTabPage* ODriversSettings::CreateText( Window* pParent, const SfxItemSet* _rAttrSet ) { - return ( new OTextDetailsPage( pParent, _rAttrSet ) ); + return ( new OTextDetailsPage( pParent, *_rAttrSet ) ); } void OTextDetailsPage::fillControls(::std::vector< ISaveValueWrapper* >& _rControlList) { @@ -838,16 +838,16 @@ namespace dbaui return m_pTextConnectionHelper->prepareLeave(); } - SfxTabPage* ODriversSettings::CreateGeneratedValuesPage( Window* _pParent, const SfxItemSet& _rAttrSet ) + SfxTabPage* ODriversSettings::CreateGeneratedValuesPage( Window* _pParent, const SfxItemSet* _rAttrSet ) { - return new GeneratedValuesPage( _pParent, _rAttrSet ); + return new GeneratedValuesPage( _pParent, *_rAttrSet ); } - SfxTabPage* ODriversSettings::CreateSpecialSettingsPage( Window* _pParent, const SfxItemSet& _rAttrSet ) + SfxTabPage* ODriversSettings::CreateSpecialSettingsPage( Window* _pParent, const SfxItemSet* _rAttrSet ) { - OUString eType = ODbDataSourceAdministrationHelper::getDatasourceType( _rAttrSet ); + OUString eType = ODbDataSourceAdministrationHelper::getDatasourceType( *_rAttrSet ); DataSourceMetaData aMetaData( eType ); - return new SpecialSettingsPage( _pParent, _rAttrSet, aMetaData ); + return new SpecialSettingsPage( _pParent, *_rAttrSet, aMetaData ); } } // namespace dbaui |