LibreOffice Module dbaccess (master) 1
dbwiz.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#pragma once
21
22#include <dsntypes.hxx>
23#include "IItemSetHelper.hxx"
24#include <vcl/wizardmachine.hxx>
25#include <memory>
26
27namespace com::sun::star {
28 namespace beans {
29 class XPropertySet;
30 }
31 namespace sdbc {
32 class XConnection;
33 }
34 namespace lang {
35 class XMultiServiceFactory;
36 }
37}
38
40
41namespace dbaccess
42{
43 class ODsnTypeCollection;
44}
45namespace dbaui
46{
47
48// ODbTypeWizDialog
49class OGeneralPage;
50class ODbDataSourceAdministrationHelper;
54{
55private:
56 std::unique_ptr<ODbDataSourceAdministrationHelper> m_pImpl;
57 std::unique_ptr<SfxItemSet> m_pOutSet;
60 OUString m_eType;
61
62public:
67 ,SfxItemSet const * _pItems
68 ,const css::uno::Reference< css::uno::XComponentContext >& _rxORB
69 ,const css::uno::Any& _aDataSourceName
70 );
71 virtual ~ODbTypeWizDialog() override;
72
73 virtual const SfxItemSet* getOutputSet() const override;
74 virtual SfxItemSet* getWriteOutputSet() override;
75
76 // forwards to ODbDataSourceAdministrationHelper
77 virtual css::uno::Reference< css::uno::XComponentContext > getORB() const override;
78 virtual std::pair< css::uno::Reference< css::sdbc::XConnection >,bool> createConnection() override;
79 virtual css::uno::Reference< css::sdbc::XDriver > getDriver() override;
80 virtual OUString getDatasourceType(const SfxItemSet& _rSet) const override;
81 virtual void clearPassword() override;
82 virtual void saveDatasource() override;
83 virtual void setTitle(const OUString& _sTitle) override;
84 virtual void enableConfirmSettings( bool _bEnable ) override;
85
86protected:
88 virtual std::unique_ptr<BuilderPage> createPage(WizardState _nState) override;
89 virtual WizardState determineNextState(WizardState _nCurrentState) const override;
90 virtual bool leaveState(WizardState _nState) override;
91 virtual ::vcl::IWizardPageController* getPageController(BuilderPage* pCurrentPage) const override;
92 virtual bool onFinish() override;
93
94private:
95 DECL_LINK(OnTypeSelected, OGeneralPage&, void);
96};
97
98} // namespace dbaui
99
100/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
tab dialog for administrating the office wide registered data sources
Definition: dbwiz.hxx:54
OUString m_eType
the DSN type collection instance
Definition: dbwiz.hxx:60
::dbaccess::ODsnTypeCollection * m_pCollection
Definition: dbwiz.hxx:59
virtual css::uno::Reference< css::sdbc::XDriver > getDriver() override
Definition: dbwiz.cxx:201
virtual bool onFinish() override
Definition: dbwiz.cxx:328
DECL_LINK(OnTypeSelected, OGeneralPage &, void)
virtual void clearPassword() override
Definition: dbwiz.cxx:211
std::unique_ptr< SfxItemSet > m_pOutSet
Definition: dbwiz.hxx:57
virtual WizardState determineNextState(WizardState _nCurrentState) const override
Definition: dbwiz.cxx:102
virtual ::vcl::IWizardPageController * getPageController(BuilderPage *pCurrentPage) const override
Definition: dbwiz.cxx:322
virtual OUString getDatasourceType(const SfxItemSet &_rSet) const override
Definition: dbwiz.cxx:206
ODbTypeWizDialog(weld::Window *pParent, SfxItemSet const *_pItems, const css::uno::Reference< css::uno::XComponentContext > &_rxORB, const css::uno::Any &_aDataSourceName)
ctor.
Definition: dbwiz.cxx:58
virtual bool leaveState(WizardState _nState) override
Definition: dbwiz.cxx:286
virtual css::uno::Reference< css::uno::XComponentContext > getORB() const override
Definition: dbwiz.cxx:196
virtual void saveDatasource() override
Definition: dbwiz.cxx:310
virtual ~ODbTypeWizDialog() override
Definition: dbwiz.cxx:90
virtual void enableConfirmSettings(bool _bEnable) override
enables or disables the user's possibility to confirm the settings
Definition: dbwiz.cxx:299
virtual std::pair< css::uno::Reference< css::sdbc::XConnection >, bool > createConnection() override
Definition: dbwiz.cxx:191
virtual const SfxItemSet * getOutputSet() const override
Definition: dbwiz.cxx:181
std::unique_ptr< ODbDataSourceAdministrationHelper > m_pImpl
Definition: dbwiz.hxx:56
virtual void setTitle(const OUString &_sTitle) override
Definition: dbwiz.cxx:294
virtual SfxItemSet * getWriteOutputSet() override
Definition: dbwiz.cxx:186
virtual std::unique_ptr< BuilderPage > createPage(WizardState _nState) override
to override to create new pages
Definition: dbwiz.cxx:216
class SAL_NO_VTABLE XPropertySet
sal_Int16 WizardState