Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 : #ifndef INCLUDED_SVX_PASSWD_HXX
20 : #define INCLUDED_SVX_PASSWD_HXX
21 :
22 : #include <sfx2/basedlgs.hxx>
23 :
24 : #include <vcl/fixed.hxx>
25 :
26 : #include <vcl/edit.hxx>
27 :
28 : #include <vcl/button.hxx>
29 : #include <svx/svxdllapi.h>
30 :
31 : // class SvxPasswordDialog -----------------------------------------------
32 :
33 : class SVX_DLLPUBLIC SvxPasswordDialog : public SfxModalDialog
34 : {
35 : private:
36 : VclPtr<FixedText> m_pOldFL;
37 : VclPtr<FixedText> m_pOldPasswdFT;
38 : VclPtr<Edit> m_pOldPasswdED;
39 : VclPtr<Edit> m_pNewPasswdED;
40 : VclPtr<Edit> m_pRepeatPasswdED;
41 : VclPtr<OKButton> m_pOKBtn;
42 :
43 : OUString aOldPasswdErrStr;
44 : OUString aRepeatPasswdErrStr;
45 :
46 : Link<> aCheckPasswordHdl;
47 :
48 : bool bEmpty;
49 :
50 : DECL_LINK(ButtonHdl, void *);
51 : DECL_LINK(EditModifyHdl, void *);
52 :
53 : public:
54 : SvxPasswordDialog( vcl::Window* pParent, bool bAllowEmptyPasswords = false, bool bDisableOldPassword = false );
55 : virtual ~SvxPasswordDialog();
56 : virtual void dispose() SAL_OVERRIDE;
57 :
58 0 : OUString GetOldPassword() const { return m_pOldPasswdED->GetText(); }
59 0 : OUString GetNewPassword() const { return m_pNewPasswdED->GetText(); }
60 :
61 0 : void SetCheckPasswordHdl( const Link<>& rLink ) { aCheckPasswordHdl = rLink; }
62 : };
63 :
64 :
65 : #endif
66 :
67 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|