LibreOffice Module dbaccess (master) 1
UserAdminDlg.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 <sfx2/tabdlg.hxx>
23#include "IItemSetHelper.hxx"
24#include <memory>
25
26namespace com::sun::star {
27 namespace sdbc {
28 class XConnection;
29 }
30 namespace lang {
31 class XMultiServiceFactory;
32 }
33}
34
35namespace dbaui
36{
37 class ODbDataSourceAdministrationHelper;
38 // OUserAdminDlg
39
43 {
45 std::unique_ptr<ODbDataSourceAdministrationHelper> m_pImpl;
47 css::uno::Reference< css::sdbc::XConnection> m_xConnection;
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);
56
57 virtual ~OUserAdminDlg() override;
58
59 virtual const SfxItemSet* getOutputSet() const override;
60 virtual SfxItemSet* getWriteOutputSet() override;
61
62 virtual short run() override;
63
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;
73 };
74} // namespace dbaui
75
76/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
implements the user admin dialog
OUserAdminDlg(weld::Window *pParent, SfxItemSet *pItems, const css::uno::Reference< css::uno::XComponentContext > &rxORB, const css::uno::Any &rDataSourceName, const css::uno::Reference< css::sdbc::XConnection > &rConnection)
virtual css::uno::Reference< css::uno::XComponentContext > getORB() const override
virtual void PageCreated(const OUString &rId, SfxTabPage &_rPage) override
virtual short run() override
virtual SfxItemSet * getWriteOutputSet() override
virtual void saveDatasource() override
virtual ~OUserAdminDlg() override
virtual std::pair< css::uno::Reference< css::sdbc::XConnection >, bool > createConnection() override
css::uno::Reference< css::sdbc::XConnection > m_xConnection
virtual void setTitle(const OUString &_sTitle) override
virtual OUString getDatasourceType(const SfxItemSet &_rSet) const override
virtual const SfxItemSet * getOutputSet() const override
virtual css::uno::Reference< css::sdbc::XDriver > getDriver() override
virtual void enableConfirmSettings(bool _bEnable) override
enables or disables the user's possibility to confirm the settings
weld::Window * m_pParent
virtual void clearPassword() override
SfxItemSet * m_pItemSet
std::unique_ptr< ODbDataSourceAdministrationHelper > m_pImpl