20#include <core_resource.hxx>
44#define CONNECTION_PAGE 1
45#define ADDITIONAL_PAGE_DBASE 2
46#define ADDITIONAL_PAGE_FLAT 3
47#define ADDITIONAL_PAGE_LDAP 4
49#define ADDITIONAL_PAGE_MYSQL_JDBC 6
50#define ADDITIONAL_PAGE_MYSQL_ODBC 7
51#define ADDITIONAL_PAGE_ORACLE_JDBC 8
52#define ADDITIONAL_PAGE_ADO 9
53#define ADDITIONAL_PAGE_ODBC 10
54#define ADDITIONAL_USERDEFINED 11
55#define ADDITIONAL_PAGE_MYSQL_NATIVE 12
63 m_pImpl->setDataSourceOrName(_aDataSourceName);
81 assert(pCollectionItem &&
"must exist");
96 m_eType = _rTabPage.GetSelectedType();
97 const bool bURLRequired = m_pCollection->isConnectionUrlRequired(
m_eType);
98 enableButtons(WizardButtonFlags::NEXT,bURLRequired);
99 enableButtons(WizardButtonFlags::FINISH,!bURLRequired);
105 switch(_nCurrentState)
193 return m_pImpl->createConnection();
219 std::unique_ptr<BuilderPage> xPage;
221 OUString sIdent(OUString::number(_nState));
228 xPage = std::make_unique<OGeneralPageDialog>(pPageContainer,
this, *
m_pOutSet);
231 pStringId = STR_PAGETITLE_GENERAL;
236 pStringId = STR_PAGETITLE_CONNECTION;
270 OSL_FAIL(
"Wrong state!");
317 if (
m_pImpl->getCurrentDataSource().is() )
const WhichRangesContainer & GetRanges() const
SfxItemPool * GetPool() const
const SfxPoolItem * GetItem(sal_uInt16 nWhich, bool bSearchInParent=true) const
virtual bool FillItemSet(SfxItemSet *)
DATASOURCE_TYPE determineType(std::u16string_view _rDsn) const
allows an ODsnTypeCollection to be transported in an SfxItemSet
::dbaccess::ODsnTypeCollection * getCollection() const
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *_rAttrSet)
static OUString getDatasourceType(const SfxItemSet &_rSet)
extracts the connection type from the given setThe connection type is determined by the value of the ...
tab dialog for administrating the office wide registered data sources
OUString m_eType
the DSN type collection instance
::dbaccess::ODsnTypeCollection * m_pCollection
virtual css::uno::Reference< css::sdbc::XDriver > getDriver() override
virtual bool onFinish() override
virtual void clearPassword() override
std::unique_ptr< SfxItemSet > m_pOutSet
virtual WizardState determineNextState(WizardState _nCurrentState) const override
virtual ::vcl::IWizardPageController * getPageController(BuilderPage *pCurrentPage) const override
virtual OUString getDatasourceType(const SfxItemSet &_rSet) const override
ODbTypeWizDialog(weld::Window *pParent, SfxItemSet const *_pItems, const css::uno::Reference< css::uno::XComponentContext > &_rxORB, const css::uno::Any &_aDataSourceName)
ctor.
virtual bool leaveState(WizardState _nState) override
virtual css::uno::Reference< css::uno::XComponentContext > getORB() const override
virtual void saveDatasource() override
virtual ~ODbTypeWizDialog() override
virtual void enableConfirmSettings(bool _bEnable) override
enables or disables the user's possibility to confirm the settings
virtual std::pair< css::uno::Reference< css::sdbc::XConnection >, bool > createConnection() override
virtual const SfxItemSet * getOutputSet() const override
std::unique_ptr< ODbDataSourceAdministrationHelper > m_pImpl
virtual void setTitle(const OUString &_sTitle) override
virtual SfxItemSet * getWriteOutputSet() override
virtual std::unique_ptr< BuilderPage > createPage(WizardState _nState) override
to override to create new pages
void SetTypeSelectHandler(const Link< OGeneralPage &, void > &_rHandler)
set a handler which gets called every time the user selects a new type
std::unique_ptr< weld::Button > m_xNextPage
std::unique_ptr< weld::Button > m_xCancel
void defaultButton(WizardButtonFlags _nWizardButtonFlags)
void enableAutomaticNextButtonState()
std::unique_ptr< weld::Button > m_xPrevPage
virtual void ActivatePage()
void enableButtons(WizardButtonFlags _nWizardButtonFlags, bool _bEnable)
std::unique_ptr< weld::Button > m_xFinish
WizardTypes::WizardState getCurrentState() const
void setTitleBase(const OUString &_rTitleBase)
BuilderPage * GetPage(WizardTypes::WizardState eState) const
std::unique_ptr< weld::Assistant > m_xAssistant
#define ADDITIONAL_PAGE_DBASE
#define ADDITIONAL_PAGE_MYSQL_JDBC
#define ADDITIONAL_PAGE_ADO
#define ADDITIONAL_PAGE_ORACLE_JDBC
#define ADDITIONAL_USERDEFINED
#define ADDITIONAL_PAGE_FLAT
#define ADDITIONAL_PAGE_LDAP
#define ADDITIONAL_PAGE_MYSQL_NATIVE
#define ADDITIONAL_PAGE_ODBC
#define ADDITIONAL_PAGE_MYSQL_ODBC
#define DSID_TYPECOLLECTION
const EnumerationType m_eType
constexpr OUStringLiteral HID_DBWIZ_NEXT
constexpr OUStringLiteral HID_DBWIZ_CANCEL
constexpr OUStringLiteral HID_DBWIZ_PREVIOUS
constexpr OUStringLiteral HID_DBWIZ_FINISH
#define LINK(Instance, Class, Member)
@ DST_EVOLUTION_GROUPWISE
void convert(const css::uno::Reference< css::uno::XComponentContext > &xContext, const ::dbaccess::ODsnTypeCollection *_pCollection, std::u16string_view _sOldURLPrefix, std::u16string_view _sNewURLPrefix, const css::uno::Reference< css::beans::XPropertySet > &_xDatasource)
IMPL_LINK(OApplicationController, OnSelectContainer, void *, _pType, void)
constexpr OUStringLiteral PROPERTY_URL(u"URL")
#define WZS_INVALID_STATE