[Libreoffice-commits] core.git: dbaccess/source
Mathias Hasselmann
mathias at openismus.com
Fri Mar 22 00:20:33 PDT 2013
dbaccess/source/ui/dlg/dbwizsetup.cxx | 20 +++++++++-----------
dbaccess/source/ui/inc/dbwizsetup.hxx | 3 +++
2 files changed, 12 insertions(+), 11 deletions(-)
New commits:
commit ae88d7ec8ebea00357da345ddb6cd241112d53b8
Author: Mathias Hasselmann <mathias at openismus.com>
Date: Fri Mar 22 00:36:11 2013 +0100
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 at documentfoundation.org>
Tested-by: Fridrich Strba <fridrich at documentfoundation.org>
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index d5f2973..5b1ba07 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 d04508a..5d9dd46 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
More information about the Libreoffice-commits
mailing list