Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / dbaccess / source / ui / inc / UserAdminDlg.hxx
blobe6e5949264b6bdf5c950347a14b4278b2f7b3931
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef INCLUDED_DBACCESS_SOURCE_UI_INC_USERADMINDLG_HXX
21 #define INCLUDED_DBACCESS_SOURCE_UI_INC_USERADMINDLG_HXX
23 #include <sfx2/tabdlg.hxx>
24 #include "dsntypes.hxx"
25 #include "IItemSetHelper.hxx"
26 #include <comphelper/uno3.hxx>
27 #include "moduledbu.hxx"
28 #include <memory>
30 namespace com { namespace sun { namespace star {
31 namespace sdbc {
32 class XConnection;
34 namespace lang {
35 class XMultiServiceFactory;
37 }}}
39 namespace dbaui
41 class ODbDataSourceAdministrationHelper;
42 // OUserAdminDlg
44 /** implements the user admin dialog
46 class OUserAdminDlg : public SfxTabDialog, public IItemSetHelper, public IDatabaseSettingsDialog,public dbaui::OModuleClient
48 OModuleClient m_aModuleClient;
49 ::std::unique_ptr<ODbDataSourceAdministrationHelper> m_pImpl;
50 SfxItemSet* m_pItemSet;
51 css::uno::Reference< css::sdbc::XConnection> m_xConnection;
52 bool m_bOwnConnection;
53 protected:
54 virtual void PageCreated(sal_uInt16 _nId, SfxTabPage& _rPage) override;
55 public:
56 OUserAdminDlg( vcl::Window* _pParent
57 ,SfxItemSet* _pItems
58 ,const css::uno::Reference< css::uno::XComponentContext >& _rxORB
59 ,const css::uno::Any& _aDataSourceName
60 ,const css::uno::Reference< css::sdbc::XConnection>& _xConnection);
62 virtual ~OUserAdminDlg();
63 virtual void dispose() override;
65 virtual const SfxItemSet* getOutputSet() const override;
66 virtual SfxItemSet* getWriteOutputSet() override;
68 virtual short Execute() override;
70 // forwards to ODbDataSourceAdministrationHelper
71 virtual css::uno::Reference< css::uno::XComponentContext > getORB() const override;
72 virtual ::std::pair< css::uno::Reference< css::sdbc::XConnection >,sal_Bool> createConnection() override;
73 virtual css::uno::Reference< css::sdbc::XDriver > getDriver() override;
74 virtual OUString getDatasourceType(const SfxItemSet& _rSet) const override;
75 virtual void clearPassword() override;
76 virtual void saveDatasource() override;
77 virtual void setTitle(const OUString& _sTitle) override;
78 virtual void enableConfirmSettings( bool _bEnable ) override;
80 } // namespace dbaui
82 #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_USERADMINDLG_HXX
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */