From a92e973b6d0a9ad87fe014442e1678af2ce0c7d0 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 11 Jun 2014 10:35:24 +0200 Subject: Change SfxTabPage::Reset param from ref to pointer ...there was a call site that passed undefined "null pointer reference" (apparently in a case where the passed argument was actually unused) Change-Id: I663d4264b7a84f44ca69c732f3bc502f614b2b2a --- dbaccess/source/ui/dlg/adminpages.cxx | 6 +++--- dbaccess/source/ui/dlg/adminpages.hxx | 2 +- dbaccess/source/ui/dlg/dbadmin.cxx | 2 +- dbaccess/source/ui/dlg/generalpage.cxx | 2 +- dbaccess/source/ui/dlg/generalpage.hxx | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) (limited to 'dbaccess/source') diff --git a/dbaccess/source/ui/dlg/adminpages.cxx b/dbaccess/source/ui/dlg/adminpages.cxx index 5f62953bb30d..238c7fc29bd7 100644 --- a/dbaccess/source/ui/dlg/adminpages.cxx +++ b/dbaccess/source/ui/dlg/adminpages.cxx @@ -98,9 +98,9 @@ namespace dbaui return LEAVE_PAGE; } - void OGenericAdministrationPage::Reset(const SfxItemSet& _rCoreAttrs) + void OGenericAdministrationPage::Reset(const SfxItemSet* _rCoreAttrs) { - implInitControls(_rCoreAttrs, false); + implInitControls(*_rCoreAttrs, false); } void OGenericAdministrationPage::ActivatePage() { @@ -181,7 +181,7 @@ namespace dbaui { OSL_ENSURE(m_pItemSetHelper,"NO ItemSetHelper set!"); if ( m_pItemSetHelper ) - Reset(*m_pItemSetHelper->getOutputSet()); + Reset(m_pItemSetHelper->getOutputSet()); } bool OGenericAdministrationPage::commitPage( ::svt::WizardTypes::CommitPageReason ) { diff --git a/dbaccess/source/ui/dlg/adminpages.hxx b/dbaccess/source/ui/dlg/adminpages.hxx index 667a7a4683e0..846c0286dbab 100644 --- a/dbaccess/source/ui/dlg/adminpages.hxx +++ b/dbaccess/source/ui/dlg/adminpages.hxx @@ -156,7 +156,7 @@ namespace dbaui virtual int DeactivatePage(SfxItemSet* pSet) SAL_OVERRIDE; using SfxTabPage::DeactivatePage; /// default implementation: call implInitControls with the given item set and _bSaveValue = sal_False - virtual void Reset(const SfxItemSet& _rCoreAttrs) SAL_OVERRIDE; + virtual void Reset(const SfxItemSet* _rCoreAttrs) SAL_OVERRIDE; /// default implementation: call implInitControls with the given item set and _bSaveValue = sal_True virtual void ActivatePage(const SfxItemSet& _rSet) SAL_OVERRIDE; diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx index 4c38561879f6..773a86d577dd 100644 --- a/dbaccess/source/ui/dlg/dbadmin.cxx +++ b/dbaccess/source/ui/dlg/dbadmin.cxx @@ -209,7 +209,7 @@ void ODbAdminDialog::impl_resetPages(const Reference< XPropertySet >& _rxDatasou ShowPage( m_nMainPageID ); SfxTabPage* pConnectionPage = GetTabPage( m_nMainPageID ); if ( pConnectionPage ) - pConnectionPage->Reset(*GetInputSetImpl()); + pConnectionPage->Reset(GetInputSetImpl()); // if this is NULL, the page has not been created yet, which means we're called before the // dialog was displayed (probably from inside the ctor) diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index b4b24832b61c..704c503efa65 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -390,7 +390,7 @@ namespace dbaui m_eCurrentSelection = _eType; } - void OGeneralPage::Reset(const SfxItemSet& _rCoreAttrs) + void OGeneralPage::Reset(const SfxItemSet* _rCoreAttrs) { // reset all locale data implSetCurrentType( OUString() ); diff --git a/dbaccess/source/ui/dlg/generalpage.hxx b/dbaccess/source/ui/dlg/generalpage.hxx index 48f5b6d01741..9060a3b3a417 100644 --- a/dbaccess/source/ui/dlg/generalpage.hxx +++ b/dbaccess/source/ui/dlg/generalpage.hxx @@ -74,7 +74,7 @@ namespace dbaui protected: // SfxTabPage overridables - virtual void Reset( const SfxItemSet& _rCoreAttrs ) SAL_OVERRIDE; + virtual void Reset( const SfxItemSet* _rCoreAttrs ) SAL_OVERRIDE; virtual void implInitControls( const SfxItemSet& _rSet, bool _bSaveValue ) SAL_OVERRIDE; virtual OUString getDatasourceName( const SfxItemSet& _rSet ); -- cgit v1.2.3