xref: /aoo41x/main/svx/inc/svx/passwd.hxx (revision 3334a7e6)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _SVX_PASSWD_HXX
24 #define _SVX_PASSWD_HXX
25 
26 // include ---------------------------------------------------------------
27 
28 #include <sfx2/basedlgs.hxx>
29 
30 #ifndef _FIXED_HXX //autogen
31 #include <vcl/fixed.hxx>
32 #endif
33 
34 #ifndef _EDIT_HXX //autogen
35 #include <vcl/edit.hxx>
36 #endif
37 
38 #ifndef _BUTTON_HXX //autogen
39 #include <vcl/button.hxx>
40 #endif
41 #include "svx/svxdllapi.h"
42 
43 // class SvxPasswordDialog -----------------------------------------------
44 
45 class SVX_DLLPUBLIC SvxPasswordDialog : public SfxModalDialog
46 {
47 private:
48     FixedLine       aOldFL;
49 	FixedText		aOldPasswdFT;
50 	Edit			aOldPasswdED;
51     FixedLine       aNewFL;
52 	FixedText		aNewPasswdFT;
53 	Edit			aNewPasswdED;
54 	FixedText		aRepeatPasswdFT;
55 	Edit			aRepeatPasswdED;
56 	OKButton		aOKBtn;
57 	CancelButton	aEscBtn;
58 	HelpButton		aHelpBtn;
59 
60     String			aOldPasswdErrStr;
61 	String			aRepeatPasswdErrStr;
62 
63     Link            aCheckPasswordHdl;
64 
65     sal_Bool		    bEmpty;
66 
67     DECL_LINK( ButtonHdl, OKButton * );
68     DECL_LINK( EditModifyHdl, Edit * );
69 
70 public:
71 					SvxPasswordDialog( Window* pParent, sal_Bool bAllowEmptyPasswords = sal_False, sal_Bool bDisableOldPassword = sal_False );
72 					~SvxPasswordDialog();
73 
GetOldPassword() const74 	String			GetOldPassword() const { return aOldPasswdED.GetText(); }
GetNewPassword() const75     String			GetNewPassword() const { return aNewPasswdED.GetText(); }
76 
SetCheckPasswordHdl(const Link & rLink)77     void            SetCheckPasswordHdl( const Link& rLink ) { aCheckPasswordHdl = rLink; }
78 };
79 
80 
81 #endif
82 
83