diff options
author | Stephan Bergmann <sb@openoffice.org> | 2000-11-10 09:53:54 +0000 |
---|---|---|
committer | Stephan Bergmann <sb@openoffice.org> | 2000-11-10 09:53:54 +0000 |
commit | 8ce2d3e144e4f4eb5add32ff0400e068456b1a9f (patch) | |
tree | bc0f779b703f756a117155631870e7a31837c2df /uui | |
parent | f69518cc9cfdf2292cd09030896dc58c20c16f6b (diff) |
Fixed previous fix.
Diffstat (limited to 'uui')
-rw-r--r-- | uui/source/iahndl.cxx | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index 2491906093ca..67c5d3e85eb8 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: iahndl.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: sb $ $Date: 2000-11-10 10:13:24 $ + * last change: $Author: sb $ $Date: 2000-11-10 10:53:54 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -190,7 +190,7 @@ public: USHORT executeErrorDialog(ULONG nID, USHORT nMask); //============================================================================ -void executeLoginDialog(LoginErrorInfo & rInfo); +void executeLoginDialog(LoginErrorInfo & rInfo, rtl::OUString const & rRealm); //============================================================================ void executeCookieDialog(CntHTTPCookieRequest & rRequest); @@ -387,13 +387,7 @@ UUIInteractionHandler::handle( LoginErrorInfo aInfo; aInfo.SetTitle(aAuthenticationRequest.ServerName); aInfo.SetServer(aAuthenticationRequest.ServerName); - DBG_ASSERT(!(aAuthenticationRequest.HasRealm - && aAuthenticationRequest.HasAccount), - "UUIInteractionHandler::handle():" - " AuthenticationRequest with both Realm and Account"); - if (aAuthenticationRequest.HasRealm) - aInfo.SetAccount(aAuthenticationRequest.Realm); - else if (aAuthenticationRequest.HasAccount) + if (aAuthenticationRequest.HasAccount) aInfo.SetAccount(aAuthenticationRequest.Account); if (aAuthenticationRequest.HasUserName) aInfo.SetUserName(aAuthenticationRequest.UserName); @@ -402,12 +396,16 @@ UUIInteractionHandler::handle( aInfo.SetErrorText(aAuthenticationRequest.Diagnostic); aInfo.SetPersistentPassword(bRememberPersistent); aInfo.SetSavePassword(bRemember); - aInfo.SetModifyAccount(aAuthenticationRequest.HasRealm - || aAuthenticationRequest.HasAccount); + aInfo.SetModifyAccount(aAuthenticationRequest.HasAccount + && xSupplyAuthentication.is() + && xSupplyAuthentication->canSetAccount()); aInfo.SetModifyUserName(aAuthenticationRequest.HasUserName && xSupplyAuthentication.is() && xSupplyAuthentication->canSetUserName()); - executeLoginDialog(aInfo); + executeLoginDialog(aInfo, + aAuthenticationRequest.HasRealm ? + aAuthenticationRequest.Realm : + rtl::OUString()); switch (aInfo.GetResult()) { case ERRCODE_BUTTON_OK: @@ -870,7 +868,7 @@ USHORT executeErrorDialog(ULONG nID, USHORT nMask) // //============================================================================ -void executeLoginDialog(LoginErrorInfo & rInfo) +void executeLoginDialog(LoginErrorInfo & rInfo, rtl::OUString const & rRealm) { vos::OGuard aGuard(Application::GetSolarMutex()); @@ -888,7 +886,7 @@ void executeLoginDialog(LoginErrorInfo & rInfo) ResMgr * pManager = ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(uui)); LoginDialog * pDialog = new LoginDialog(0, nFlags, rInfo.GetServer(), - rInfo.GetAccount(), pManager); + rRealm, pManager); if (rInfo.GetErrorText().Len() != 0) pDialog->SetErrorText(rInfo.GetErrorText()); pDialog->SetName(rInfo.GetUserName()); |