22#include <sfx2/strings.hrc>
23#include <rtl/ustrbuf.hxx>
46 sal_Int32 nLen = rTest.getLength();
47 OUStringBuffer aFilter(nLen);
49 for (sal_Int32
i = 0;
i < nLen; ++
i)
54 aFilter.append(*pTest);
60 rTest = aFilter.makeStringAndClear();
72 ( GetConfirm() != GetPassword() );
74 bConfirmFailed =
true;
77 if (m_xConfirmFailedDialog)
80 m_xConfirmFailedDialog =
82 VclMessageType::Warning, VclButtonsType::Ok,
84 m_xConfirmFailedDialog->runAsync(m_xConfirmFailedDialog, [
this](sal_uInt32 response){
85 m_xConfirm1ED->set_text(OUString());
86 m_xConfirm1ED->grab_focus();
87 m_xConfirmFailedDialog->response(response);
97 : GenericDialogController(pParent,
"sfx/ui/password.ui",
"PasswordDialog")
98 , m_xPassword1Box(m_xBuilder->weld_frame(
"password1frame"))
99 , m_xUserFT(m_xBuilder->weld_label(
"userft"))
100 , m_xUserED(m_xBuilder->weld_entry(
"usered"))
101 , m_xPassword1FT(m_xBuilder->weld_label(
"pass1ft"))
102 , m_xPassword1ED(m_xBuilder->weld_entry(
"pass1ed"))
103 , m_xConfirm1FT(m_xBuilder->weld_label(
"confirm1ft"))
104 , m_xConfirm1ED(m_xBuilder->weld_entry(
"confirm1ed"))
105 , m_xPassword2Box(m_xBuilder->weld_frame(
"password2frame"))
106 , m_xPassword2FT(m_xBuilder->weld_label(
"pass2ft"))
107 , m_xPassword2ED(m_xBuilder->weld_entry(
"pass2ed"))
108 , m_xConfirm2FT(m_xBuilder->weld_label(
"confirm2ft"))
109 , m_xConfirm2ED(m_xBuilder->weld_entry(
"confirm2ed"))
110 , m_xMinLengthFT(m_xBuilder->weld_label(
"minlenft"))
111 , m_xOnlyAsciiFT(m_xBuilder->weld_label(
"onlyascii"))
112 , m_xOKBtn(m_xBuilder->weld_button(
"ok"))
113 , maMinLenPwdStr(
SfxResId(STR_PASSWD_MIN_LEN))
114 , maMinLenPwdStr1(
SfxResId(STR_PASSWD_MIN_LEN1))
115 , maEmptyPwdStr(
SfxResId(STR_PASSWD_EMPTY))
217 return GenericDialogController::run();
Reference< XExecutableDialog > m_xDialog
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
std::unique_ptr< weld::Frame > m_xPassword1Box
std::unique_ptr< weld::Entry > m_xUserED
std::unique_ptr< weld::Entry > m_xConfirm1ED
SfxPasswordDialog(weld::Widget *pParent, const OUString *pGroupText=nullptr)
virtual short run() override
std::unique_ptr< weld::Label > m_xPassword2FT
void ShowMinLengthText(bool bShow)
std::shared_ptr< weld::MessageDialog > m_xConfirmFailedDialog
std::unique_ptr< weld::Label > m_xConfirm2FT
std::unique_ptr< weld::Button > m_xOKBtn
void SetMinLen(sal_uInt16 Len)
std::unique_ptr< weld::Entry > m_xConfirm2ED
std::unique_ptr< weld::Label > m_xPassword1FT
std::unique_ptr< weld::Frame > m_xPassword2Box
std::unique_ptr< weld::Label > m_xConfirm1FT
std::unique_ptr< weld::Label > m_xUserFT
std::unique_ptr< weld::Entry > m_xPassword1ED
std::unique_ptr< weld::Label > m_xMinLengthFT
std::unique_ptr< weld::Entry > m_xPassword2ED
std::unique_ptr< weld::Label > m_xOnlyAsciiFT
#define LINK(Instance, Class, Member)
IMPL_LINK(SfxPasswordDialog, InsertTextHdl, OUString &, rTest, bool)
IMPL_LINK_NOARG(SfxPasswordDialog, EditModifyHdl, weld::Entry &, void)
OUString SfxResId(TranslateId aId)