xref: /aoo41x/main/uui/source/passworddlg.hxx (revision b16fc349)
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 
24 #ifndef PASSWORDDLG_HXX
25 #define PASSWORDDLG_HXX
26 
27 #include <com/sun/star/task/PasswordRequestMode.hpp>
28 #include <svtools/stdctrl.hxx>
29 #include <vcl/button.hxx>
30 #include <vcl/dialog.hxx>
31 #include <vcl/edit.hxx>
32 #include <vcl/group.hxx>
33 #include <vcl/fixed.hxx>
34 
35 //============================================================================
36 
37 class PasswordDialog : public ModalDialog
38 {
39 	FixedText		aFTPassword;
40 	Edit			aEDPassword;
41     FixedText       aFTConfirmPassword;
42     Edit            aEDConfirmPassword;
43 	OKButton		aOKBtn;
44 	CancelButton	aCancelBtn;
45 	HelpButton		aHelpBtn;
46     FixedLine       aFixedLine1;
47     sal_uInt16          nMinLen;
48     String          aPasswdMismatch;
49 
50 
51 	DECL_LINK( OKHdl_Impl, OKButton * );
52 
53 public:
54     PasswordDialog( Window* pParent, ::com::sun::star::task::PasswordRequestMode nDlgMode, ResMgr * pResMgr, ::rtl::OUString& aDocURL,
55             bool bOpenToModify = false, bool bIsSimplePasswordRequest = false );
56 
SetMinLen(sal_uInt16 nMin)57     void            SetMinLen( sal_uInt16 nMin ) { nMinLen = nMin; }
GetPassword() const58 	String			GetPassword() const { return aEDPassword.GetText(); }
59 
60 private:
61 	::com::sun::star::task::PasswordRequestMode		nDialogMode;
62 	ResMgr*											pResourceMgr;
63 };
64 
65 #endif // PASSWORDDLG_HXX
66 
67