merge the formfield patch from ooo-build
[ooovba.git] / dbaccess / source / ui / dlg / UserAdmin.hxx
blob02642170d508b745beab0329a82ab053a9b016c8
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: UserAdmin.hxx,v $
10 * $Revision: 1.7 $
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 ************************************************************************/
30 #ifndef DBAUI_USERADMIN_HXX
31 #define DBAUI_USERADMIN_HXX
33 #ifndef _SV_FIXED_HXX
34 #include <vcl/fixed.hxx>
35 #endif
36 #ifndef _SV_FIELD_HXX
37 #include <vcl/field.hxx>
38 #endif
39 #ifndef _SV_LSTBOX_HXX
40 #include <vcl/lstbox.hxx>
41 #endif
42 #ifndef _SV_BUTTON_HXX
43 #include <vcl/button.hxx>
44 #endif
45 #ifndef _SV_DIALOG_HXX
46 #include <vcl/dialog.hxx>
47 #endif
48 #ifndef _SV_GROUP_HXX
49 #include <vcl/group.hxx>
50 #endif
51 #ifndef DBAUI_TABLEGRANTCONTROL_HXX
52 #include "TableGrantCtrl.hxx"
53 #endif
54 #ifndef _DBAUI_ADMINPAGES_HXX_
55 #include "adminpages.hxx"
56 #endif
57 #ifndef _COMPHELPER_UNO3_HXX_
58 #include <comphelper/uno3.hxx>
59 #endif
61 FORWARD_DECLARE_INTERFACE(beans,XPropertySet)
62 FORWARD_DECLARE_INTERFACE(sdbc,XConnection)
63 FORWARD_DECLARE_INTERFACE(lang,XMultiServiceFactory)
65 namespace dbaui
68 class OUserAdmin : public OGenericAdministrationPage
70 protected:
71 FixedLine m_FL_USER;
72 FixedText m_FT_USER;
73 ListBox m_LB_USER;
74 PushButton m_PB_NEWUSER;
75 PushButton m_PB_CHANGEPWD;
76 PushButton m_PB_DELETEUSER;
77 FixedLine m_FL_TABLE_GRANTS;
78 OTableGrantControl m_TableCtrl; // show the grant rights of one user
80 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> m_xConnection;
81 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xUsers;
82 ::com::sun::star::uno::Sequence< ::rtl::OUString> m_aUserNames;
84 String m_UserName;
86 // methods
87 DECL_LINK( ListDblClickHdl, ListBox * );
88 DECL_LINK( CloseHdl, PushButton * );
89 DECL_LINK( UserHdl, PushButton * );
91 void FillUserNames();
93 OUserAdmin( Window* pParent, const SfxItemSet& _rCoreAttrs);
94 public:
95 static SfxTabPage* Create( Window* pParent, const SfxItemSet& _rAttrSet );
97 ~OUserAdmin();
98 String GetUser();
100 // must be overloaded by subclasses, but it isn't pure virtual
101 virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue);
103 // <method>OGenericAdministrationPage::fillControls</method>
104 virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList);
106 // <method>OGenericAdministrationPage::fillWindows</method>
107 virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList);
110 #endif // DBAUI_USERADMIN_HXX