diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-10-05 12:18:07 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-10-05 14:37:49 +0100 |
commit | 06e3724d1c166e6715455555788f5b11c310d60a (patch) | |
tree | 140db8973a3baed0986d6f3968aa9d24a91b8a8c /sfx2/inc | |
parent | a65f48f375d218b592ba7c17752f9ca86e14bd65 (diff) |
convert password dialog to .ui
Change-Id: Ib2e9c5a72239fc0fa3a54ac3717d90fe1b779d63
Diffstat (limited to 'sfx2/inc')
-rw-r--r-- | sfx2/inc/sfx2/passwd.hxx | 91 | ||||
-rw-r--r-- | sfx2/inc/sfx2/sfx.hrc | 6 |
2 files changed, 62 insertions, 35 deletions
diff --git a/sfx2/inc/sfx2/passwd.hxx b/sfx2/inc/sfx2/passwd.hxx index 2e07153973c1..d4fd5ee884f3 100644 --- a/sfx2/inc/sfx2/passwd.hxx +++ b/sfx2/inc/sfx2/passwd.hxx @@ -34,6 +34,7 @@ #include <vcl/dialog.hxx> #include <vcl/edit.hxx> #include <vcl/fixed.hxx> +#include <vcl/layout.hxx> #include <sfx2/app.hxx> // defines --------------------------------------------------------------- @@ -50,23 +51,23 @@ class SFX2_DLLPUBLIC SfxPasswordDialog : public ModalDialog { private: - FixedLine maPasswordBox; - FixedText maUserFT; - Edit maUserED; - FixedText maPasswordFT; - Edit maPasswordED; - FixedText maConfirmFT; - Edit maConfirmED; - FixedText maMinLengthFT; - FixedLine maPassword2Box; - FixedText maPassword2FT; - Edit maPassword2ED; - FixedText maConfirm2FT; - Edit maConfirm2ED; + VclFrame* mpPassword1Box; + FixedText* mpUserFT; + Edit* mpUserED; + FixedText* mpPassword1FT; + Edit* mpPassword1ED; + FixedText* mpConfirm1FT; + Edit* mpConfirm1ED; - OKButton maOKBtn; - CancelButton maCancelBtn; - HelpButton maHelpBtn; + VclFrame* mpPassword2Box; + FixedText* mpPassword2FT; + Edit* mpPassword2ED; + FixedText* mpConfirm2FT; + Edit* mpConfirm2ED; + + FixedText* mpMinLengthFT; + + OKButton* mpOKBtn; String maConfirmStr; String maMinLenPwdStr; @@ -76,28 +77,52 @@ private: sal_uInt16 mnExtras; bool mbAsciiOnly; - DECL_DLLPRIVATE_LINK( EditModifyHdl, Edit* ); + DECL_DLLPRIVATE_LINK(EditModifyHdl, Edit*); DECL_DLLPRIVATE_LINK(OKHdl, void *); void SetPasswdText(); public: - SfxPasswordDialog( Window* pParent, const String* pGroupText = NULL ); - - String GetUser() const { return maUserED.GetText(); } - String GetPassword() const { return maPasswordED.GetText(); } - String GetConfirm() const { return maConfirmED.GetText(); } - - String GetPassword2() const { return maPassword2ED.GetText(); } - String GetConfirm2() const { return maConfirm2ED.GetText(); } - void SetGroup2Text( const String& i_rText ) { maPassword2Box.SetText( i_rText ); } - - void SetMinLen( sal_uInt16 Len ); - void SetEditHelpId( const rtl::OString& rId ) { maPasswordED.SetHelpId( rId ); } - void ShowExtras( sal_uInt16 nExtras ) { mnExtras = nExtras; } - void AllowAsciiOnly( bool i_bAsciiOnly = true ) { mbAsciiOnly = i_bAsciiOnly; } - - virtual short Execute(); + SfxPasswordDialog(Window* pParent, const String* pGroupText = NULL); + + String GetUser() const + { + return mpUserED->GetText(); + } + String GetPassword() const + { + return mpPassword1ED->GetText(); + } + String GetConfirm() const + { + return mpConfirm1ED->GetText(); + } + String GetPassword2() const + { + return mpPassword2ED->GetText(); + } + String GetConfirm2() const + { + return mpConfirm2ED->GetText(); + } + void SetGroup2Text(const String& i_rText) + { + mpPassword2Box->set_label(i_rText); + } + void SetMinLen(sal_uInt16 Len); + void SetEditHelpId(const OString& rId) + { + mpPassword1ED->SetHelpId( rId ); + } + void ShowExtras(sal_uInt16 nExtras) + { + mnExtras = nExtras; + } + void AllowAsciiOnly(bool i_bAsciiOnly = true) + { + mbAsciiOnly = i_bAsciiOnly; + } + virtual short Execute(); }; #endif // #ifndef _SFX_PASSWD_HXX diff --git a/sfx2/inc/sfx2/sfx.hrc b/sfx2/inc/sfx2/sfx.hrc index c215a18aae91..7971b85ed241 100644 --- a/sfx2/inc/sfx2/sfx.hrc +++ b/sfx2/inc/sfx2/sfx.hrc @@ -155,7 +155,7 @@ #define STR_STANDARD (RID_SFX_START+104) #define STR_READONLY (RID_SFX_START+105) -#define STR_SFX_FILTERNAME_ALL (RID_SFX_START+106) +#define STR_SFX_FILTERNAME_ALL (RID_SFX_START+106) #define STR_EDIT (RID_SFX_START+108) #define STR_QUERY_SAVE_DOCUMENT (RID_SFX_START+110) #define STR_BYTES (RID_SFX_START+111) @@ -166,10 +166,12 @@ #define STR_STANDARD_SHORTCUT (RID_SFX_START+117) #define STR_REPAIREDDOCUMENT (RID_SFX_START+118) - #define STR_ERRUNOEVENTBINDUNG (RID_SFX_START+119) #define STR_SHARED (RID_SFX_START+120) #define RID_XMLSEC_DOCUMENTSIGNED (RID_SFX_START+121) +#define STR_PASSWD (RID_SFX_START+122) +#define STR_PASSWD_EMPTY (RID_SFX_START+123) +#define STR_PASSWD_MIN_LEN (RID_SFX_START+124) #define STR_ACCTITLE_PRODUCTIVITYTOOLS (RID_SFX_START+157) //========================================================================= |