From b5d20ab00251075c86908a51f9859bd1d42999ea Mon Sep 17 00:00:00 2001 From: "Thomas Lange [tl]" Date: Thu, 10 Jun 2010 16:06:02 +0200 Subject: cws tl78: #i109634# late changes to the new password dialog --- cui/source/dialogs/passwdomdlg.cxx | 12 +++++-- cui/source/dialogs/passwdomdlg.hrc | 13 ++++---- cui/source/dialogs/passwdomdlg.src | 65 ++++++++++++++++++++------------------ 3 files changed, 52 insertions(+), 38 deletions(-) (limited to 'cui') diff --git a/cui/source/dialogs/passwdomdlg.cxx b/cui/source/dialogs/passwdomdlg.cxx index c73770e9a5a5..5b768c756654 100755 --- a/cui/source/dialogs/passwdomdlg.cxx +++ b/cui/source/dialogs/passwdomdlg.cxx @@ -130,6 +130,9 @@ struct PasswordToOpenModifyDialog_Impl String m_aOneMismatch; String m_aTwoMismatch; String m_aInvalidStateForOkButton; + String m_aInvalidStateForOkButton_v2; + + bool m_bIsPasswordToModify; // DECL_LINK( ModifyHdl, Edit * ); @@ -167,7 +170,9 @@ PasswordToOpenModifyDialog_Impl::PasswordToOpenModifyDialog_Impl( // m_aPasswdToModifyMatchFI ( pParent, CUI_RES( FI_PASSWD_TO_MODIFY_MATCH ) ) m_aOneMismatch( CUI_RES( STR_ONE_PASSWORD_MISMATCH ) ), m_aTwoMismatch( CUI_RES( STR_TWO_PASSWORDS_MISMATCH ) ), - m_aInvalidStateForOkButton( CUI_RES( STR_INVALID_STATE_FOR_OK_BUTTON ) ) + m_aInvalidStateForOkButton( CUI_RES( STR_INVALID_STATE_FOR_OK_BUTTON ) ), + m_aInvalidStateForOkButton_v2( CUI_RES( STR_INVALID_STATE_FOR_OK_BUTTON_V2 ) ), + m_bIsPasswordToModify( bIsPasswordToModify ) { /* const sal_Bool bHighContrast = pParent->GetSettings().GetStyleSettings().GetHighContrastMode(); @@ -206,6 +211,8 @@ PasswordToOpenModifyDialog_Impl::PasswordToOpenModifyDialog_Impl( // ModifyHdl( NULL ); m_aMoreFewerOptionsBTN.Enable( bIsPasswordToModify ); + if (!bIsPasswordToModify) + m_aMoreFewerOptionsBTN.Hide( TRUE ); } @@ -246,7 +253,8 @@ IMPL_LINK( PasswordToOpenModifyDialog_Impl, OkBtnClickHdl, OKButton *, EMPTYARG m_aPasswdToModifyED.GetText().Len() == 0; if (bInvalidState) { - ErrorBox aErrorBox( m_pParent, WB_OK, m_aInvalidStateForOkButton ); + ErrorBox aErrorBox( m_pParent, WB_OK, + m_bIsPasswordToModify? m_aInvalidStateForOkButton : m_aInvalidStateForOkButton_v2 ); aErrorBox.Execute(); } else // check for mismatched passwords... diff --git a/cui/source/dialogs/passwdomdlg.hrc b/cui/source/dialogs/passwdomdlg.hrc index f8229711e2c9..522e4edf1da2 100755 --- a/cui/source/dialogs/passwdomdlg.hrc +++ b/cui/source/dialogs/passwdomdlg.hrc @@ -49,12 +49,13 @@ #define FI_PASSWD_TO_MODIFY_MATCH 28 #define CB_OPEN_READONLY 29 -#define STR_MORE_OPTIONS 51 -#define STR_FEWER_OPTIONS 52 -#define STR_PASSWD_MUST_BE_CONFIRMED 53 -#define STR_ONE_PASSWORD_MISMATCH 54 -#define STR_TWO_PASSWORDS_MISMATCH 55 -#define STR_INVALID_STATE_FOR_OK_BUTTON 56 +#define STR_MORE_OPTIONS 51 +#define STR_FEWER_OPTIONS 52 +#define STR_PASSWD_MUST_BE_CONFIRMED 53 +#define STR_ONE_PASSWORD_MISMATCH 54 +#define STR_TWO_PASSWORDS_MISMATCH 55 +#define STR_INVALID_STATE_FOR_OK_BUTTON 56 +#define STR_INVALID_STATE_FOR_OK_BUTTON_V2 57 #endif diff --git a/cui/source/dialogs/passwdomdlg.src b/cui/source/dialogs/passwdomdlg.src index a2c522083891..0f325b6b733e 100755 --- a/cui/source/dialogs/passwdomdlg.src +++ b/cui/source/dialogs/passwdomdlg.src @@ -32,7 +32,7 @@ ModalDialog RID_DLG_PASSWORD_TO_OPEN_MODIFY { - Size = MAP_APPFONT( 171, 150 ); + Size = MAP_APPFONT( 200, 155 ); Text [ en-US ] = "Set Password"; // HelpId = HID_DLG_PASSWORD_TO_OPEN_MODIFY; Border = TRUE ; @@ -43,14 +43,14 @@ ModalDialog RID_DLG_PASSWORD_TO_OPEN_MODIFY FixedLine FL_FILE_ENCRYPTION { Pos = MAP_APPFONT( 3, 3 ); - Size = MAP_APPFONT( 165, 8 ); + Size = MAP_APPFONT( 194, 8 ); Text [ en-US ] = "File encryption password"; }; FixedText FT_PASSWD_TO_OPEN { Pos = MAP_APPFONT( 6, 17 ); - Size = MAP_APPFONT( 159, 8 ); + Size = MAP_APPFONT( 188, 8 ); Text [ en-US ] = "~Enter password to open"; WordBreak = TRUE; }; @@ -58,7 +58,7 @@ ModalDialog RID_DLG_PASSWORD_TO_OPEN_MODIFY Edit ED_PASSWD_TO_OPEN { Pos = MAP_APPFONT( 6, 28 ); - Size = MAP_APPFONT( 159, 12 ); + Size = MAP_APPFONT( 188, 12 ); Border = TRUE ; PassWord = TRUE ; }; @@ -66,7 +66,7 @@ ModalDialog RID_DLG_PASSWORD_TO_OPEN_MODIFY FixedText FT_REENTER_PASSWD_TO_OPEN { Pos = MAP_APPFONT( 6, 45 ); - Size = MAP_APPFONT( 159, 8 ); + Size = MAP_APPFONT( 188, 8 ); Text [ en-US ] = "Confirm password"; WordBreak = TRUE; }; @@ -74,7 +74,7 @@ ModalDialog RID_DLG_PASSWORD_TO_OPEN_MODIFY Edit ED_REENTER_PASSWD_TO_OPEN { Pos = MAP_APPFONT( 6, 56 ); - Size = MAP_APPFONT( 159, 12 ); + Size = MAP_APPFONT( 188, 12 ); Border = TRUE ; PassWord = TRUE ; }; @@ -87,8 +87,8 @@ ModalDialog RID_DLG_PASSWORD_TO_OPEN_MODIFY */ FixedText FT_PASSWD_NOTE { - Pos = MAP_APPFONT( 6, 80 ); - Size = MAP_APPFONT( 159, 4*8 ); // some extra space for translation in other languages + Pos = MAP_APPFONT( 6, 74 ); + Size = MAP_APPFONT( 188, 5*8 ); // some extra space for translation in other languages Text [ en-US ] = "Note: After a password has been set, the document will only open with "\ "the password. Should you lose the password, there will be no way to "\ "recover the document. Please also note that this password is case-sensitive."; @@ -97,75 +97,75 @@ ModalDialog RID_DLG_PASSWORD_TO_OPEN_MODIFY FixedLine FL_BUTTONS { - Pos = MAP_APPFONT( 0, 117 ); - Size = MAP_APPFONT( 171, 8 ); + Pos = MAP_APPFONT( 0, 125 ); + Size = MAP_APPFONT( 200, 8 ); }; MoreButton BTN_MORE_FEWER_OPTIONS { - Pos = MAP_APPFONT( 6 , 130 ) ; - Size = MAP_APPFONT( 50 , 14 ) ; - Delta = 92 ; - MapUnit = MAP_APPFONT ; - State = FALSE ; + Pos = MAP_APPFONT( 6 , 136 ); + Size = MAP_APPFONT( 50 , 14 ); + Delta = 90; + MapUnit = MAP_APPFONT; + State = FALSE; }; OKButton BTN_OK { - Pos = MAP_APPFONT( 62, 130 ); + Pos = MAP_APPFONT( 88, 136 ); Size = MAP_APPFONT( 50, 14 ); DefButton = TRUE ; }; CancelButton BTN_CANCEL { - Pos = MAP_APPFONT( 115, 130 ); + Pos = MAP_APPFONT( 144, 136 ); Size = MAP_APPFONT( 50, 14 ); }; FixedLine FL_FILE_SHARING_OPTIONS { - Pos = MAP_APPFONT( 3, 154 ); - Size = MAP_APPFONT( 165, 8 ); + Pos = MAP_APPFONT( 3, 153 ); + Size = MAP_APPFONT( 194, 8 ); Text [ en-US ] = "File sharing password"; }; CheckBox CB_OPEN_READONLY { - Pos = MAP_APPFONT( 6, 170 ); - Size = MAP_APPFONT( 159, 8 ); + Pos = MAP_APPFONT( 6, 169 ); + Size = MAP_APPFONT( 188, 8 ); Text [ en-US ] = "Open file read-only"; }; FixedText FT_PASSWD_TO_MODIFY { - Pos = MAP_APPFONT( 6, 186 ); - Size = MAP_APPFONT( 159, 8 ); + Pos = MAP_APPFONT( 6, 187 ); + Size = MAP_APPFONT( 188, 8 ); Text [ en-US ] = "Enter password to allow editing"; WordBreak = TRUE; }; Edit ED_PASSWD_TO_MODIFY { - Pos = MAP_APPFONT( 6, 196 ); - Size = MAP_APPFONT( 159, 12 ); + Pos = MAP_APPFONT( 6, 197 ); + Size = MAP_APPFONT( 188, 12 ); Border = TRUE ; PassWord = TRUE ; }; FixedText FT_REENTER_PASSWD_TO_MODIFY { - Pos = MAP_APPFONT( 6, 214 ); - Size = MAP_APPFONT( 159, 8 ); + Pos = MAP_APPFONT( 6, 215 ); + Size = MAP_APPFONT( 188, 8 ); Text [ en-US ] = "Confirm password"; WordBreak = TRUE; }; Edit ED_REENTER_PASSWD_TO_MODIFY { - Pos = MAP_APPFONT( 6, 224 ); - Size = MAP_APPFONT( 159, 12 ); + Pos = MAP_APPFONT( 6, 225 ); + Size = MAP_APPFONT( 188, 12 ); Border = TRUE ; PassWord = TRUE ; }; @@ -204,7 +204,12 @@ ModalDialog RID_DLG_PASSWORD_TO_OPEN_MODIFY String STR_INVALID_STATE_FOR_OK_BUTTON { - Text [ en-US ] = "Please enter a password to open or to modify, or check the open read-only option to continue." ; + Text [ en-US ] = "Please enter a password." ; + }; + + String STR_INVALID_STATE_FOR_OK_BUTTON_V2 + { + Text [ en-US ] = "Please enter a password for file encryption." ; }; /* Image IMG_PASSWD_MATCH -- cgit v1.2.3