fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / include / sfx2 / passwd.hxx
blob1f10c7416b98cbb54fdfa888ef2786ed3f91b6f2
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 _SFX_PASSWD_HXX
20 #define _SFX_PASSWD_HXX
22 #include "sal/config.h"
23 #include <sfx2/dllapi.h>
24 #include <vcl/button.hxx>
25 #include <vcl/dialog.hxx>
26 #include <vcl/edit.hxx>
27 #include <vcl/fixed.hxx>
28 #include <vcl/layout.hxx>
29 #include <sfx2/app.hxx>
31 // defines ---------------------------------------------------------------
33 #define SHOWEXTRAS_NONE ((sal_uInt16)0x0000)
34 #define SHOWEXTRAS_USER ((sal_uInt16)0x0001)
35 #define SHOWEXTRAS_CONFIRM ((sal_uInt16)0x0002)
36 #define SHOWEXTRAS_PASSWORD2 ((sal_uInt16)0x0004)
37 #define SHOWEXTRAS_CONFIRM2 ((sal_uInt16)0x0008)
38 #define SHOWEXTRAS_ALL ((sal_uInt16)(SHOWEXTRAS_USER | SHOWEXTRAS_CONFIRM))
40 // class SfxPasswordDialog -----------------------------------------------
42 class SFX2_DLLPUBLIC SfxPasswordDialog : public ModalDialog
44 private:
45 VclFrame* mpPassword1Box;
46 FixedText* mpUserFT;
47 Edit* mpUserED;
48 FixedText* mpPassword1FT;
49 Edit* mpPassword1ED;
50 FixedText* mpConfirm1FT;
51 Edit* mpConfirm1ED;
53 VclFrame* mpPassword2Box;
54 FixedText* mpPassword2FT;
55 Edit* mpPassword2ED;
56 FixedText* mpConfirm2FT;
57 Edit* mpConfirm2ED;
59 FixedText* mpMinLengthFT;
61 OKButton* mpOKBtn;
63 String maMinLenPwdStr;
64 String maEmptyPwdStr;
65 String maMainPwdStr;
66 sal_uInt16 mnMinLen;
67 sal_uInt16 mnExtras;
69 bool mbAsciiOnly;
70 DECL_DLLPRIVATE_LINK(EditModifyHdl, Edit*);
71 DECL_DLLPRIVATE_LINK(OKHdl, void *);
73 void SetPasswdText();
75 public:
76 SfxPasswordDialog(Window* pParent, const String* pGroupText = NULL);
78 String GetUser() const
80 return mpUserED->GetText();
82 String GetPassword() const
84 return mpPassword1ED->GetText();
86 String GetConfirm() const
88 return mpConfirm1ED->GetText();
90 String GetPassword2() const
92 return mpPassword2ED->GetText();
94 String GetConfirm2() const
96 return mpConfirm2ED->GetText();
98 void SetGroup2Text(const String& i_rText)
100 mpPassword2Box->set_label(i_rText);
102 void SetMinLen(sal_uInt16 Len);
103 void SetEditHelpId(const OString& rId)
105 mpPassword1ED->SetHelpId( rId );
107 void ShowExtras(sal_uInt16 nExtras)
109 mnExtras = nExtras;
111 void AllowAsciiOnly(bool i_bAsciiOnly = true)
113 mbAsciiOnly = i_bAsciiOnly;
116 void ShowMinLengthText(bool bShow);
118 virtual short Execute();
121 #endif // #ifndef _SFX_PASSWD_HXX
123 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */