Index: sfx2/inc/passwd.hxx =================================================================== RCS file: /cvs/framework/sfx2/inc/passwd.hxx,v retrieving revision 1.6 diff -u -p -u -r1.6 passwd.hxx --- sfx2/inc/passwd.hxx 7 Sep 2005 17:10:12 -0000 1.6 +++ sfx2/inc/passwd.hxx 29 Jul 2006 11:50:09 -0000 @@ -74,6 +74,7 @@ private: Edit maPasswordED; FixedText maConfirmFT; Edit maConfirmED; + FixedText maMinLengthFT; FixedLine maPasswordBox; OKButton maOKBtn; @@ -82,12 +83,16 @@ private: String maConfirmStr; USHORT mnMinLen; + String maMinLenPwdStr; + String maEmptyPwdStr; + String maMainPwdStr; USHORT mnExtras; #if _SOLAR__PRIVATE DECL_DLLPRIVATE_LINK( EditModifyHdl, Edit* ); DECL_DLLPRIVATE_LINK( OKHdl, OKButton* ); #endif + void SetPasswdText(); public: SfxPasswordDialog( Window* pParent, const String* pGroupText = NULL ); Index: sfx2/source/dialog/passwd.cxx =================================================================== RCS file: /cvs/framework/sfx2/source/dialog/passwd.cxx,v retrieving revision 1.4 diff -u -p -u -r1.4 passwd.cxx --- sfx2/source/dialog/passwd.cxx 7 Sep 2005 18:28:19 -0000 1.4 +++ sfx2/source/dialog/passwd.cxx 29 Jul 2006 11:50:09 -0000 @@ -98,6 +98,7 @@ SfxPasswordDialog::SfxPasswordDialog( Wi maPasswordED ( this, ResId( ED_PASSWD_PASSWORD ) ), maConfirmFT ( this, ResId( FT_PASSWD_CONFIRM ) ), maConfirmED ( this, ResId( ED_PASSWD_CONFIRM ) ), + maMinLengthFT ( this, ResId( FT_PASSWD_MINLEN ) ), maPasswordBox ( this, ResId( GB_PASSWD_PASSWORD ) ), maOKBtn ( this, ResId( BTN_PASSWD_OK ) ), maCancelBtn ( this, ResId( BTN_PASSWD_CANCEL ) ), @@ -105,6 +106,9 @@ SfxPasswordDialog::SfxPasswordDialog( Wi maConfirmStr ( ResId( STR_PASSWD_CONFIRM ) ), mnMinLen ( 5 ), + maMinLenPwdStr ( ResId( STR_PASSWD_MIN_LEN ) ), + maEmptyPwdStr ( ResId( STR_PASSWD_EMPTY ) ), + maMainPwdStr ( ), mnExtras ( 0 ) { @@ -117,6 +121,25 @@ SfxPasswordDialog::SfxPasswordDialog( Wi if ( pGroupText ) maPasswordBox.SetText( *pGroupText ); + +//set the text to the pasword length + SetPasswdText(); +} + +// ----------------------------------------------------------------------- + +void SfxPasswordDialog::SetPasswdText( ) +{ +//set the new string to the minimum password length + if( mnMinLen == 0 ) + maMinLengthFT.SetText( maEmptyPwdStr ); + else + { + maMainPwdStr = maMinLenPwdStr; + maMainPwdStr.SearchAndReplace( String::CreateFromAscii( "$(MINLEN)" ), String::CreateFromInt32((sal_Int32) mnMinLen ), 0); + maMinLengthFT.SetText( maMainPwdStr ); + maMinLengthFT.Show(); + } } // ----------------------------------------------------------------------- @@ -124,6 +147,7 @@ SfxPasswordDialog::SfxPasswordDialog( Wi void SfxPasswordDialog::SetMinLen( USHORT nLen ) { mnMinLen = nLen; + SetPasswdText(); EditModifyHdl( NULL ); } @@ -174,8 +198,10 @@ short SfxPasswordDialog::Execute() aPos = maUserED.GetPosPixel(); maPasswordED.SetPosPixel( aPos ); + aPos = maConfirmFT.GetPosPixel(); maConfirmFT.SetPosPixel( aPwdPos1 ); maConfirmED.SetPosPixel( aPwdPos2 ); + maMinLengthFT.SetPosPixel(aPos); } Size aBoxSize = maPasswordBox.GetSizePixel(); Index: sfx2/source/dialog/passwd.hrc =================================================================== RCS file: /cvs/framework/sfx2/source/dialog/passwd.hrc,v retrieving revision 1.2 diff -u -p -u -r1.2 passwd.hrc --- sfx2/source/dialog/passwd.hrc 7 Sep 2005 18:28:36 -0000 1.2 +++ sfx2/source/dialog/passwd.hrc 29 Jul 2006 11:50:09 -0000 @@ -44,12 +44,15 @@ #define ED_PASSWD_PASSWORD 14 #define FT_PASSWD_CONFIRM 15 #define ED_PASSWD_CONFIRM 16 +#define FT_PASSWD_MINLEN 17 #define BTN_PASSWD_OK 20 #define BTN_PASSWD_CANCEL 21 #define BTN_PASSWD_HELP 22 #define STR_PASSWD_CONFIRM 30 +#define STR_PASSWD_MIN_LEN 31 +#define STR_PASSWD_EMPTY 32 #endif Index: sfx2/source/dialog/passwd.src =================================================================== RCS file: /cvs/framework/sfx2/source/dialog/passwd.src,v retrieving revision 1.27 diff -u -p -u -r1.27 passwd.src --- sfx2/source/dialog/passwd.src 23 Sep 2005 15:25:58 -0000 1.27 +++ sfx2/source/dialog/passwd.src 29 Jul 2006 11:50:09 -0000 @@ -91,6 +91,22 @@ ModalDialog DLG_PASSWD Pos = MAP_APPFONT( 57, 44 ); Size = MAP_APPFONT( 75, 12 ); }; + + String STR_PASSWD_MIN_LEN + { + Text [ en-US ] = "(Minimum $(MINLEN) characters)" ; + }; + String STR_PASSWD_EMPTY + { + Text [ en-US ] = "(The password can be empty)" ; + }; + + FixedText FT_PASSWD_MINLEN + { + Pos = MAP_APPFONT(12, 65 ); + Size = MAP_APPFONT( 126, 10 ); + }; + FixedLine GB_PASSWD_PASSWORD { Pos = MAP_APPFONT( 6, 3 );