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