summaryrefslogtreecommitdiff
path: root/uui/source/passworddlg.cxx
diff options
context:
space:
mode:
authorThomas Lange [tl] <tl@openoffice.org>2010-08-05 17:16:04 +0200
committerThomas Lange [tl] <tl@openoffice.org>2010-08-05 17:16:04 +0200
commit3334ab4ddcc2e96e738034fcc07d319a74ac7a8d (patch)
tree2630e9571d8c94f10700c68c04b4ce25035ac8d3 /uui/source/passworddlg.cxx
parentc1419160f52222a3ed85c4a309df2ab10fceb2ed (diff)
parent0e6f37318dd855bd04e3281435d1af751398c98f (diff)
cws tl82: merge with DEV300_m86
Diffstat (limited to 'uui/source/passworddlg.cxx')
-rw-r--r--uui/source/passworddlg.cxx30
1 files changed, 17 insertions, 13 deletions
diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx
index 4962563601c3..c89184f54bc1 100644
--- a/uui/source/passworddlg.cxx
+++ b/uui/source/passworddlg.cxx
@@ -48,30 +48,34 @@ IMPL_LINK( PasswordDialog, OKHdl_Impl, OKButton *, EMPTYARG )
// -----------------------------------------------------------------------
-PasswordDialog::PasswordDialog
-(
+PasswordDialog::PasswordDialog(
Window* _pParent,
::com::sun::star::task::PasswordRequestMode nDlgMode,
ResMgr * pResMgr,
- rtl::OUString& aDocURL
- )
+ rtl::OUString& aDocURL,
+ bool bOpenToModify )
+
:ModalDialog( _pParent, ResId( DLG_UUI_PASSWORD, *pResMgr ) )
- ,aFTPassword ( this, ResId( FT_PASSWORD, *pResMgr ) )
- ,aEDPassword ( this, ResId( ED_PASSWORD, *pResMgr ) )
- ,aOKBtn ( this, ResId( BTN_PASSWORD_OK, *pResMgr ) )
- ,aCancelBtn ( this, ResId( BTN_PASSWORD_CANCEL, *pResMgr ) )
- ,aHelpBtn ( this, ResId( BTN_PASSWORD_HELP, *pResMgr ) )
- ,aFixedLine1 ( this, ResId( FL_FIXED_LINE_1, *pResMgr ) )
- ,nDialogMode ( nDlgMode )
- ,pResourceMgr ( pResMgr )
+ ,aFTPassword( this, ResId( FT_PASSWORD, *pResMgr ))
+ ,aEDPassword( this, ResId( ED_PASSWORD, *pResMgr ))
+ ,aOKBtn ( this, ResId( BTN_PASSWORD_OK, *pResMgr ))
+ ,aCancelBtn ( this, ResId( BTN_PASSWORD_CANCEL, *pResMgr ))
+ ,aHelpBtn ( this, ResId( BTN_PASSWORD_HELP, *pResMgr ))
+ ,aFixedLine1( this, ResId( FL_FIXED_LINE_1, *pResMgr ))
+ ,nDialogMode( nDlgMode )
+ ,pResourceMgr ( pResMgr )
{
if( nDialogMode == ::com::sun::star::task::PasswordRequestMode_PASSWORD_REENTER )
{
- String aErrorMsg( ResId( STR_ERROR_PASSWORD_WRONG, *pResourceMgr ));
+ USHORT nErrStrId = bOpenToModify ? STR_ERROR_PASSWORD_TO_MODIFY_WRONG : STR_ERROR_PASSWORD_TO_OPEN_WRONG;
+ String aErrorMsg( ResId( nErrStrId, *pResourceMgr ));
ErrorBox aErrorBox( _pParent, WB_OK, aErrorMsg );
aErrorBox.Execute();
}
+ USHORT nStrId = bOpenToModify ? STR_ENTER_PASSWORD_TO_MODIFY : STR_ENTER_PASSWORD_TO_OPEN;
+ aFTPassword.SetText( String( ResId( nStrId, *pResourceMgr ) ) );
+
FreeResource();
aFTPassword.SetText( aFTPassword.GetText() + aDocURL );