1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 #ifndef DBAUI_USERADMIN_HXX 28 #define DBAUI_USERADMIN_HXX 29 30 #ifndef _SV_FIXED_HXX 31 #include <vcl/fixed.hxx> 32 #endif 33 #ifndef _SV_FIELD_HXX 34 #include <vcl/field.hxx> 35 #endif 36 #ifndef _SV_LSTBOX_HXX 37 #include <vcl/lstbox.hxx> 38 #endif 39 #ifndef _SV_BUTTON_HXX 40 #include <vcl/button.hxx> 41 #endif 42 #ifndef _SV_DIALOG_HXX 43 #include <vcl/dialog.hxx> 44 #endif 45 #ifndef _SV_GROUP_HXX 46 #include <vcl/group.hxx> 47 #endif 48 #ifndef DBAUI_TABLEGRANTCONTROL_HXX 49 #include "TableGrantCtrl.hxx" 50 #endif 51 #ifndef _DBAUI_ADMINPAGES_HXX_ 52 #include "adminpages.hxx" 53 #endif 54 #ifndef _COMPHELPER_UNO3_HXX_ 55 #include <comphelper/uno3.hxx> 56 #endif 57 58 FORWARD_DECLARE_INTERFACE(beans,XPropertySet) 59 FORWARD_DECLARE_INTERFACE(sdbc,XConnection) 60 FORWARD_DECLARE_INTERFACE(lang,XMultiServiceFactory) 61 62 namespace dbaui 63 { 64 65 class OUserAdmin : public OGenericAdministrationPage 66 { 67 protected: 68 FixedLine m_FL_USER; 69 FixedText m_FT_USER; 70 ListBox m_LB_USER; 71 PushButton m_PB_NEWUSER; 72 PushButton m_PB_CHANGEPWD; 73 PushButton m_PB_DELETEUSER; 74 FixedLine m_FL_TABLE_GRANTS; 75 OTableGrantControl m_TableCtrl; // show the grant rights of one user 76 77 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection> m_xConnection; 78 ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xUsers; 79 ::com::sun::star::uno::Sequence< ::rtl::OUString> m_aUserNames; 80 81 String m_UserName; 82 83 // methods 84 DECL_LINK( ListDblClickHdl, ListBox * ); 85 DECL_LINK( CloseHdl, PushButton * ); 86 DECL_LINK( UserHdl, PushButton * ); 87 88 void FillUserNames(); 89 90 OUserAdmin( Window* pParent, const SfxItemSet& _rCoreAttrs); 91 public: 92 static SfxTabPage* Create( Window* pParent, const SfxItemSet& _rAttrSet ); 93 94 ~OUserAdmin(); 95 String GetUser(); 96 97 // must be overloaded by subclasses, but it isn't pure virtual 98 virtual void implInitControls(const SfxItemSet& _rSet, sal_Bool _bSaveValue); 99 100 // <method>OGenericAdministrationPage::fillControls</method> 101 virtual void fillControls(::std::vector< ISaveValueWrapper* >& _rControlList); 102 103 // <method>OGenericAdministrationPage::fillWindows</method> 104 virtual void fillWindows(::std::vector< ISaveValueWrapper* >& _rControlList); 105 }; 106 } 107 #endif // DBAUI_USERADMIN_HXX 108