summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-04-02 14:12:53 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-04-02 17:04:20 +0200
commit7637054838aa71374dc02c32566dcd5d3ded2d0d (patch)
tree8f696dae590a768ad18c15714a6d41d6ebe27a6d /include
parent52829d9a7a57fa98a0d8f109612352605c54cc47 (diff)
weld SvxPasswordDialog
Change-Id: I2e51f1a0a96eb042a4460bb9591b63a169eb6de2 Reviewed-on: https://gerrit.libreoffice.org/52258 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/svx/passwd.hxx48
1 files changed, 19 insertions, 29 deletions
diff --git a/include/svx/passwd.hxx b/include/svx/passwd.hxx
index 2ddbb6373f56..227d1288f813 100644
--- a/include/svx/passwd.hxx
+++ b/include/svx/passwd.hxx
@@ -19,49 +19,39 @@
#ifndef INCLUDED_SVX_PASSWD_HXX
#define INCLUDED_SVX_PASSWD_HXX
-#include <sfx2/basedlgs.hxx>
-
-#include <vcl/fixed.hxx>
-
-#include <vcl/edit.hxx>
-
-#include <vcl/button.hxx>
+#include <vcl/weld.hxx>
#include <svx/svxdllapi.h>
// class SvxPasswordDialog -----------------------------------------------
-class SVX_DLLPUBLIC SvxPasswordDialog : public SfxModalDialog
+class SVX_DLLPUBLIC SvxPasswordDialog : public weld::GenericDialogController
{
private:
- VclPtr<FixedText> m_pOldFL;
- VclPtr<FixedText> m_pOldPasswdFT;
- VclPtr<Edit> m_pOldPasswdED;
- VclPtr<Edit> m_pNewPasswdED;
- VclPtr<Edit> m_pRepeatPasswdED;
- VclPtr<OKButton> m_pOKBtn;
+ OUString m_aOldPasswdErrStr;
+ OUString m_aRepeatPasswdErrStr;
+ Link<SvxPasswordDialog*,bool> m_aCheckPasswordHdl;
+ bool m_bEmpty;
- OUString aOldPasswdErrStr;
- OUString aRepeatPasswdErrStr;
+ std::unique_ptr<weld::Label> m_xOldFL;
+ std::unique_ptr<weld::Label> m_xOldPasswdFT;
+ std::unique_ptr<weld::Entry> m_xOldPasswdED;
+ std::unique_ptr<weld::Entry> m_xNewPasswdED;
+ std::unique_ptr<weld::Entry> m_xRepeatPasswdED;
+ std::unique_ptr<weld::Button> m_xOKBtn;
- Link<SvxPasswordDialog*,bool> aCheckPasswordHdl;
-
- bool bEmpty;
-
- DECL_LINK(ButtonHdl, Button*, void);
- DECL_LINK(EditModifyHdl, Edit&, void);
+ DECL_LINK(ButtonHdl, weld::Button&, void);
+ DECL_LINK(EditModifyHdl, weld::Entry&, void);
public:
- SvxPasswordDialog( vcl::Window* pParent, bool bAllowEmptyPasswords, bool bDisableOldPassword );
- virtual ~SvxPasswordDialog() override;
- virtual void dispose() override;
+ SvxPasswordDialog(weld::Window* pParent, bool bAllowEmptyPasswords, bool bDisableOldPassword);
+ virtual ~SvxPasswordDialog() override;
- OUString GetOldPassword() const { return m_pOldPasswdED->GetText(); }
- OUString GetNewPassword() const { return m_pNewPasswdED->GetText(); }
+ OUString GetOldPassword() const { return m_xOldPasswdED->get_text(); }
+ OUString GetNewPassword() const { return m_xNewPasswdED->get_text(); }
- void SetCheckPasswordHdl( const Link<SvxPasswordDialog*,bool>& rLink ) { aCheckPasswordHdl = rLink; }
+ void SetCheckPasswordHdl( const Link<SvxPasswordDialog*,bool>& rLink ) { m_aCheckPasswordHdl = rLink; }
};
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */