Gtk-WARNING gtktreestore.c:1047: Invalid column number 1 added to iter
[LibreOffice.git] / dbaccess / source / ui / inc / UserAdminDlg.hxx
blob95edbe5f5527aac6f203d944b63704e452b1d3cd
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 #pragma once
22 #include <sfx2/tabdlg.hxx>
23 #include "IItemSetHelper.hxx"
24 #include <memory>
26 namespace com::sun::star {
27 namespace sdbc {
28 class XConnection;
30 namespace lang {
31 class XMultiServiceFactory;
35 namespace dbaui
37 class ODbDataSourceAdministrationHelper;
38 // OUserAdminDlg
40 /** implements the user admin dialog
42 class OUserAdminDlg : public SfxTabDialogController, public IItemSetHelper, public IDatabaseSettingsDialog
44 weld::Window* m_pParent;
45 std::unique_ptr<ODbDataSourceAdministrationHelper> m_pImpl;
46 SfxItemSet* m_pItemSet;
47 css::uno::Reference< css::sdbc::XConnection> m_xConnection;
48 bool m_bOwnConnection;
49 protected:
50 virtual void PageCreated(const OUString& rId, SfxTabPage& _rPage) override;
51 public:
52 OUserAdminDlg(weld::Window* pParent, SfxItemSet* pItems,
53 const css::uno::Reference< css::uno::XComponentContext >& rxORB,
54 const css::uno::Any& rDataSourceName,
55 const css::uno::Reference< css::sdbc::XConnection>& rConnection);
57 virtual ~OUserAdminDlg() override;
59 virtual const SfxItemSet* getOutputSet() const override;
60 virtual SfxItemSet* getWriteOutputSet() override;
62 virtual short run() override;
64 // forwards to ODbDataSourceAdministrationHelper
65 virtual css::uno::Reference< css::uno::XComponentContext > getORB() const override;
66 virtual std::pair< css::uno::Reference< css::sdbc::XConnection >,bool> createConnection() override;
67 virtual css::uno::Reference< css::sdbc::XDriver > getDriver() override;
68 virtual OUString getDatasourceType(const SfxItemSet& _rSet) const override;
69 virtual void clearPassword() override;
70 virtual void saveDatasource() override;
71 virtual void setTitle(const OUString& _sTitle) override;
72 virtual void enableConfirmSettings( bool _bEnable ) override;
74 } // namespace dbaui
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */