diff options
author | Mathias Hasselmann <mathias@openismus.com> | 2013-03-22 00:36:11 +0100 |
---|---|---|
committer | Fridrich Strba <fridrich@documentfoundation.org> | 2013-03-22 07:20:14 +0000 |
commit | ae88d7ec8ebea00357da345ddb6cd241112d53b8 (patch) | |
tree | 8c5154a86294f68bed3a5b93c9033ab6dc9cfcbb /dbaccess/source | |
parent | 0552b4334c2fb6b130ec05934b952b60418aadca (diff) |
dbwizsetup: Make pFinalPage a class member
It really should not have been a global variable.
Change-Id: I26d4b0d4736a2d026eb61149ede88f6f6ead6dfa
Reviewed-on: https://gerrit.libreoffice.org/2904
Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org>
Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'dbaccess/source')
-rw-r--r-- | dbaccess/source/ui/dlg/dbwizsetup.cxx | 20 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/dbwizsetup.hxx | 3 |
2 files changed, 12 insertions, 11 deletions
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index d5f29733fcaa..5b1ba07979b0 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -113,8 +113,6 @@ using namespace ::cppu; #define START_PAGE 0 #define CONNECTION_PAGE 1 -OFinalDBPageSetup* pFinalPage; - DBG_NAME(ODbTypeWizDialogSetup) //========================================================================= //= ODbTypeWizDialogSetup @@ -150,11 +148,11 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(Window* _pParent , m_sWorkPath( SvtPathOptions().GetWorkPath() ) , m_pGeneralPage( NULL ) , m_pMySQLIntroPage( NULL ) + , m_pFinalPage( NULL ) , m_pCollection( NULL ) { DBG_CTOR(ODbTypeWizDialogSetup,NULL); // no local resources needed anymore - pFinalPage = NULL; // extract the datasource type collection from the item set DbuTypeCollectionItem* pCollectionItem = PTR_CAST(DbuTypeCollectionItem, _pItems->GetItem(DSID_TYPECOLLECTION)); if (pCollectionItem) @@ -583,7 +581,7 @@ TabPage* ODbTypeWizDialogSetup::createPage(WizardState _nState) case PAGE_DBSETUPWIZARD_FINAL: pPage = OFinalDBPageSetup::CreateFinalDBTabPageSetup(this,*m_pOutSet); - pFinalPage = static_cast<OFinalDBPageSetup*> (pPage); + m_pFinalPage = static_cast<OFinalDBPageSetup*> (pPage); break; } @@ -674,8 +672,8 @@ void ODbTypeWizDialogSetup::enterState(WizardState _nState) break; case PAGE_DBSETUPWIZARD_FINAL: enableButtons( WZB_FINISH, sal_True); - if ( pFinalPage ) - pFinalPage->enableTableWizardCheckBox(m_pCollection->supportsTableCreation(m_sURL)); + if ( m_pFinalPage ) + m_pFinalPage->enableTableWizardCheckBox(m_pCollection->supportsTableCreation(m_sURL)); break; } } @@ -754,7 +752,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() ::rtl::OUString sPath = m_pImpl->getDocumentUrl( *m_pOutSet ); xStore->storeAsURL( sPath, aArgs.getPropertyValues() ); - if ( !pFinalPage || pFinalPage->IsDatabaseDocumentToBeRegistered() ) + if ( !m_pFinalPage || m_pFinalPage->IsDatabaseDocumentToBeRegistered() ) RegisterDataSourceByLocation( sPath ); return sal_True; @@ -788,8 +786,8 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() if ( m_pGeneralPage->GetDatabaseCreationMode() == OGeneralPage::eOpenExisting ) return sal_True; - if ( pFinalPage != NULL ) - return pFinalPage->IsDatabaseDocumentToBeOpened(); + if ( m_pFinalPage != NULL ) + return m_pFinalPage->IsDatabaseDocumentToBeOpened(); return sal_True; } @@ -800,8 +798,8 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument() if ( m_pGeneralPage->GetDatabaseCreationMode() == OGeneralPage::eOpenExisting ) return sal_False; - if ( pFinalPage != NULL ) - return pFinalPage->IsTableWizardToBeStarted(); + if ( m_pFinalPage != NULL ) + return m_pFinalPage->IsTableWizardToBeStarted(); return sal_False; } diff --git a/dbaccess/source/ui/inc/dbwizsetup.hxx b/dbaccess/source/ui/inc/dbwizsetup.hxx index d04508a41727..5d9dd4658d1b 100644 --- a/dbaccess/source/ui/inc/dbwizsetup.hxx +++ b/dbaccess/source/ui/inc/dbwizsetup.hxx @@ -57,6 +57,7 @@ class ODbDataSourceAdministrationHelper; /** tab dialog for administrating the office wide registered data sources */ class OMySQLIntroPageSetup; +class OFinalDBPageSetup; class ODbTypeWizDialogSetup : public svt::RoadmapWizard , public IItemSetHelper, public IDatabaseSettingsDialog,public dbaui::OModuleClient { @@ -89,6 +90,8 @@ private: String m_sWorkPath; OGeneralPage* m_pGeneralPage; OMySQLIntroPageSetup* m_pMySQLIntroPage; + OFinalDBPageSetup* m_pFinalPage; + ::dbaccess::ODsnTypeCollection* m_pCollection; /// the DSN type collection instance |