update dev300-m58
[ooovba.git] / dbaccess / source / ui / inc / UserAdminDlg.hxx
blob9a1418216fb97f1c6e55ef088206244f7a867ca3
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: UserAdminDlg.hxx,v $
10 * $Revision: 1.9.68.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef DBAUI_USERADMINDLG_HXX
32 #define DBAUI_USERADMINDLG_HXX
34 #ifndef _SFXTABDLG_HXX
35 #include <sfx2/tabdlg.hxx>
36 #endif
37 #ifndef _DBAUI_DSNTYPES_HXX_
38 #include "dsntypes.hxx"
39 #endif
40 #ifndef DBAUI_ITEMSETHELPER_HXX
41 #include "IItemSetHelper.hxx"
42 #endif
43 #ifndef _COMPHELPER_UNO3_HXX_
44 #include <comphelper/uno3.hxx>
45 #endif
46 #ifndef _DBAUI_MODULE_DBU_HXX_
47 #include "moduledbu.hxx"
48 #endif
49 #include <memory>
51 FORWARD_DECLARE_INTERFACE(beans,XPropertySet)
52 FORWARD_DECLARE_INTERFACE(sdbc,XConnection)
53 FORWARD_DECLARE_INTERFACE(lang,XMultiServiceFactory)
55 //.........................................................................
56 namespace dbaui
58 //.........................................................................
59 class ODbDataSourceAdministrationHelper;
60 //=========================================================================
61 //= OUserAdminDlg
62 //=========================================================================
64 /** implements the user adin dialog
66 class OUserAdminDlg : public SfxTabDialog, public IItemSetHelper, public IDatabaseSettingsDialog,public dbaui::OModuleClient
68 OModuleClient m_aModuleClient;
69 ::std::auto_ptr<ODbDataSourceAdministrationHelper> m_pImpl;
70 SfxItemSet* m_pItemSet;
71 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> m_xConnection;
72 sal_Bool m_bOwnConnection;
73 protected:
74 virtual void PageCreated(USHORT _nId, SfxTabPage& _rPage);
75 public:
76 OUserAdminDlg( Window* _pParent
77 ,SfxItemSet* _pItems
78 ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
79 ,const ::com::sun::star::uno::Any& _aDataSourceName
80 ,const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection);
82 virtual ~OUserAdminDlg();
84 virtual const SfxItemSet* getOutputSet() const;
85 virtual SfxItemSet* getWriteOutputSet();
87 virtual short Execute();
89 // forwards to ODbDataSourceAdministrationHelper
90 virtual ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > getORB() const;
91 virtual ::std::pair< ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >,sal_Bool> createConnection();
92 virtual ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver > getDriver();
93 virtual ::rtl::OUString getDatasourceType(const SfxItemSet& _rSet) const;
94 virtual void clearPassword();
95 virtual sal_Bool saveDatasource();
96 virtual void setTitle(const ::rtl::OUString& _sTitle);
97 virtual void enableConfirmSettings( bool _bEnable );
99 //.........................................................................
100 } // namespace dbaui
101 //.........................................................................
103 #endif // DBAUI_USERADMINDLG_HXX