1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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"
30 namespace com
{ namespace sun
{ namespace star
{
35 class XMultiServiceFactory
;
41 class ODbDataSourceAdministrationHelper
;
44 /** implements the user adin 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 ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XConnection
> m_xConnection
;
52 bool m_bOwnConnection
;
54 virtual void PageCreated(sal_uInt16 _nId
, SfxTabPage
& _rPage
) SAL_OVERRIDE
;
56 OUserAdminDlg( vcl::Window
* _pParent
58 ,const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
>& _rxORB
59 ,const ::com::sun::star::uno::Any
& _aDataSourceName
60 ,const ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XConnection
>& _xConnection
);
62 virtual ~OUserAdminDlg();
63 virtual void dispose() SAL_OVERRIDE
;
65 virtual const SfxItemSet
* getOutputSet() const SAL_OVERRIDE
;
66 virtual SfxItemSet
* getWriteOutputSet() SAL_OVERRIDE
;
68 virtual short Execute() SAL_OVERRIDE
;
70 // forwards to ODbDataSourceAdministrationHelper
71 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XComponentContext
> getORB() const SAL_OVERRIDE
;
72 virtual ::std::pair
< ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XConnection
>,sal_Bool
> createConnection() SAL_OVERRIDE
;
73 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::sdbc::XDriver
> getDriver() SAL_OVERRIDE
;
74 virtual OUString
getDatasourceType(const SfxItemSet
& _rSet
) const SAL_OVERRIDE
;
75 virtual void clearPassword() SAL_OVERRIDE
;
76 virtual bool saveDatasource() SAL_OVERRIDE
;
77 virtual void setTitle(const OUString
& _sTitle
) SAL_OVERRIDE
;
78 virtual void enableConfirmSettings( bool _bEnable
) SAL_OVERRIDE
;
82 #endif // INCLUDED_DBACCESS_SOURCE_UI_INC_USERADMINDLG_HXX
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */