Index: uui/source/masterpasscrtdlg.cxx =================================================================== RCS file: /cvs/ucb/uui/source/masterpasscrtdlg.cxx,v retrieving revision 1.4 diff -u -p -r1.4 masterpasscrtdlg.cxx --- uui/source/masterpasscrtdlg.cxx 10 Apr 2008 16:27:45 -0000 1.4 +++ uui/source/masterpasscrtdlg.cxx 19 Sep 2008 07:40:09 -0000 @@ -82,6 +82,8 @@ MasterPasswordCreateDialog::MasterPasswo aEDMasterPasswordCrt ( this, ResId( ED_MASTERPASSWORD_CRT, *pResMgr ) ), aFTMasterPasswordRepeat ( this, ResId( FT_MASTERPASSWORD_REPEAT, *pResMgr ) ), aEDMasterPasswordRepeat ( this, ResId( ED_MASTERPASSWORD_REPEAT, *pResMgr ) ), + aFTMasterPasswordWarning ( this, ResId( FT_MASTERPASSWORD_WARNING, *pResMgr ) ), + aFL ( this, ResId( FL_FIXED_LINE, *pResMgr ) ), aOKBtn ( this, ResId( BTN_MASTERPASSCRT_OK, *pResMgr ) ), aCancelBtn ( this, ResId( BTN_MASTERPASSCRT_CANCEL, *pResMgr ) ), aHelpBtn ( this, ResId( BTN_MASTERPASSCRT_HELP, *pResMgr ) ), @@ -93,5 +95,36 @@ MasterPasswordCreateDialog::MasterPasswo aOKBtn.Enable( sal_False ); aOKBtn.SetClickHdl( LINK( this, MasterPasswordCreateDialog, OKHdl_Impl ) ); aEDMasterPasswordCrt.SetModifyHdl( LINK( this, MasterPasswordCreateDialog, EditHdl_Impl ) ); + + long nLableWidth = aFTMasterPasswordWarning.GetSizePixel().Width(); + long nLabelHeight = aFTMasterPasswordWarning.GetSizePixel().Height(); + long nTextWidth = aFTMasterPasswordWarning.GetCtrlTextWidth( aFTMasterPasswordWarning.GetText() ); + long nTextHeight = aFTMasterPasswordWarning.GetTextHeight(); + + Rectangle aLabelRect( aFTMasterPasswordWarning.GetPosPixel(), aFTMasterPasswordWarning.GetSizePixel() ); + Rectangle aRect = aFTMasterPasswordWarning.GetTextRect( aLabelRect, aFTMasterPasswordWarning.GetText() ); + + long nNewLabelHeight = 0; + for( nNewLabelHeight = ( nTextWidth / nLableWidth + 1 ) * nTextHeight; + nNewLabelHeight < aRect.GetHeight(); + nNewLabelHeight += nTextHeight ); + + long nDelta = nNewLabelHeight - nLabelHeight; + Size aNewDlgSize = GetSizePixel(); + aNewDlgSize.Height() += nDelta; + SetSizePixel( aNewDlgSize ); + + Size aNewWarningSize = aFTMasterPasswordWarning.GetSizePixel(); + aNewWarningSize.Height() = nNewLabelHeight; + aFTMasterPasswordWarning.SetPosSizePixel( aFTMasterPasswordWarning.GetPosPixel(), aNewWarningSize ); + + Window* pControls[] = { &aFL, &aOKBtn, &aCancelBtn, &aHelpBtn }; + const sal_Int32 nCCount = sizeof( pControls ) / sizeof( pControls[0] ); + for ( int i = 0; i < nCCount; ++i ) + { + Point aNewPos =(*pControls[i]).GetPosPixel(); + aNewPos.Y() += nDelta; + pControls[i]->SetPosSizePixel( aNewPos, pControls[i]->GetSizePixel() ); + } }; Index: uui/source/masterpasscrtdlg.hrc =================================================================== RCS file: /cvs/ucb/uui/source/masterpasscrtdlg.hrc,v retrieving revision 1.3 diff -u -p -r1.3 masterpasscrtdlg.hrc --- uui/source/masterpasscrtdlg.hrc 10 Apr 2008 16:28:01 -0000 1.3 +++ uui/source/masterpasscrtdlg.hrc 19 Sep 2008 07:40:09 -0000 @@ -36,6 +36,8 @@ #define ED_MASTERPASSWORD_CRT 21 #define FT_MASTERPASSWORD_REPEAT 22 #define ED_MASTERPASSWORD_REPEAT 23 +#define FT_MASTERPASSWORD_WARNING 24 +#define FL_FIXED_LINE 30 #define BTN_MASTERPASSCRT_OK 50 #define BTN_MASTERPASSCRT_CANCEL 51 Index: uui/source/masterpasscrtdlg.hxx =================================================================== RCS file: /cvs/ucb/uui/source/masterpasscrtdlg.hxx,v retrieving revision 1.3 diff -u -p -r1.3 masterpasscrtdlg.hxx --- uui/source/masterpasscrtdlg.hxx 10 Apr 2008 16:28:16 -0000 1.3 +++ uui/source/masterpasscrtdlg.hxx 19 Sep 2008 07:40:09 -0000 @@ -41,6 +41,7 @@ #include #include #include +#include //============================================================================ class MasterPasswordCreateDialog : public ModalDialog @@ -49,6 +50,8 @@ class MasterPasswordCreateDialog : publi Edit aEDMasterPasswordCrt; FixedText aFTMasterPasswordRepeat; Edit aEDMasterPasswordRepeat; + FixedText aFTMasterPasswordWarning; + FixedLine aFL; OKButton aOKBtn; CancelButton aCancelBtn; HelpButton aHelpBtn; Index: uui/source/masterpasscrtdlg.src =================================================================== RCS file: /cvs/ucb/uui/source/masterpasscrtdlg.src,v retrieving revision 1.12 diff -u -p -r1.12 masterpasscrtdlg.src --- uui/source/masterpasscrtdlg.src 10 Apr 2008 16:28:33 -0000 1.12 +++ uui/source/masterpasscrtdlg.src 19 Sep 2008 07:40:09 -0000 @@ -44,51 +44,64 @@ ModalDialog DLG_UUI_MASTERPASSWORD_CRT Moveable = TRUE ; OutputSize = TRUE ; SVLook = TRUE ; - Size = MAP_APPFONT ( 265 , 64 ) ; + Size = MAP_APPFONT ( 175 ,135 ) ; FixedText FT_MASTERPASSWORD_CRT { - Pos = MAP_APPFONT ( 12 , 17 ) ; - Size = MAP_APPFONT ( 71 , 10 ) ; - Text [ en-US ] = "Master password"; + Pos = MAP_APPFONT ( 3 , 4 ) ; + Size = MAP_APPFONT ( 169 , 9 ) ; + Text [ en-US ] = "Enter new password"; }; Edit ED_MASTERPASSWORD_CRT { Border = TRUE ; - Pos = MAP_APPFONT ( 86 , 16 ) ; - Size = MAP_APPFONT ( 94 , 12 ) ; + Pos = MAP_APPFONT ( 3 , 17 ) ; + Size = MAP_APPFONT ( 169 , 13 ) ; PassWord = TRUE ; }; FixedText FT_MASTERPASSWORD_REPEAT { - Pos = MAP_APPFONT ( 12 , 37 ) ; - Size = MAP_APPFONT ( 71 , 10 ) ; - Text [ en-US ] = "~Confirm master password"; + Pos = MAP_APPFONT ( 3 , 33 ) ; + Size = MAP_APPFONT ( 169 , 9 ) ; + Text [ en-US ] = "~Reenter password"; }; Edit ED_MASTERPASSWORD_REPEAT { Border = TRUE ; - Pos = MAP_APPFONT ( 86 , 36 ) ; - Size = MAP_APPFONT ( 94 , 12 ) ; + Pos = MAP_APPFONT ( 3 , 46 ) ; + Size = MAP_APPFONT ( 169 , 13 ) ; PassWord = TRUE ; }; + FixedText FT_MASTERPASSWORD_WARNING + { + Pos = MAP_APPFONT ( 3 , 62 ) ; + Size = MAP_APPFONT ( 169 , 42 ) ; + Text [ en-US ] = "~Caution: Make sure you remember the Master Password you have set. If you forget your Master Password, you will be unable to access any of the information protected by it. Passwords are case-sensitive and at least five characters long."; + WordBreak = TRUE; + }; + FixedLine FL_FIXED_LINE + { + Pos = MAP_APPFONT( 0, 105 ); + Size = MAP_APPFONT( 175, 6 ); + }; + OKButton BTN_MASTERPASSCRT_OK { - Pos = MAP_APPFONT ( 209 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; + Pos = MAP_APPFONT ( 65 , 115 ) ; + Size = MAP_APPFONT ( 51 , 13 ) ; DefButton = TRUE ; }; CancelButton BTN_MASTERPASSCRT_CANCEL { - Pos = MAP_APPFONT ( 209 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; + Pos = MAP_APPFONT ( 120 , 115 ) ; + Size = MAP_APPFONT ( 51 , 13 ) ; }; HelpButton BTN_MASTERPASSCRT_HELP { - Pos = MAP_APPFONT ( 209 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; + Pos = MAP_APPFONT ( 5 , 115 ) ; + Size = MAP_APPFONT ( 51 , 13 ) ; }; - Text [ en-US ] = "Enter Master Password"; + Text [ en-US ] = "Change Master Password"; }; Index: uui/source/masterpassworddlg.cxx =================================================================== RCS file: /cvs/ucb/uui/source/masterpassworddlg.cxx,v retrieving revision 1.5 diff -u -p -r1.5 masterpassworddlg.cxx --- uui/source/masterpassworddlg.cxx 10 Apr 2008 16:28:50 -0000 1.5 +++ uui/source/masterpassworddlg.cxx 19 Sep 2008 07:40:09 -0000 @@ -61,7 +61,8 @@ MasterPasswordDialog::MasterPasswordDial ModalDialog( pParent, ResId( DLG_UUI_MASTERPASSWORD, *pResMgr ) ), aFTMasterPassword ( this, ResId( FT_MASTERPASSWORD, *pResMgr ) ), - aEDMasterPassword ( this, ResId( ED_MASTERPASSWORD, *pResMgr ) ), + aEDMasterPassword ( this, ResId( ED_MASTERPASSWORD, *pResMgr ) ), + aFL ( this, ResId( FL_FIXED_LINE, *pResMgr ) ), aOKBtn ( this, ResId( BTN_MASTERPASSWORD_OK, *pResMgr ) ), aCancelBtn ( this, ResId( BTN_MASTERPASSWORD_CANCEL, *pResMgr ) ), aHelpBtn ( this, ResId( BTN_MASTERPASSWORD_HELP, *pResMgr ) ), Index: uui/source/masterpassworddlg.hrc =================================================================== RCS file: /cvs/ucb/uui/source/masterpassworddlg.hrc,v retrieving revision 1.3 diff -u -p -r1.3 masterpassworddlg.hrc --- uui/source/masterpassworddlg.hrc 10 Apr 2008 16:29:06 -0000 1.3 +++ uui/source/masterpassworddlg.hrc 19 Sep 2008 07:40:09 -0000 @@ -36,6 +36,7 @@ #define ED_MASTERPASSWORD 21 #define FT_MASTERPASSWORD_REPEAT 22 #define ED_MASTERPASSWORD_REPEAT 23 +#define FL_FIXED_LINE 30 #define BTN_MASTERPASSWORD_OK 50 #define BTN_MASTERPASSWORD_CANCEL 51 Index: uui/source/masterpassworddlg.hxx =================================================================== RCS file: /cvs/ucb/uui/source/masterpassworddlg.hxx,v retrieving revision 1.3 diff -u -p -r1.3 masterpassworddlg.hxx --- uui/source/masterpassworddlg.hxx 10 Apr 2008 16:29:21 -0000 1.3 +++ uui/source/masterpassworddlg.hxx 19 Sep 2008 07:40:09 -0000 @@ -47,6 +47,7 @@ class MasterPasswordDialog : public Moda { FixedText aFTMasterPassword; Edit aEDMasterPassword; + FixedLine aFL; OKButton aOKBtn; CancelButton aCancelBtn; HelpButton aHelpBtn; Index: uui/source/masterpassworddlg.src =================================================================== RCS file: /cvs/ucb/uui/source/masterpassworddlg.src,v retrieving revision 1.11 diff -u -p -r1.11 masterpassworddlg.src --- uui/source/masterpassworddlg.src 10 Apr 2008 16:29:38 -0000 1.11 +++ uui/source/masterpassworddlg.src 19 Sep 2008 07:40:09 -0000 @@ -44,36 +44,41 @@ ModalDialog DLG_UUI_MASTERPASSWORD Moveable = TRUE ; OutputSize = TRUE ; SVLook = TRUE ; - Size = MAP_APPFONT ( 265 , 64 ) ; + Size = MAP_APPFONT ( 175 , 66 ) ; FixedText FT_MASTERPASSWORD { - Pos = MAP_APPFONT ( 12 , 27 ) ; - Size = MAP_APPFONT ( 71 , 10 ) ; - Text [ en-US ] = "Master password"; + Pos = MAP_APPFONT ( 3 , 4 ) ; + Size = MAP_APPFONT ( 169 , 9 ) ; + Text [ en-US ] = "Enter password"; }; Edit ED_MASTERPASSWORD { Border = TRUE ; - Pos = MAP_APPFONT ( 86 , 26 ) ; - Size = MAP_APPFONT ( 94 , 12 ) ; + Pos = MAP_APPFONT ( 3 , 17 ) ; + Size = MAP_APPFONT ( 169 , 13 ) ; PassWord = TRUE ; }; + FixedLine FL_FIXED_LINE + { + Pos = MAP_APPFONT( 0, 35 ); + Size = MAP_APPFONT( 175, 6 ); + }; OKButton BTN_MASTERPASSWORD_OK { - Pos = MAP_APPFONT ( 209 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; + Pos = MAP_APPFONT ( 65 , 45 ) ; + Size = MAP_APPFONT ( 51 , 13 ) ; DefButton = TRUE ; }; CancelButton BTN_MASTERPASSWORD_CANCEL { - Pos = MAP_APPFONT ( 209 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; + Pos = MAP_APPFONT ( 120 , 45 ) ; + Size = MAP_APPFONT ( 51 , 13 ) ; }; HelpButton BTN_MASTERPASSWORD_HELP { - Pos = MAP_APPFONT ( 209 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; + Pos = MAP_APPFONT ( 5 , 45 ) ; + Size = MAP_APPFONT ( 51 , 13 ) ; }; Text [ en-US ] = "Enter Master Password"; }; Index: uui/source/passworderrs.src =================================================================== RCS file: /cvs/ucb/uui/source/passworderrs.src,v retrieving revision 1.13 diff -u -p -r1.13 passworderrs.src --- uui/source/passworderrs.src 10 Apr 2008 16:32:59 -0000 1.13 +++ uui/source/passworderrs.src 19 Sep 2008 07:40:09 -0000 @@ -41,12 +41,12 @@ String STR_ERROR_PASSWORD_WRONG String STR_ERROR_MASTERPASSWORD_WRONG { - Text [ en-US ] = "An incorrect master password was entered. Please enter it again."; + Text [ en-US ] = "The wrong Master Password has been entered. %PRODUCTNAME could not access web login information protected by Master Password.\n\nNote: Passwords are case-sensitive and at least five characters long."; }; String STR_ERROR_PASSWORDS_NOT_IDENTICAL { - Text [ en-US ] = "The passwords do not match. Please enter the password again."; + Text [ en-US ] = "The password confirmation does not match."; };