From c656482c5a1467d6dc21601e1296ba3711916d6b Mon Sep 17 00:00:00 2001 From: "Andrzej J.R. Hunt" Date: Wed, 28 Aug 2013 09:22:37 +0100 Subject: fdo#68588 Move embeddeddbList into OGeneralPageWizard. embeddeddbList is only present in generalpagewizard.ui but not in generalpagedialog.ui, hence it should be controlled by OGeneralPageWizard and not OGeneralPage. Change-Id: I7c52493e12b40d9043d80fb023cfc9eb9c9e42ec Reviewed-on: https://gerrit.libreoffice.org/5654 Reviewed-by: Lionel Elie Mamane Tested-by: Lionel Elie Mamane --- dbaccess/source/ui/dlg/generalpage.hxx | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'dbaccess/source/ui/dlg/generalpage.hxx') diff --git a/dbaccess/source/ui/dlg/generalpage.hxx b/dbaccess/source/ui/dlg/generalpage.hxx index 2510cb3a9cd0..71e01520b0b4 100644 --- a/dbaccess/source/ui/dlg/generalpage.hxx +++ b/dbaccess/source/ui/dlg/generalpage.hxx @@ -37,13 +37,13 @@ namespace dbaui OGeneralPage( Window* pParent, const OUString& _rUIXMLDescription, const SfxItemSet& _rItems ); ~OGeneralPage(); - private: - FixedText* m_pSpecialMessage; - OUString m_eCurrentSelection; /// currently selected type ::dbaccess::DATASOURCE_TYPE m_eNotSupportedKnownType; /// if a data source of an unsupported, but known type is encountered .... + private: + FixedText* m_pSpecialMessage; + enum SPECIAL_MESSAGE { smNone, @@ -54,22 +54,17 @@ namespace dbaui Link m_aTypeSelectHandler; /// to be called if a new type is selected sal_Bool m_bDisplayingInvalid : 1; // the currently displayed data source is deleted bool m_bInitTypeList : 1; - bool m_bInitEmbeddedDBList : 1; bool approveDatasourceType( const OUString& _sURLPrefix, OUString& _inout_rDisplayName ); void insertDatasourceTypeEntryData( const OUString& _sType, String sDisplayName ); - void insertEmbeddedDBTypeEntryData( const OUString& _sType, String sDisplayName ); protected: ListBox* m_pDatasourceType; - ListBox* m_pEmbeddedDBType; ::dbaccess::ODsnTypeCollection* m_pCollection; /// the DSN type collection instance ::std::vector< OUString> m_aURLPrefixes; - ::std::vector< OUString> - m_aEmbeddedURLPrefixes; public: /// set a handler which gets called every time the user selects a new type @@ -84,7 +79,6 @@ namespace dbaui virtual void implInitControls( const SfxItemSet& _rSet, sal_Bool _bSaveValue ); virtual OUString getDatasourceName( const SfxItemSet& _rSet ); - virtual OUString getEmbeddedDBName( const SfxItemSet& _rSet ); virtual bool approveDatasourceType( ::dbaccess::DATASOURCE_TYPE eType, OUString& _inout_rDisplayName ); // OGenericAdministrationPage::fillControls @@ -94,7 +88,6 @@ namespace dbaui void onTypeSelected(const OUString& _sURLPrefix); void initializeTypeList(); - void initializeEmbeddedDBList(); void implSetCurrentType( const OUString& _eType ); @@ -104,7 +97,6 @@ namespace dbaui virtual void setParentTitle( const OUString& _sURLPrefix ); DECL_LINK(OnDatasourceTypeSelected, ListBox*); - DECL_LINK(OnEmbeddedDBTypeSelected, ListBox*); }; // OGeneralPageDialog @@ -150,6 +142,8 @@ namespace dbaui RadioButton* m_pRB_ConnectDatabase; FixedText* m_pFT_EmbeddedDBLabel; + ListBox* m_pEmbeddedDBType; + FixedText* m_pFT_DocListLabel; OpenDocumentListBox* m_pLB_DocumentList; OpenDocumentButton* m_pPB_OpenDatabase; @@ -165,6 +159,9 @@ namespace dbaui ::svt::ControlDependencyManager m_aControlDependencies; + bool m_bInitEmbeddedDBList : 1; + void insertEmbeddedDBTypeEntryData( const OUString& _sType, String sDisplayName ); + public: void SetCreationModeHandler( const Link& _rHandler ) { m_aCreationModeHandler = _rHandler; } CreationMode GetDatabaseCreationMode() const; @@ -182,7 +179,14 @@ namespace dbaui virtual OUString getDatasourceName( const SfxItemSet& _rSet ); virtual bool approveDatasourceType( ::dbaccess::DATASOURCE_TYPE eType, OUString& _inout_rDisplayName ); + ::std::vector< OUString> + m_aEmbeddedURLPrefixes; + + virtual OUString getEmbeddedDBName( const SfxItemSet& _rSet ); + void initializeEmbeddedDBList(); + protected: + DECL_LINK( OnEmbeddedDBTypeSelected, ListBox* ); DECL_LINK( OnCreateDatabaseModeSelected, RadioButton* ); DECL_LINK( OnSetupModeSelected, RadioButton* ); DECL_LINK( OnDocumentSelected, ListBox* ); -- cgit