24#include <svx/strings.hrc>
30 if (m_xNewPasswdED->get_text() != m_xRepeatPasswdED->get_text())
33 VclMessageType::Warning, VclButtonsType::Ok,
34 m_aRepeatPasswdErrStr));
36 m_xNewPasswdED->set_text(
"");
37 m_xRepeatPasswdED->set_text(
"");
38 m_xNewPasswdED->grab_focus();
42 if (bOK && m_aCheckPasswordHdl.IsSet() && !m_aCheckPasswordHdl.Call(
this))
45 VclMessageType::Warning, VclButtonsType::Ok,
48 m_xOldPasswdED->set_text(
"");
49 m_xOldPasswdED->grab_focus();
59 if (!m_xOKBtn->get_sensitive())
60 m_xOKBtn->set_sensitive(
true);
63SvxPasswordDialog::SvxPasswordDialog(
weld::Window* pParent,
bool bDisableOldPassword)
65 , m_aOldPasswdErrStr(
SvxResId(RID_SVXSTR_ERR_OLD_PASSWD))
66 , m_aRepeatPasswdErrStr(
SvxResId(RID_SVXSTR_ERR_REPEAT_PASSWD ))
67 , m_xOldFL(m_xBuilder->weld_label(
"oldpass"))
68 , m_xOldPasswdFT(m_xBuilder->weld_label(
"oldpassL"))
69 , m_xOldPasswdED(m_xBuilder->weld_entry(
"oldpassEntry"))
70 , m_xNewPasswdED(m_xBuilder->weld_entry(
"newpassEntry"))
71 , m_xRepeatPasswdED(m_xBuilder->weld_entry(
"confirmpassEntry"))
72 , m_xOKBtn(m_xBuilder->weld_button(
"ok"))
74 m_xOKBtn->connect_clicked(
LINK(
this, SvxPasswordDialog, ButtonHdl));
75 m_xRepeatPasswdED->connect_changed(
LINK(
this, SvxPasswordDialog, EditModifyHdl));
76 EditModifyHdl(*m_xRepeatPasswdED);
78 if (bDisableOldPassword)
80 m_xOldFL->set_sensitive(
false);
81 m_xOldPasswdFT->set_sensitive(
false);
82 m_xOldPasswdED->set_sensitive(
false);
83 m_xNewPasswdED->grab_focus();
87SvxPasswordDialog::~SvxPasswordDialog()
Reference< XExecutableDialog > m_xDialog
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
OUString SvxResId(TranslateId aId)
#define LINK(Instance, Class, Member)
IMPL_LINK_NOARG(SvxPasswordDialog, ButtonHdl, weld::Button &, void)