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 _SVX_PASSWD_HXX 28 #define _SVX_PASSWD_HXX 29 30 // include --------------------------------------------------------------- 31 32 #include <sfx2/basedlgs.hxx> 33 34 #ifndef _FIXED_HXX //autogen 35 #include <vcl/fixed.hxx> 36 #endif 37 38 #ifndef _EDIT_HXX //autogen 39 #include <vcl/edit.hxx> 40 #endif 41 42 #ifndef _BUTTON_HXX //autogen 43 #include <vcl/button.hxx> 44 #endif 45 #include "svx/svxdllapi.h" 46 47 // class SvxPasswordDialog ----------------------------------------------- 48 49 class SVX_DLLPUBLIC SvxPasswordDialog : public SfxModalDialog 50 { 51 private: 52 FixedLine aOldFL; 53 FixedText aOldPasswdFT; 54 Edit aOldPasswdED; 55 FixedLine aNewFL; 56 FixedText aNewPasswdFT; 57 Edit aNewPasswdED; 58 FixedText aRepeatPasswdFT; 59 Edit aRepeatPasswdED; 60 OKButton aOKBtn; 61 CancelButton aEscBtn; 62 HelpButton aHelpBtn; 63 64 String aOldPasswdErrStr; 65 String aRepeatPasswdErrStr; 66 67 Link aCheckPasswordHdl; 68 69 sal_Bool bEmpty; 70 71 DECL_LINK( ButtonHdl, OKButton * ); 72 DECL_LINK( EditModifyHdl, Edit * ); 73 74 public: 75 SvxPasswordDialog( Window* pParent, sal_Bool bAllowEmptyPasswords = sal_False, sal_Bool bDisableOldPassword = sal_False ); 76 ~SvxPasswordDialog(); 77 78 String GetOldPassword() const { return aOldPasswdED.GetText(); } 79 String GetNewPassword() const { return aNewPasswdED.GetText(); } 80 81 void SetCheckPasswordHdl( const Link& rLink ) { aCheckPasswordHdl = rLink; } 82 }; 83 84 85 #endif 86 87