1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_SVX_PASSWD_HXX
20 #define INCLUDED_SVX_PASSWD_HXX
22 #include <sfx2/basedlgs.hxx>
24 #include <vcl/fixed.hxx>
26 #include <vcl/edit.hxx>
28 #include <vcl/button.hxx>
29 #include <svx/svxdllapi.h>
31 // class SvxPasswordDialog -----------------------------------------------
33 class SVX_DLLPUBLIC SvxPasswordDialog
: public SfxModalDialog
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
;
43 OUString aOldPasswdErrStr
;
44 OUString aRepeatPasswdErrStr
;
46 Link
<> aCheckPasswordHdl
;
50 DECL_LINK(ButtonHdl
, void *);
51 DECL_LINK(EditModifyHdl
, void *);
54 SvxPasswordDialog( vcl::Window
* pParent
, bool bAllowEmptyPasswords
= false, bool bDisableOldPassword
= false );
55 virtual ~SvxPasswordDialog();
56 virtual void dispose() SAL_OVERRIDE
;
58 OUString
GetOldPassword() const { return m_pOldPasswdED
->GetText(); }
59 OUString
GetNewPassword() const { return m_pNewPasswdED
->GetText(); }
61 void SetCheckPasswordHdl( const Link
<>& rLink
) { aCheckPasswordHdl
= rLink
; }
67 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */