diff options
author | Mathias Bauer <mba@openoffice.org> | 2010-07-13 14:38:37 +0200 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2010-07-13 14:38:37 +0200 |
commit | 8eea0b1b4ba5f07a89fb2bacb39f1c8d9c3039e6 (patch) | |
tree | 874f33673af3b17a40de1980f31ead2c8272a155 /uui | |
parent | f24b1da07ebfbc95e76af93fc9c7133f7d52daa5 (diff) | |
parent | a2e7c2e0d002d75a6b77a629a4e904ab54bf8375 (diff) |
CWS changehid: resync to m84
Diffstat (limited to 'uui')
-rw-r--r-- | uui/prj/build.lst | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | uui/source/iahndl-authentication.cxx | 389 | ||||
-rw-r--r-- | uui/source/iahndl-errorhandler.cxx | 2 | ||||
-rw-r--r-- | uui/source/iahndl.cxx | 24 | ||||
-rw-r--r-- | uui/source/iahndl.hxx | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | uui/source/ids.hrc | 243 | ||||
-rwxr-xr-x[-rw-r--r--] | uui/source/logindlg.cxx | 164 | ||||
-rwxr-xr-x[-rw-r--r--] | uui/source/logindlg.hrc | 30 | ||||
-rwxr-xr-x[-rw-r--r--] | uui/source/logindlg.hxx | 50 | ||||
-rwxr-xr-x[-rw-r--r--] | uui/source/logindlg.src | 188 | ||||
-rwxr-xr-x[-rw-r--r--] | uui/source/loginerr.hxx | 141 | ||||
-rw-r--r-- | uui/source/passwordcontainer.cxx | 13 | ||||
-rwxr-xr-x[-rw-r--r--] | uui/source/passworddlg.cxx | 30 | ||||
-rwxr-xr-x[-rw-r--r--] | uui/source/passworddlg.hxx | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | uui/source/passworddlg.src | 28 | ||||
-rwxr-xr-x[-rw-r--r--] | uui/source/passworderrs.src | 9 |
16 files changed, 759 insertions, 559 deletions
diff --git a/uui/prj/build.lst b/uui/prj/build.lst index 0ebacfcb814f..dbe31cb1b57e 100644 --- a/uui/prj/build.lst +++ b/uui/prj/build.lst @@ -1,4 +1,4 @@ -uu uui : l10n svtools NULL +uu uui : l10n vcl svtools NULL uu uui usr1 - all uu_mkout NULL uu uui\source nmake - all uu_source NULL uu uui\util nmake - all uu_util uu_source NULL diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx index f31397f1ef92..73fa61f31ff4 100644..100755 --- a/uui/source/iahndl-authentication.cxx +++ b/uui/source/iahndl-authentication.cxx @@ -26,18 +26,23 @@ ************************************************************************/ #include "com/sun/star/task/DocumentPasswordRequest.hpp" +#include "com/sun/star/task/DocumentPasswordRequest2.hpp" #include "com/sun/star/task/DocumentMSPasswordRequest.hpp" +#include "com/sun/star/task/DocumentMSPasswordRequest2.hpp" #include "com/sun/star/task/MasterPasswordRequest.hpp" #include "com/sun/star/task/XInteractionAbort.hpp" #include "com/sun/star/task/XInteractionPassword.hpp" +#include "com/sun/star/task/XInteractionPassword2.hpp" #include "com/sun/star/task/XInteractionRetry.hpp" #include "com/sun/star/ucb/XInteractionSupplyAuthentication2.hpp" #include "com/sun/star/ucb/URLAuthenticationRequest.hpp" +#include "osl/diagnose.h" #include "rtl/digest.h" #include "vos/mutex.hxx" #include "tools/errcode.hxx" #include "vcl/msgbox.hxx" +#include "vcl/abstdlg.hxx" #include "vcl/svapp.hxx" #include "ids.hrc" @@ -67,10 +72,8 @@ executeLoginDialog( { vos::OGuard aGuard(Application::GetSolarMutex()); - bool bAccount = (rInfo.GetFlags() & LOGINERROR_FLAG_MODIFY_ACCOUNT) - != 0; - bool bSavePassword = rInfo.GetIsPersistentPassword() - || rInfo.GetIsSavePassword(); + bool bAccount = (rInfo.GetFlags() & LOGINERROR_FLAG_MODIFY_ACCOUNT) != 0; + bool bSavePassword = rInfo.GetCanRememberPassword(); bool bCanUseSysCreds = rInfo.GetCanUseSystemCredentials(); sal_uInt16 nFlags = 0; @@ -89,15 +92,10 @@ executeLoginDialog( if (!bCanUseSysCreds) nFlags |= LF_NO_USESYSCREDS; - std::auto_ptr< ResMgr > xManager( - ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(uui))); + std::auto_ptr< ResMgr > xManager( ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(uui))); UniString aRealm(rRealm); std::auto_ptr< LoginDialog > xDialog( - new LoginDialog(pParent, - nFlags, - rInfo.GetServer(), - &aRealm, - xManager.get())); + new LoginDialog( pParent, nFlags, rInfo.GetServer(), &aRealm, xManager.get())); if (rInfo.GetErrorText().Len() != 0) xDialog->SetErrorText(rInfo.GetErrorText()); xDialog->SetName(rInfo.GetUserName()); @@ -109,24 +107,24 @@ executeLoginDialog( if (bSavePassword) { - xDialog-> - SetSavePasswordText(ResId(rInfo.GetIsPersistentPassword() ? - RID_SAVE_PASSWORD : - RID_KEEP_PASSWORD, - *xManager.get())); - xDialog->SetSavePassword(rInfo.GetIsSavePassword()); + xDialog->SetSavePasswordText( + ResId(rInfo.GetIsRememberPersistent() + ? RID_SAVE_PASSWORD + : RID_KEEP_PASSWORD, + *xManager.get())); + + xDialog->SetSavePassword(rInfo.GetIsRememberPassword()); } if ( bCanUseSysCreds ) - xDialog->SetUseSystemCredentials( - rInfo.GetIsUseSystemCredentials() ); + xDialog->SetUseSystemCredentials( rInfo.GetIsUseSystemCredentials() ); rInfo.SetResult(xDialog->Execute() == RET_OK ? ERRCODE_BUTTON_OK : ERRCODE_BUTTON_CANCEL); rInfo.SetUserName(xDialog->GetName()); rInfo.SetPassword(xDialog->GetPassword()); rInfo.SetAccount(xDialog->GetAccount()); - rInfo.SetSavePassword(xDialog->IsSavePassword()); + rInfo.SetIsRememberPassword(xDialog->IsSavePassword()); if ( bCanUseSysCreds ) rInfo.SetIsUseSystemCredentials( xDialog->IsUseSystemCredentials() ); @@ -139,6 +137,60 @@ executeLoginDialog( } } +void getRememberModes( + uno::Sequence< ucb::RememberAuthentication > const & rRememberModes, + ucb::RememberAuthentication & rPreferredMode, + ucb::RememberAuthentication & rAlternateMode ) +{ + sal_Int32 nCount = rRememberModes.getLength(); + OSL_ENSURE( (nCount > 0) && (nCount < 4), + "ucb::RememberAuthentication sequence size mismatch!" ); + if ( nCount == 1 ) + { + rPreferredMode = rAlternateMode = rRememberModes[ 0 ]; + return; + } + else + { + //bool bHasRememberModeNo = false; + bool bHasRememberModeSession = false; + bool bHasRememberModePersistent = false; + + for (sal_Int32 i = 0; i < nCount; ++i) + { + switch ( rRememberModes[i] ) + { + case ucb::RememberAuthentication_NO: + //bHasRememberModeNo = true; + break; + case ucb::RememberAuthentication_SESSION: + bHasRememberModeSession = true; + break; + case ucb::RememberAuthentication_PERSISTENT: + bHasRememberModePersistent = true; + break; + default: + OSL_TRACE( "Unsupported RememberAuthentication value" ); + break; + } + } + + if (bHasRememberModePersistent) + { + rPreferredMode = ucb::RememberAuthentication_PERSISTENT; + if (bHasRememberModeSession) + rAlternateMode = ucb::RememberAuthentication_SESSION; + else + rAlternateMode = ucb::RememberAuthentication_NO; + } + else + { + rPreferredMode = ucb::RememberAuthentication_SESSION; + rAlternateMode = ucb::RememberAuthentication_NO; + } + } +} + void handleAuthenticationRequest_( Window * pParent, @@ -161,7 +213,7 @@ handleAuthenticationRequest_( xSupplyAuthentication2.set(xSupplyAuthentication, uno::UNO_QUERY); ////////////////////////// - // First, try to obatin credentials from password container service. + // First, try to obtain credentials from password container service. uui::PasswordContainerHelper aPwContainerHelper(xServiceFactory); if (aPwContainerHelper.handleAuthenticationRequest(rRequest, xSupplyAuthentication, @@ -174,26 +226,20 @@ handleAuthenticationRequest_( ////////////////////////// // Second, try to obtain credentials from user via password dialog. - bool bRemember; - bool bRememberPersistent; + ucb::RememberAuthentication eDefaultRememberMode + = ucb::RememberAuthentication_SESSION; + ucb::RememberAuthentication ePreferredRememberMode + = eDefaultRememberMode; + ucb::RememberAuthentication eAlternateRememberMode + = ucb::RememberAuthentication_NO; + if (xSupplyAuthentication.is()) { - ucb::RememberAuthentication eDefault; - uno::Sequence< ucb::RememberAuthentication > - aModes(xSupplyAuthentication->getRememberPasswordModes(eDefault)); - bRemember = eDefault != ucb::RememberAuthentication_NO; - bRememberPersistent = false; - for (sal_Int32 i = 0; i < aModes.getLength(); ++i) - if (aModes[i] == ucb::RememberAuthentication_PERSISTENT) - { - bRememberPersistent = true; - break; - } - } - else - { - bRemember = false; - bRememberPersistent = false; + getRememberModes( + xSupplyAuthentication->getRememberPasswordModes( + eDefaultRememberMode), + ePreferredRememberMode, + eAlternateRememberMode); } sal_Bool bCanUseSystemCredentials; @@ -220,8 +266,14 @@ handleAuthenticationRequest_( if (rRequest.HasPassword) aInfo.SetPassword(rRequest.Password); aInfo.SetErrorText(rRequest.Diagnostic); - aInfo.SetPersistentPassword(bRememberPersistent); - aInfo.SetSavePassword(bRemember); + + aInfo.SetCanRememberPassword( + ePreferredRememberMode != eAlternateRememberMode); + aInfo.SetIsRememberPassword( + eDefaultRememberMode != ucb::RememberAuthentication_NO); + aInfo.SetIsRememberPersistent( + ePreferredRememberMode == ucb::RememberAuthentication_PERSISTENT); + aInfo.SetCanUseSystemCredentials(bCanUseSystemCredentials); aInfo.SetIsUseSystemCredentials( bDefaultUseSystemCredentials ); aInfo.SetModifyAccount(rRequest.HasAccount @@ -242,13 +294,24 @@ handleAuthenticationRequest_( xSupplyAuthentication->setUserName(aInfo.GetUserName()); if (xSupplyAuthentication->canSetPassword()) xSupplyAuthentication->setPassword(aInfo.GetPassword()); - xSupplyAuthentication-> - setRememberPassword( - aInfo.GetIsSavePassword() ? - bRememberPersistent ? - ucb::RememberAuthentication_PERSISTENT : - ucb::RememberAuthentication_SESSION : - ucb::RememberAuthentication_NO); + + if (ePreferredRememberMode != eAlternateRememberMode) + { + // user had te choice. + if (aInfo.GetIsRememberPassword()) + xSupplyAuthentication->setRememberPassword( + ePreferredRememberMode); + else + xSupplyAuthentication->setRememberPassword( + eAlternateRememberMode); + } + else + { + // user had no choice. + xSupplyAuthentication->setRememberPassword( + ePreferredRememberMode); + } + if (rRequest.HasRealm) { if (xSupplyAuthentication->canSetRealm()) @@ -267,38 +330,76 @@ handleAuthenticationRequest_( ////////////////////////// // Third, store credentials in password container. - if ( aInfo.GetIsUseSystemCredentials() ) - { - if (aInfo.GetIsSavePassword()) - { - aPwContainerHelper.addRecord( - rURL.getLength() ? rURL : rRequest.ServerName, - rtl::OUString(), // empty u/p -> sys creds - uno::Sequence< rtl::OUString >(), - xIH, - bRememberPersistent); - } - } - // Empty user name can not be valid: - else if (aInfo.GetUserName().Len() != 0) - { - if (aInfo.GetIsSavePassword()) - { - uno::Sequence< rtl::OUString > - aPassList(aInfo.GetAccount().Len() == 0 ? 1 : 2); - aPassList[0] = aInfo.GetPassword(); - if (aInfo.GetAccount().Len() != 0) - aPassList[1] = aInfo.GetAccount(); - - aPwContainerHelper.addRecord( - rURL.getLength() ? rURL : rRequest.ServerName, - aInfo.GetUserName(), - aPassList, - xIH, - bRememberPersistent); - } - } - break; + if ( aInfo.GetIsUseSystemCredentials() ) + { + if (aInfo.GetIsRememberPassword()) + { + if (!aPwContainerHelper.addRecord( + rURL.getLength() ? rURL : rRequest.ServerName, + rtl::OUString(), // empty u/p -> sys creds + uno::Sequence< rtl::OUString >(), + xIH, + ePreferredRememberMode + == ucb::RememberAuthentication_PERSISTENT)) + { + xSupplyAuthentication->setRememberPassword( + ucb::RememberAuthentication_NO); + } + } + else if (eAlternateRememberMode + == ucb::RememberAuthentication_SESSION) + { + if (!aPwContainerHelper.addRecord( + rURL.getLength() ? rURL : rRequest.ServerName, + rtl::OUString(), // empty u/p -> sys creds + uno::Sequence< rtl::OUString >(), + xIH, + false /* SESSION */)) + { + xSupplyAuthentication->setRememberPassword( + ucb::RememberAuthentication_NO); + } + } + } + // Empty user name can not be valid: + else if (aInfo.GetUserName().Len() != 0) + { + uno::Sequence< rtl::OUString > + aPassList(aInfo.GetAccount().Len() == 0 ? 1 : 2); + aPassList[0] = aInfo.GetPassword(); + if (aInfo.GetAccount().Len() != 0) + aPassList[1] = aInfo.GetAccount(); + + if (aInfo.GetIsRememberPassword()) + { + if (!aPwContainerHelper.addRecord( + rURL.getLength() ? rURL : rRequest.ServerName, + aInfo.GetUserName(), + aPassList, + xIH, + ePreferredRememberMode + == ucb::RememberAuthentication_PERSISTENT)) + { + xSupplyAuthentication->setRememberPassword( + ucb::RememberAuthentication_NO); + } + } + else if (eAlternateRememberMode + == ucb::RememberAuthentication_SESSION) + { + if (!aPwContainerHelper.addRecord( + rURL.getLength() ? rURL : rRequest.ServerName, + aInfo.GetUserName(), + aPassList, + xIH, + false /* SESSION */)) + { + xSupplyAuthentication->setRememberPassword( + ucb::RememberAuthentication_NO); + } + } + } + break; case ERRCODE_BUTTON_RETRY: if (xRetry.is()) @@ -418,7 +519,8 @@ executePasswordDialog( LoginErrorInfo & rInfo, task::PasswordRequestMode nMode, ::rtl::OUString aDocName, - bool bMSCryptoMode) + bool bMSCryptoMode, + bool bIsPasswordToModify ) SAL_THROW((uno::RuntimeException)) { try @@ -429,23 +531,25 @@ executePasswordDialog( ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(uui))); if( nMode == task::PasswordRequestMode_PASSWORD_CREATE ) { - std::auto_ptr< PasswordCreateDialog > xDialog( - new PasswordCreateDialog(pParent, - xManager.get(), - bMSCryptoMode)); + const sal_uInt16 nMaxPasswdLen = bMSCryptoMode ? 15 : 0; // 0 -> allow any length - rInfo.SetResult(xDialog->Execute() - == RET_OK ? ERRCODE_BUTTON_OK : ERRCODE_BUTTON_CANCEL); - rInfo.SetPassword( xDialog->GetPassword() ); + VclAbstractDialogFactory * pFact = VclAbstractDialogFactory::Create(); + AbstractPasswordToOpenModifyDialog *pTmp = pFact->CreatePasswordToOpenModifyDialog( pParent, 0, nMaxPasswdLen, bIsPasswordToModify ); + std::auto_ptr< AbstractPasswordToOpenModifyDialog > pDialog( pTmp ); + + rInfo.SetResult( pDialog->Execute() == RET_OK ? ERRCODE_BUTTON_OK : ERRCODE_BUTTON_CANCEL ); + rInfo.SetPassword( pDialog->GetPasswordToOpen() ); + rInfo.SetPasswordToModify( pDialog->GetPasswordToModify() ); + rInfo.SetRecommendToOpenReadonly( pDialog->IsRecommendToOpenReadonly() ); } else { - std::auto_ptr< PasswordDialog > xDialog( - new PasswordDialog(pParent, nMode, xManager.get(), aDocName)); + std::auto_ptr< PasswordDialog > pDialog( + new PasswordDialog( pParent, nMode, xManager.get(), aDocName, bIsPasswordToModify ) ); - rInfo.SetResult(xDialog->Execute() - == RET_OK ? ERRCODE_BUTTON_OK : ERRCODE_BUTTON_CANCEL); - rInfo.SetPassword( xDialog->GetPassword() ); + rInfo.SetResult( pDialog->Execute() == RET_OK ? ERRCODE_BUTTON_OK : ERRCODE_BUTTON_CANCEL ); + rInfo.SetPassword( bIsPasswordToModify ? String() : pDialog->GetPassword() ); + rInfo.SetPasswordToModify( bIsPasswordToModify ? pDialog->GetPassword() : String() ); } } catch (std::bad_alloc const &) @@ -463,26 +567,36 @@ handlePasswordRequest_( uno::Sequence< uno::Reference< task::XInteractionContinuation > > const & rContinuations, ::rtl::OUString aDocumentName, - bool bMSCryptoMode ) + bool bMSCryptoMode, + bool bIsPasswordToModify ) SAL_THROW((uno::RuntimeException)) { uno::Reference< task::XInteractionRetry > xRetry; uno::Reference< task::XInteractionAbort > xAbort; uno::Reference< task::XInteractionPassword > xPassword; - getContinuations(rContinuations, &xRetry, &xAbort, &xPassword); + uno::Reference< task::XInteractionPassword2 > xPassword2; + getContinuations(rContinuations, &xRetry, &xAbort, &xPassword2, &xPassword); + + if ( xPassword2.is() && !xPassword.is() ) + xPassword.set( xPassword2, uno::UNO_QUERY_THROW ); + LoginErrorInfo aInfo; - executePasswordDialog(pParent, - aInfo, - nMode, - aDocumentName, - bMSCryptoMode); + executePasswordDialog( pParent, aInfo, nMode, + aDocumentName, bMSCryptoMode, bIsPasswordToModify ); switch (aInfo.GetResult()) { case ERRCODE_BUTTON_OK: + OSL_ENSURE( !bIsPasswordToModify || xPassword2.is(), "PasswordToModify is requested, but there is no Interaction!" ); if (xPassword.is()) { + if (xPassword2.is()) + { + xPassword2->setPasswordToModify( aInfo.GetPasswordToModify() ); + xPassword2->setRecommendReadOnly( aInfo.IsRecommendToOpenReadonly() ); + } + xPassword->setPassword(aInfo.GetPassword()); xPassword->select(); } @@ -558,28 +672,81 @@ UUIInteractionHelper::handlePasswordRequest( uno::Reference< task::XInteractionRequest > const & rRequest) SAL_THROW((uno::RuntimeException)) { + // parameters to be filled for the call to handlePasswordRequest_ + Window * pParent = getParentProperty(); + task::PasswordRequestMode nMode = task::PasswordRequestMode_PASSWORD_ENTER; + uno::Sequence< uno::Reference< task::XInteractionContinuation > > const & rContinuations = rRequest->getContinuations(); + ::rtl::OUString aDocumentName; + bool bMSCryptoMode = false; + bool bIsPasswordToModify = false; + + bool bDoHandleRequest = false; + uno::Any aAnyRequest(rRequest->getRequest()); + task::DocumentPasswordRequest2 aDocumentPasswordRequest2; + if (!bDoHandleRequest && (aAnyRequest >>= aDocumentPasswordRequest2)) + { + nMode = aDocumentPasswordRequest2.Mode; + aDocumentName = aDocumentPasswordRequest2.Name; + OSL_ENSURE( bMSCryptoMode == false, "bMSCryptoMode should be false" ); + bIsPasswordToModify = aDocumentPasswordRequest2.IsRequestPasswordToModify; + + bDoHandleRequest = true; + } + task::DocumentPasswordRequest aDocumentPasswordRequest; - if (aAnyRequest >>= aDocumentPasswordRequest) + if (!bDoHandleRequest && (aAnyRequest >>= aDocumentPasswordRequest)) { - handlePasswordRequest_(getParentProperty(), - aDocumentPasswordRequest.Mode, - rRequest->getContinuations(), - aDocumentPasswordRequest.Name, - false /* bool bMSCryptoMode */); - return true; + nMode = aDocumentPasswordRequest.Mode; + aDocumentName = aDocumentPasswordRequest.Name; + OSL_ENSURE( bMSCryptoMode == false, "bMSCryptoMode should be false" ); + OSL_ENSURE( bIsPasswordToModify == false, "bIsPasswordToModify should be false" ); + + bDoHandleRequest = true; + } + + task::DocumentMSPasswordRequest2 aDocumentMSPasswordRequest2; + if (!bDoHandleRequest && (aAnyRequest >>= aDocumentMSPasswordRequest2)) + { + nMode = aDocumentMSPasswordRequest2.Mode; + aDocumentName = aDocumentMSPasswordRequest2.Name; + bMSCryptoMode = true; + bIsPasswordToModify = aDocumentMSPasswordRequest2.IsRequestPasswordToModify; + + bDoHandleRequest = true; } task::DocumentMSPasswordRequest aDocumentMSPasswordRequest; - if (aAnyRequest >>= aDocumentMSPasswordRequest) + if (!bDoHandleRequest && (aAnyRequest >>= aDocumentMSPasswordRequest)) + { + nMode = aDocumentMSPasswordRequest.Mode; + aDocumentName = aDocumentMSPasswordRequest.Name; + bMSCryptoMode = true; + OSL_ENSURE( bIsPasswordToModify == false, "bIsPasswordToModify should be false" ); + + bDoHandleRequest = true; + } + + if (bDoHandleRequest) + { + handlePasswordRequest_( pParent, nMode, rContinuations, + aDocumentName, bMSCryptoMode, bIsPasswordToModify ); + return true; + } + + task::PasswordRequest aPasswordRequest; + if( aAnyRequest >>= aPasswordRequest ) { handlePasswordRequest_(getParentProperty(), - aDocumentMSPasswordRequest.Mode, + aPasswordRequest.Mode, rRequest->getContinuations(), - aDocumentMSPasswordRequest.Name, - true /* bool bMSCryptoMode */); + rtl::OUString(), + false /* bool bMSCryptoMode */, + false /* bool bIsPasswordToModify */); return true; } + return false; } + diff --git a/uui/source/iahndl-errorhandler.cxx b/uui/source/iahndl-errorhandler.cxx index d37376abdd00..3176171c4865 100644 --- a/uui/source/iahndl-errorhandler.cxx +++ b/uui/source/iahndl-errorhandler.cxx @@ -37,7 +37,7 @@ #include "com/sun/star/task/XInteractionRetry.hpp" #include "tools/errinf.hxx" // ErrorHandler, ErrorContext, ... -#include "svl/svtools.hrc" // RID_ERRHDL +#include "svtools/svtools.hrc" // RID_ERRHDL #include "ids.hrc" #include "getcontinuations.hxx" diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index e883bd60848d..0879e3574da3 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -868,14 +868,15 @@ UUIInteractionHelper::handleRequest_impl( return true; // @@@ Todo #i29340#: activate! -// ucb::NameClashResolveRequest aNameClashResolveRequest; -// if (aAnyRequest >>= aNameClashResolveRequest) -// { -// handleNameClashResolveRequest(aNameClashResolveRequest, -// rRequest->getContinuations()); -// return true; -// } - +#if 0 + ucb::NameClashResolveRequest aNameClashResolveRequest; + if (aAnyRequest >>= aNameClashResolveRequest) + { + handleNameClashResolveRequest(aNameClashResolveRequest, + rRequest->getContinuations()); + return true; + } +#endif if ( handleMasterPasswordRequest( rRequest ) ) return true; @@ -1187,6 +1188,8 @@ executeMessageBox( return aResult; } +// @@@ Todo #i29340#: activate! +#if 0 enum NameClashResolveDialogResult { ABORT, RENAME, OVERWRITE }; NameClashResolveDialogResult @@ -1214,9 +1217,11 @@ executeSimpleNameClashResolveDialog( "executeSimpleNameClashResolveDialog not yet implemented!" ); return ABORT; } - +#endif } // namespace +// @@@ Todo #i29340#: activate! +#if 0 void UUIInteractionHelper::handleNameClashResolveRequest( ucb::NameClashResolveRequest const & rRequest, @@ -1284,6 +1289,7 @@ UUIInteractionHelper::handleNameClashResolveRequest( break; } } +#endif void UUIInteractionHelper::handleGenericErrorRequest( diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx index 6402653d3bda..581099462845 100644 --- a/uui/source/iahndl.hxx +++ b/uui/source/iahndl.hxx @@ -215,6 +215,8 @@ private: com::sun::star::task::XInteractionRequest > const & rRequest) SAL_THROW((com::sun::star::uno::RuntimeException)); +// @@@ Todo #i29340#: activate! +#if 0 void handleNameClashResolveRequest( com::sun::star::ucb::NameClashResolveRequest const & rRequest, @@ -223,6 +225,7 @@ private: com::sun::star::task::XInteractionContinuation > > const & rContinuations) SAL_THROW((com::sun::star::uno::RuntimeException)); +#endif bool handleMasterPasswordRequest( diff --git a/uui/source/ids.hrc b/uui/source/ids.hrc index a75cd02b17b8..e91816027946 100644..100755 --- a/uui/source/ids.hrc +++ b/uui/source/ids.hrc @@ -35,126 +35,129 @@ #include "tools/errcode.hxx" #endif -#define RID_KEEP_PASSWORD (RID_UUI_START + 0) -#define RID_SAVE_PASSWORD (RID_UUI_START + 1) -#define DLG_UUI_LOGIN (RID_UUI_START + 2) -#define DLG_COOKIES (RID_UUI_START + 3) -#define STR_COOKIES_RECV_START (RID_UUI_START + 4) -#define STR_COOKIES_RECV_COOKIES (RID_UUI_START + 5) -#define STR_COOKIES_RECV_TITLE (RID_UUI_START + 6) -#define STR_COOKIES_SEND_START (RID_UUI_START + 7) -#define STR_COOKIES_SEND_COOKIES (RID_UUI_START + 8) -#define STR_COOKIES_SEND_TITLE (RID_UUI_START + 9) -#define DLG_FILTER_SELECT (RID_UUI_START + 10) +#define RID_KEEP_PASSWORD (RID_UUI_START + 0) +#define RID_SAVE_PASSWORD (RID_UUI_START + 1) +#define DLG_UUI_LOGIN (RID_UUI_START + 2) +#define DLG_COOKIES (RID_UUI_START + 3) +#define STR_COOKIES_RECV_START (RID_UUI_START + 4) +#define STR_COOKIES_RECV_COOKIES (RID_UUI_START + 5) +#define STR_COOKIES_RECV_TITLE (RID_UUI_START + 6) +#define STR_COOKIES_SEND_START (RID_UUI_START + 7) +#define STR_COOKIES_SEND_COOKIES (RID_UUI_START + 8) +#define STR_COOKIES_SEND_TITLE (RID_UUI_START + 9) +#define DLG_FILTER_SELECT (RID_UUI_START + 10) // RID_UUI_START + 11 moved to ERRCODE_UUI_WRONGMEDIUM -#define DLG_UUI_MASTERPASSWORD (RID_UUI_START + 12) -#define STR_ERROR_PASSWORDS_NOT_IDENTICAL (RID_UUI_START + 13) -#define STR_ERROR_MASTERPASSWORD_WRONG (RID_UUI_START + 14) +#define DLG_UUI_MASTERPASSWORD (RID_UUI_START + 12) +#define STR_ERROR_PASSWORDS_NOT_IDENTICAL (RID_UUI_START + 13) +#define STR_ERROR_MASTERPASSWORD_WRONG (RID_UUI_START + 14) // RID_UUI_START + 15, 16, 17 are misused by syncaccess/source/ui/resids.hrc -#define RID_UUI_ERRHDL (RID_UUI_START + 20) -#define DLG_UUI_MASTERPASSWORD_CRT (RID_UUI_START + 21) -#define DLG_UUI_PASSWORD (RID_UUI_START + 22) -#define DLG_UUI_PASSWORD_CRT (RID_UUI_START + 23) -#define STR_ERROR_PASSWORD_WRONG (RID_UUI_START + 24) -#define STR_WARNING_BROKENSIGNATURE_TITLE (RID_UUI_START + 25) -#define DLG_UUI_UNKNOWNAUTH (RID_UUI_START + 26) -#define DLG_UUI_UNKNOWNAUTH_CRT (RID_UUI_START + 27) -#define DLG_UUI_SSLWARN (RID_UUI_START + 28) -#define DLG_UUI_SSLWARN_CRT (RID_UUI_START + 29) -#define RID_XMLSECDLG_MACROWARN (RID_UUI_START + 30) -#define STR_UNKNOWNUSER (RID_UUI_START + 31) -#define STR_OPENLOCKED_TITLE (RID_UUI_START + 32) -#define STR_OPENLOCKED_MSG (RID_UUI_START + 33) -#define STR_OPENLOCKED_OPENREADONLY_BTN (RID_UUI_START + 34) -#define STR_OPENLOCKED_OPENCOPY_BTN (RID_UUI_START + 35) -#define STR_FILECHANGED_TITLE (RID_UUI_START + 36) -#define STR_FILECHANGED_MSG (RID_UUI_START + 37) -#define STR_FILECHANGED_SAVEANYWAY_BTN (RID_UUI_START + 38) -#define STR_ALREADYOPEN_TITLE (RID_UUI_START + 39) -#define STR_ALREADYOPEN_MSG (RID_UUI_START + 40) -#define STR_ALREADYOPEN_READONLY_BTN (RID_UUI_START + 41) -#define STR_ALREADYOPEN_OPEN_BTN (RID_UUI_START + 42) -#define STR_LOCKFAILED_TITLE (RID_UUI_START + 43) -#define STR_LOCKFAILED_MSG (RID_UUI_START + 44) -#define STR_LOCKFAILED_DONTSHOWAGAIN (RID_UUI_START + 45) -#define STR_TRYLATER_TITLE (RID_UUI_START + 46) -#define STR_TRYLATER_MSG (RID_UUI_START + 47) -#define STR_TRYLATER_RETRYSAVING_BTN (RID_UUI_START + 48) -#define STR_TRYLATER_SAVEAS_BTN (RID_UUI_START + 49) -#define STR_ALREADYOPEN_SAVE_MSG (RID_UUI_START + 50) -#define STR_ALREADYOPEN_RETRY_SAVE_BTN (RID_UUI_START + 51) -#define STR_ALREADYOPEN_SAVE_BTN (RID_UUI_START + 52) -#define RID_DLG_NEWER_VERSION_WARNING (RID_UUI_START + 53) -#define STR_WARNING_INCOMPLETE_ENCRYPTION_TITLE (RID_UUI_START + 54) +#define RID_UUI_ERRHDL (RID_UUI_START + 20) +#define DLG_UUI_MASTERPASSWORD_CRT (RID_UUI_START + 21) +#define DLG_UUI_PASSWORD (RID_UUI_START + 22) +#define DLG_UUI_PASSWORD_CRT (RID_UUI_START + 23) +#define STR_ERROR_PASSWORD_TO_OPEN_WRONG (RID_UUI_START + 24) +#define STR_ERROR_PASSWORD_TO_MODIFY_WRONG (RID_UUI_START + 25) +#define DLG_UUI_UNKNOWNAUTH (RID_UUI_START + 26) +#define DLG_UUI_UNKNOWNAUTH_CRT (RID_UUI_START + 27) +#define DLG_UUI_SSLWARN (RID_UUI_START + 28) +#define DLG_UUI_SSLWARN_CRT (RID_UUI_START + 29) +#define RID_XMLSECDLG_MACROWARN (RID_UUI_START + 30) +#define STR_UNKNOWNUSER (RID_UUI_START + 31) +#define STR_OPENLOCKED_TITLE (RID_UUI_START + 32) +#define STR_OPENLOCKED_MSG (RID_UUI_START + 33) +#define STR_OPENLOCKED_OPENREADONLY_BTN (RID_UUI_START + 34) +#define STR_OPENLOCKED_OPENCOPY_BTN (RID_UUI_START + 35) +#define STR_FILECHANGED_TITLE (RID_UUI_START + 36) +#define STR_FILECHANGED_MSG (RID_UUI_START + 37) +#define STR_FILECHANGED_SAVEANYWAY_BTN (RID_UUI_START + 38) +#define STR_ALREADYOPEN_TITLE (RID_UUI_START + 39) +#define STR_ALREADYOPEN_MSG (RID_UUI_START + 40) +#define STR_ALREADYOPEN_READONLY_BTN (RID_UUI_START + 41) +#define STR_ALREADYOPEN_OPEN_BTN (RID_UUI_START + 42) +#define STR_LOCKFAILED_TITLE (RID_UUI_START + 43) +#define STR_LOCKFAILED_MSG (RID_UUI_START + 44) +#define STR_LOCKFAILED_DONTSHOWAGAIN (RID_UUI_START + 45) +#define STR_TRYLATER_TITLE (RID_UUI_START + 46) +#define STR_TRYLATER_MSG (RID_UUI_START + 47) +#define STR_TRYLATER_RETRYSAVING_BTN (RID_UUI_START + 48) +#define STR_TRYLATER_SAVEAS_BTN (RID_UUI_START + 49) +#define STR_ALREADYOPEN_SAVE_MSG (RID_UUI_START + 50) +#define STR_ALREADYOPEN_RETRY_SAVE_BTN (RID_UUI_START + 51) +#define STR_ALREADYOPEN_SAVE_BTN (RID_UUI_START + 52) +#define RID_DLG_NEWER_VERSION_WARNING (RID_UUI_START + 53) +#define STR_WARNING_INCOMPLETE_ENCRYPTION_TITLE (RID_UUI_START + 54) +#define STR_WARNING_BROKENSIGNATURE_TITLE (RID_UUI_START + 55) +#define STR_ENTER_PASSWORD_TO_OPEN (RID_UUI_START + 56) +#define STR_ENTER_PASSWORD_TO_MODIFY (RID_UUI_START + 57) -#define ERRCODE_UUI_IO_ABORT (ERRCODE_AREA_UUI + 0) -#define ERRCODE_UUI_IO_ACCESSDENIED (ERRCODE_AREA_UUI + 1) -#define ERRCODE_UUI_IO_ALREADYEXISTS (ERRCODE_AREA_UUI + 2) -#define ERRCODE_UUI_IO_BADCRC (ERRCODE_AREA_UUI + 3) -#define ERRCODE_UUI_IO_CANTCREATE (ERRCODE_AREA_UUI + 4) -#define ERRCODE_UUI_IO_CANTREAD (ERRCODE_AREA_UUI + 5) -#define ERRCODE_UUI_IO_CANTSEEK (ERRCODE_AREA_UUI + 6) -#define ERRCODE_UUI_IO_CANTTELL (ERRCODE_AREA_UUI + 7) -#define ERRCODE_UUI_IO_CANTWRITE (ERRCODE_AREA_UUI + 8) -#define ERRCODE_UUI_IO_CURRENTDIR (ERRCODE_AREA_UUI + 9) -#define ERRCODE_UUI_IO_NOTREADY (ERRCODE_AREA_UUI + 10) -#define ERRCODE_UUI_IO_NOTSAMEDEVICE (ERRCODE_AREA_UUI + 11) -#define ERRCODE_UUI_IO_GENERAL (ERRCODE_AREA_UUI + 12) -#define ERRCODE_UUI_IO_INVALIDACCESS (ERRCODE_AREA_UUI + 13) -#define ERRCODE_UUI_IO_INVALIDCHAR (ERRCODE_AREA_UUI + 14) -#define ERRCODE_UUI_IO_INVALIDDEVICE (ERRCODE_AREA_UUI + 15) -#define ERRCODE_UUI_IO_INVALIDLENGTH (ERRCODE_AREA_UUI + 16) -#define ERRCODE_UUI_IO_INVALIDPARAMETER (ERRCODE_AREA_UUI + 17) -#define ERRCODE_UUI_IO_ISWILDCARD (ERRCODE_AREA_UUI + 18) -#define ERRCODE_UUI_IO_LOCKVIOLATION (ERRCODE_AREA_UUI + 19) -#define ERRCODE_UUI_IO_MISPLACEDCHAR (ERRCODE_AREA_UUI + 20) -#define ERRCODE_UUI_IO_NAMETOOLONG (ERRCODE_AREA_UUI + 21) -#define ERRCODE_UUI_IO_NOTEXISTS (ERRCODE_AREA_UUI + 22) -#define ERRCODE_UUI_IO_NOTEXISTSPATH (ERRCODE_AREA_UUI + 23) -#define ERRCODE_UUI_IO_NOTSUPPORTED (ERRCODE_AREA_UUI + 24) -#define ERRCODE_UUI_IO_NOTADIRECTORY (ERRCODE_AREA_UUI + 25) -#define ERRCODE_UUI_IO_NOTAFILE (ERRCODE_AREA_UUI + 26) -#define ERRCODE_UUI_IO_OUTOFSPACE (ERRCODE_AREA_UUI + 27) -#define ERRCODE_UUI_IO_TOOMANYOPENFILES (ERRCODE_AREA_UUI + 28) -#define ERRCODE_UUI_IO_OUTOFMEMORY (ERRCODE_AREA_UUI + 29) -#define ERRCODE_UUI_IO_PENDING (ERRCODE_AREA_UUI + 30) -#define ERRCODE_UUI_IO_RECURSIVE (ERRCODE_AREA_UUI + 31) -#define ERRCODE_UUI_IO_UNKNOWN (ERRCODE_AREA_UUI + 32) -#define ERRCODE_UUI_IO_WRITEPROTECTED (ERRCODE_AREA_UUI + 33) -#define ERRCODE_UUI_IO_WRONGFORMAT (ERRCODE_AREA_UUI + 34) -#define ERRCODE_UUI_IO_WRONGVERSION (ERRCODE_AREA_UUI + 35) -#define ERRCODE_UUI_IO_NOTEXISTS_VOLUME (ERRCODE_AREA_UUI + 36) -#define ERRCODE_UUI_IO_NOTEXISTS_FOLDER (ERRCODE_AREA_UUI + 37) -#define ERRCODE_UUI_WRONGJAVA (ERRCODE_AREA_UUI + 38) -#define ERRCODE_UUI_WRONGJAVA_VERSION (ERRCODE_AREA_UUI + 39) -#define ERRCODE_UUI_WRONGJAVA_MIN (ERRCODE_AREA_UUI + 40) -#define ERRCODE_UUI_WRONGJAVA_VERSION_MIN (ERRCODE_AREA_UUI + 41) -#define ERRCODE_UUI_BADPARTNERSHIP (ERRCODE_AREA_UUI + 42) -#define ERRCODE_UUI_BADPARTNERSHIP_NAME (ERRCODE_AREA_UUI + 43) -#define ERRCODE_UUI_IO_NOTREADY_VOLUME (ERRCODE_AREA_UUI + 44) -#define ERRCODE_UUI_IO_NOTREADY_REMOVABLE (ERRCODE_AREA_UUI + 45) -#define ERRCODE_UUI_IO_NOTREADY_VOLUME_REMOVABLE (ERRCODE_AREA_UUI + 46) -#define ERRCODE_UUI_WRONGMEDIUM (ERRCODE_AREA_UUI + 47) -#define ERRCODE_UUI_IO_CANTCREATE_NONAME (ERRCODE_AREA_UUI + 48) -#define ERRCODE_UUI_IO_TARGETALREADYEXISTS (ERRCODE_AREA_UUI + 49) -#define ERRCODE_UUI_IO_UNSUPPORTEDOVERWRITE (ERRCODE_AREA_UUI + 50) -#define ERRCODE_UUI_IO_BROKENPACKAGE (ERRCODE_AREA_UUI + 51) -#define ERRCODE_UUI_IO_BROKENPACKAGE_CANTREPAIR (ERRCODE_AREA_UUI + 52) -#define ERRCODE_UUI_CONFIGURATION_BROKENDATA_NOREMOVE (ERRCODE_AREA_UUI + 53) -#define ERRCODE_UUI_CONFIGURATION_BROKENDATA_WITHREMOVE (ERRCODE_AREA_UUI + 54) -#define ERRCODE_UUI_CONFIGURATION_BACKENDMISSING (ERRCODE_AREA_UUI + 55) -#define ERRCODE_UUI_CONFIGURATION_BACKENDMISSING_WITHRECOVER (ERRCODE_AREA_UUI + 56) -#define ERRCODE_UUI_INVALID_XFORMS_SUBMISSION_DATA (ERRCODE_AREA_UUI + 57) -#define ERRCODE_UUI_IO_MODULESIZEEXCEEDED (ERRCODE_AREA_UUI + 58) -#define ERRCODE_UUI_LOCKING_LOCKED (ERRCODE_AREA_UUI + 59) -#define ERRCODE_UUI_LOCKING_LOCKED_SELF (ERRCODE_AREA_UUI + 60) -#define ERRCODE_UUI_LOCKING_NOT_LOCKED (ERRCODE_AREA_UUI + 61) -#define ERRCODE_UUI_LOCKING_LOCK_EXPIRED (ERRCODE_AREA_UUI + 62) +#define ERRCODE_UUI_IO_ABORT (ERRCODE_AREA_UUI + 0) +#define ERRCODE_UUI_IO_ACCESSDENIED (ERRCODE_AREA_UUI + 1) +#define ERRCODE_UUI_IO_ALREADYEXISTS (ERRCODE_AREA_UUI + 2) +#define ERRCODE_UUI_IO_BADCRC (ERRCODE_AREA_UUI + 3) +#define ERRCODE_UUI_IO_CANTCREATE (ERRCODE_AREA_UUI + 4) +#define ERRCODE_UUI_IO_CANTREAD (ERRCODE_AREA_UUI + 5) +#define ERRCODE_UUI_IO_CANTSEEK (ERRCODE_AREA_UUI + 6) +#define ERRCODE_UUI_IO_CANTTELL (ERRCODE_AREA_UUI + 7) +#define ERRCODE_UUI_IO_CANTWRITE (ERRCODE_AREA_UUI + 8) +#define ERRCODE_UUI_IO_CURRENTDIR (ERRCODE_AREA_UUI + 9) +#define ERRCODE_UUI_IO_NOTREADY (ERRCODE_AREA_UUI + 10) +#define ERRCODE_UUI_IO_NOTSAMEDEVICE (ERRCODE_AREA_UUI + 11) +#define ERRCODE_UUI_IO_GENERAL (ERRCODE_AREA_UUI + 12) +#define ERRCODE_UUI_IO_INVALIDACCESS (ERRCODE_AREA_UUI + 13) +#define ERRCODE_UUI_IO_INVALIDCHAR (ERRCODE_AREA_UUI + 14) +#define ERRCODE_UUI_IO_INVALIDDEVICE (ERRCODE_AREA_UUI + 15) +#define ERRCODE_UUI_IO_INVALIDLENGTH (ERRCODE_AREA_UUI + 16) +#define ERRCODE_UUI_IO_INVALIDPARAMETER (ERRCODE_AREA_UUI + 17) +#define ERRCODE_UUI_IO_ISWILDCARD (ERRCODE_AREA_UUI + 18) +#define ERRCODE_UUI_IO_LOCKVIOLATION (ERRCODE_AREA_UUI + 19) +#define ERRCODE_UUI_IO_MISPLACEDCHAR (ERRCODE_AREA_UUI + 20) +#define ERRCODE_UUI_IO_NAMETOOLONG (ERRCODE_AREA_UUI + 21) +#define ERRCODE_UUI_IO_NOTEXISTS (ERRCODE_AREA_UUI + 22) +#define ERRCODE_UUI_IO_NOTEXISTSPATH (ERRCODE_AREA_UUI + 23) +#define ERRCODE_UUI_IO_NOTSUPPORTED (ERRCODE_AREA_UUI + 24) +#define ERRCODE_UUI_IO_NOTADIRECTORY (ERRCODE_AREA_UUI + 25) +#define ERRCODE_UUI_IO_NOTAFILE (ERRCODE_AREA_UUI + 26) +#define ERRCODE_UUI_IO_OUTOFSPACE (ERRCODE_AREA_UUI + 27) +#define ERRCODE_UUI_IO_TOOMANYOPENFILES (ERRCODE_AREA_UUI + 28) +#define ERRCODE_UUI_IO_OUTOFMEMORY (ERRCODE_AREA_UUI + 29) +#define ERRCODE_UUI_IO_PENDING (ERRCODE_AREA_UUI + 30) +#define ERRCODE_UUI_IO_RECURSIVE (ERRCODE_AREA_UUI + 31) +#define ERRCODE_UUI_IO_UNKNOWN (ERRCODE_AREA_UUI + 32) +#define ERRCODE_UUI_IO_WRITEPROTECTED (ERRCODE_AREA_UUI + 33) +#define ERRCODE_UUI_IO_WRONGFORMAT (ERRCODE_AREA_UUI + 34) +#define ERRCODE_UUI_IO_WRONGVERSION (ERRCODE_AREA_UUI + 35) +#define ERRCODE_UUI_IO_NOTEXISTS_VOLUME (ERRCODE_AREA_UUI + 36) +#define ERRCODE_UUI_IO_NOTEXISTS_FOLDER (ERRCODE_AREA_UUI + 37) +#define ERRCODE_UUI_WRONGJAVA (ERRCODE_AREA_UUI + 38) +#define ERRCODE_UUI_WRONGJAVA_VERSION (ERRCODE_AREA_UUI + 39) +#define ERRCODE_UUI_WRONGJAVA_MIN (ERRCODE_AREA_UUI + 40) +#define ERRCODE_UUI_WRONGJAVA_VERSION_MIN (ERRCODE_AREA_UUI + 41) +#define ERRCODE_UUI_BADPARTNERSHIP (ERRCODE_AREA_UUI + 42) +#define ERRCODE_UUI_BADPARTNERSHIP_NAME (ERRCODE_AREA_UUI + 43) +#define ERRCODE_UUI_IO_NOTREADY_VOLUME (ERRCODE_AREA_UUI + 44) +#define ERRCODE_UUI_IO_NOTREADY_REMOVABLE (ERRCODE_AREA_UUI + 45) +#define ERRCODE_UUI_IO_NOTREADY_VOLUME_REMOVABLE (ERRCODE_AREA_UUI + 46) +#define ERRCODE_UUI_WRONGMEDIUM (ERRCODE_AREA_UUI + 47) +#define ERRCODE_UUI_IO_CANTCREATE_NONAME (ERRCODE_AREA_UUI + 48) +#define ERRCODE_UUI_IO_TARGETALREADYEXISTS (ERRCODE_AREA_UUI + 49) +#define ERRCODE_UUI_IO_UNSUPPORTEDOVERWRITE (ERRCODE_AREA_UUI + 50) +#define ERRCODE_UUI_IO_BROKENPACKAGE (ERRCODE_AREA_UUI + 51) +#define ERRCODE_UUI_IO_BROKENPACKAGE_CANTREPAIR (ERRCODE_AREA_UUI + 52) +#define ERRCODE_UUI_CONFIGURATION_BROKENDATA_NOREMOVE (ERRCODE_AREA_UUI + 53) +#define ERRCODE_UUI_CONFIGURATION_BROKENDATA_WITHREMOVE (ERRCODE_AREA_UUI + 54) +#define ERRCODE_UUI_CONFIGURATION_BACKENDMISSING (ERRCODE_AREA_UUI + 55) +#define ERRCODE_UUI_CONFIGURATION_BACKENDMISSING_WITHRECOVER (ERRCODE_AREA_UUI + 56) +#define ERRCODE_UUI_INVALID_XFORMS_SUBMISSION_DATA (ERRCODE_AREA_UUI + 57) +#define ERRCODE_UUI_IO_MODULESIZEEXCEEDED (ERRCODE_AREA_UUI + 58) +#define ERRCODE_UUI_LOCKING_LOCKED (ERRCODE_AREA_UUI + 59) +#define ERRCODE_UUI_LOCKING_LOCKED_SELF (ERRCODE_AREA_UUI + 60) +#define ERRCODE_UUI_LOCKING_NOT_LOCKED (ERRCODE_AREA_UUI + 61) +#define ERRCODE_UUI_LOCKING_LOCK_EXPIRED (ERRCODE_AREA_UUI + 62) -#define ERRCODE_AREA_UUI_UNKNOWNAUTH 25000 -#define SSLWARN_TYPE_DOMAINMISMATCH 10 -#define SSLWARN_TYPE_EXPIRED 20 -#define SSLWARN_TYPE_INVALID 30 +#define ERRCODE_AREA_UUI_UNKNOWNAUTH 25000 +#define SSLWARN_TYPE_DOMAINMISMATCH 10 +#define SSLWARN_TYPE_EXPIRED 20 +#define SSLWARN_TYPE_INVALID 30 #define ERRCODE_UUI_UNKNOWNAUTH_UNTRUSTED (ERRCODE_AREA_UUI_UNKNOWNAUTH + 1) @@ -179,5 +182,13 @@ #define HID_XMLSECDLG_MACROWARN "UUI_HID_XMLSECDLG_MACROWARN" #define HID_DLG_NEWERVERSIONWARNING "UUI_HID_DLG_NEWERVERSIONWARNING" +#define HID_LOGIN_DLG_PATH "UUI_HID_LOGIN_DLG_PATH" +#define HID_LOGIN_DLG_BROWSE "UUI_HID_LOGIN_DLG_BROWSE" +#define HID_LOGIN_DLG_USER_NAME "UUI_HID_LOGIN_DLG_USER_NAME" +#define HID_LOGIN_DLG_PASSWORD "UUI_HID_LOGIN_DLG_PASSWORD" +#define HID_LOGIN_DLG_ACCOUNT "UUI_HID_LOGIN_DLG_ACCOUNT" +#define HID_LOGIN_DLG_REMEMBER_PASSWORD "UUI_HID_LOGIN_DLG_REMEMBER_PASSWORD" +#define HID_LOGIN_DLG_USE_SYSTEM_CREDENTIALS "UUI_HID_LOGIN_DLG_USE_SYSTEM_CREDENTIALS" + #endif // UUI_IDS_HRC diff --git a/uui/source/logindlg.cxx b/uui/source/logindlg.cxx index 53ea243c9577..d7ded58b5dde 100644..100755 --- a/uui/source/logindlg.cxx +++ b/uui/source/logindlg.cxx @@ -47,12 +47,20 @@ //............................................................................ //............................................................................ +static void lcl_Move( Window &rWin, long nOffset ) +{ + Point aTmp( rWin.GetPosPixel() ); + aTmp.Y() -= nOffset; + rWin.SetPosPixel( aTmp ); +} + + void LoginDialog::HideControls_Impl( USHORT nFlags ) { - FASTBOOL bPathHide = FALSE; - FASTBOOL bErrorHide = FALSE; - FASTBOOL bAccountHide = FALSE; - FASTBOOL bUseSysCredsHide = FALSE; + bool bPathHide = FALSE; + bool bErrorHide = FALSE; + bool bAccountHide = FALSE; + bool bUseSysCredsHide = FALSE; if ( ( nFlags & LF_NO_PATH ) == LF_NO_PATH ) { @@ -63,9 +71,8 @@ void LoginDialog::HideControls_Impl( USHORT nFlags ) } else if ( ( nFlags & LF_PATH_READONLY ) == LF_PATH_READONLY ) { - aPathED.Hide(); - aPathInfo.Show(); - aPathBtn.Hide(); + aPathED.Enable( FALSE ); + aPathBtn.Enable( FALSE ); } if ( ( nFlags & LF_NO_USERNAME ) == LF_NO_USERNAME ) @@ -75,8 +82,7 @@ void LoginDialog::HideControls_Impl( USHORT nFlags ) } else if ( ( nFlags & LF_USERNAME_READONLY ) == LF_USERNAME_READONLY ) { - aNameED.Hide(); - aNameInfo.Show(); + aNameED.Enable( FALSE ); } if ( ( nFlags & LF_NO_PASSWORD ) == LF_NO_PASSWORD ) @@ -91,7 +97,8 @@ void LoginDialog::HideControls_Impl( USHORT nFlags ) if ( ( nFlags & LF_NO_ERRORTEXT ) == LF_NO_ERRORTEXT ) { aErrorInfo.Hide(); - aErrorGB.Hide(); + aErrorFT.Hide(); + aLogin1FL.Hide(); bErrorHide = TRUE; } @@ -110,53 +117,26 @@ void LoginDialog::HideControls_Impl( USHORT nFlags ) if ( bErrorHide ) { - long nOffset = aLoginGB.GetPosPixel().Y() - - aErrorGB.GetPosPixel().Y(); - Point aNewPnt = aRequestInfo.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aRequestInfo.SetPosPixel( aNewPnt ); - aNewPnt = aPathFT.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aPathFT.SetPosPixel( aNewPnt ); - aNewPnt = aPathED.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aPathED.SetPosPixel( aNewPnt ); - aNewPnt = aPathInfo.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aPathInfo.SetPosPixel( aNewPnt ); - aNewPnt = aPathBtn.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aPathBtn.SetPosPixel( aNewPnt ); - aNewPnt = aNameFT.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aNameFT.SetPosPixel( aNewPnt ); - aNewPnt = aNameED.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aNameED.SetPosPixel( aNewPnt ); - aNewPnt = aNameInfo.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aNameInfo.SetPosPixel( aNewPnt ); - aNewPnt = aPasswordFT.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aPasswordFT.SetPosPixel( aNewPnt ); - aNewPnt = aPasswordED.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aPasswordED.SetPosPixel( aNewPnt ); - aNewPnt = aAccountFT.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aAccountFT.SetPosPixel( aNewPnt ); - aNewPnt = aAccountED.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aAccountED.SetPosPixel( aNewPnt ); - aNewPnt = aSavePasswdBtn.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aSavePasswdBtn.SetPosPixel( aNewPnt ); - aNewPnt = aUseSysCredsCB.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aUseSysCredsCB.SetPosPixel( aNewPnt ); - aNewPnt = aLoginGB.GetPosPixel(); - aNewPnt.Y() -= nOffset; - aLoginGB.SetPosPixel( aNewPnt ); + long nOffset = aRequestInfo.GetPosPixel().Y() - + aErrorFT.GetPosPixel().Y(); + lcl_Move( aRequestInfo, nOffset ); + lcl_Move( aLogin2FL, nOffset ); + lcl_Move( aPathFT, nOffset ); + lcl_Move( aPathED, nOffset ); + lcl_Move( aPathBtn, nOffset ); + lcl_Move( aNameFT, nOffset ); + lcl_Move( aNameED, nOffset ); + lcl_Move( aPasswordFT, nOffset ); + lcl_Move( aPasswordED, nOffset ); + lcl_Move( aAccountFT, nOffset ); + lcl_Move( aAccountED, nOffset ); + lcl_Move( aSavePasswdBtn, nOffset ); + lcl_Move( aUseSysCredsCB, nOffset ); + lcl_Move( aButtonsFL, nOffset ); + lcl_Move( aOKBtn, nOffset ); + lcl_Move( aCancelBtn, nOffset ); + lcl_Move( aHelpBtn, nOffset ); + Size aNewSiz = GetSizePixel(); aNewSiz.Height() -= nOffset; SetSizePixel( aNewSiz ); @@ -166,24 +146,19 @@ void LoginDialog::HideControls_Impl( USHORT nFlags ) { long nOffset = aNameED.GetPosPixel().Y() - aPathED.GetPosPixel().Y(); + lcl_Move( aNameFT, nOffset ); + lcl_Move( aNameED, nOffset ); + lcl_Move( aPasswordFT, nOffset ); + lcl_Move( aPasswordED, nOffset ); + lcl_Move( aAccountFT, nOffset ); + lcl_Move( aAccountED, nOffset ); + lcl_Move( aSavePasswdBtn, nOffset ); + lcl_Move( aUseSysCredsCB, nOffset ); + lcl_Move( aButtonsFL, nOffset ); + lcl_Move( aOKBtn, nOffset ); + lcl_Move( aCancelBtn, nOffset ); + lcl_Move( aHelpBtn, nOffset ); - Point aTmpPnt1 = aNameFT.GetPosPixel(); - Point aTmpPnt2 = aPasswordFT.GetPosPixel(); - aNameFT.SetPosPixel( aPathFT.GetPosPixel() ); - aPasswordFT.SetPosPixel( aTmpPnt1 ); - aAccountFT.SetPosPixel( aTmpPnt2 ); - aTmpPnt1 = aNameED.GetPosPixel(); - aTmpPnt2 = aPasswordED.GetPosPixel(); - aNameED.SetPosPixel( aPathED.GetPosPixel() ); - aPasswordED.SetPosPixel( aTmpPnt1 ); - aAccountED.SetPosPixel( aTmpPnt2 ); - aNameInfo.SetPosPixel( aPathInfo.GetPosPixel() ); - aTmpPnt1 = aSavePasswdBtn.GetPosPixel(); - aTmpPnt1.Y() -= nOffset; - aSavePasswdBtn.SetPosPixel( aTmpPnt1 ); - aTmpPnt1 = aUseSysCredsCB.GetPosPixel(); - aTmpPnt1.Y() -= nOffset; - aUseSysCredsCB.SetPosPixel( aTmpPnt1 ); Size aNewSz = GetSizePixel(); aNewSz.Height() -= nOffset; SetSizePixel( aNewSz ); @@ -191,14 +166,15 @@ void LoginDialog::HideControls_Impl( USHORT nFlags ) if ( bAccountHide ) { - long nOffset = aAccountED.GetPosPixel().Y() - aPasswordED.GetPosPixel().Y(); - - Point aTmpPnt = aSavePasswdBtn.GetPosPixel(); - aTmpPnt.Y() -= nOffset; - aSavePasswdBtn.SetPosPixel( aTmpPnt ); - aTmpPnt = aUseSysCredsCB.GetPosPixel(); - aTmpPnt.Y() -= nOffset; - aUseSysCredsCB.SetPosPixel( aTmpPnt ); + long nOffset = aAccountED.GetPosPixel().Y() - + aPasswordED.GetPosPixel().Y(); + lcl_Move( aSavePasswdBtn, nOffset ); + lcl_Move( aUseSysCredsCB, nOffset ); + lcl_Move( aButtonsFL, nOffset ); + lcl_Move( aOKBtn, nOffset ); + lcl_Move( aCancelBtn, nOffset ); + lcl_Move( aHelpBtn, nOffset ); + Size aNewSz = GetSizePixel(); aNewSz.Height() -= nOffset; SetSizePixel( aNewSz ); @@ -208,6 +184,10 @@ void LoginDialog::HideControls_Impl( USHORT nFlags ) { long nOffset = aUseSysCredsCB.GetPosPixel().Y() - aSavePasswdBtn.GetPosPixel().Y(); + lcl_Move( aButtonsFL, nOffset ); + lcl_Move( aOKBtn, nOffset ); + lcl_Move( aCancelBtn, nOffset ); + lcl_Move( aHelpBtn, nOffset ); Size aNewSz = GetSizePixel(); aNewSz.Height() -= nOffset; @@ -219,15 +199,13 @@ void LoginDialog::HideControls_Impl( USHORT nFlags ) void LoginDialog::EnableUseSysCredsControls_Impl( BOOL bUseSysCredsEnabled ) { aErrorInfo.Enable( !bUseSysCredsEnabled ); - aErrorGB.Enable( !bUseSysCredsEnabled ); + aErrorFT.Enable( !bUseSysCredsEnabled ); aRequestInfo.Enable( !bUseSysCredsEnabled ); aPathFT.Enable( !bUseSysCredsEnabled ); aPathED.Enable( !bUseSysCredsEnabled ); - aPathInfo.Enable( !bUseSysCredsEnabled ); aPathBtn.Enable( !bUseSysCredsEnabled ); aNameFT.Enable( !bUseSysCredsEnabled ); aNameED.Enable( !bUseSysCredsEnabled ); - aNameInfo.Enable( !bUseSysCredsEnabled ); aPasswordFT.Enable( !bUseSysCredsEnabled ); aPasswordED.Enable( !bUseSysCredsEnabled ); aAccountFT.Enable( !bUseSysCredsEnabled ); @@ -282,23 +260,23 @@ LoginDialog::LoginDialog ModalDialog( pParent, ResId( DLG_UUI_LOGIN, *pResMgr ) ), - aErrorInfo ( this, ResId( INFO_LOGIN_ERROR, *pResMgr ) ), - aErrorGB ( this, ResId( GB_LOGIN_ERROR, *pResMgr ) ), - aRequestInfo ( this, ResId( INFO_LOGIN_REQUEST, *pResMgr ) ), + aErrorFT ( this, ResId( FT_LOGIN_ERROR, *pResMgr ) ), + aErrorInfo ( this, ResId( FT_INFO_LOGIN_ERROR, *pResMgr ) ), + aLogin1FL ( this, ResId( FL_LOGIN_1, *pResMgr ) ), + aRequestInfo ( this, ResId( FT_INFO_LOGIN_REQUEST, *pResMgr ) ), + aLogin2FL ( this, ResId( FL_LOGIN_2, *pResMgr ) ), aPathFT ( this, ResId( FT_LOGIN_PATH, *pResMgr ) ), aPathED ( this, ResId( ED_LOGIN_PATH, *pResMgr ) ), - aPathInfo ( this, ResId( INFO_LOGIN_PATH, *pResMgr ) ), aPathBtn ( this, ResId( BTN_LOGIN_PATH, *pResMgr ) ), aNameFT ( this, ResId( FT_LOGIN_USERNAME, *pResMgr ) ), aNameED ( this, ResId( ED_LOGIN_USERNAME, *pResMgr ) ), - aNameInfo ( this, ResId( INFO_LOGIN_USERNAME, *pResMgr ) ), aPasswordFT ( this, ResId( FT_LOGIN_PASSWORD, *pResMgr ) ), aPasswordED ( this, ResId( ED_LOGIN_PASSWORD, *pResMgr ) ), aAccountFT ( this, ResId( FT_LOGIN_ACCOUNT, *pResMgr ) ), aAccountED ( this, ResId( ED_LOGIN_ACCOUNT, *pResMgr ) ), aSavePasswdBtn ( this, ResId( CB_LOGIN_SAVEPASSWORD, *pResMgr ) ), aUseSysCredsCB ( this, ResId( CB_LOGIN_USESYSCREDS, *pResMgr ) ), - aLoginGB ( this, ResId( GB_LOGIN_LOGIN, *pResMgr ) ), + aButtonsFL ( this, ResId( FL_BUTTONS, *pResMgr ) ), aOKBtn ( this, ResId( BTN_LOGIN_OK, *pResMgr ) ), aCancelBtn ( this, ResId( BTN_LOGIN_CANCEL, *pResMgr ) ), aHelpBtn ( this, ResId( BTN_LOGIN_HELP, *pResMgr ) ) @@ -333,10 +311,8 @@ LoginDialog::LoginDialog // ----------------------------------------------------------------------- -void LoginDialog::SetName( const String& rNewName ) +LoginDialog::~LoginDialog() { - aNameED.SetText( rNewName ); - aNameInfo.SetText( rNewName ); } // ----------------------------------------------------------------------- diff --git a/uui/source/logindlg.hrc b/uui/source/logindlg.hrc index 68162fb620cd..b541740bd768 100644..100755 --- a/uui/source/logindlg.hrc +++ b/uui/source/logindlg.hrc @@ -30,24 +30,24 @@ //============================================================================ -#define INFO_LOGIN_ERROR 10 -#define GB_LOGIN_ERROR 11 +#define FT_INFO_LOGIN_ERROR 10 +#define FT_LOGIN_ERROR 11 -#define INFO_LOGIN_REQUEST 20 +#define FT_INFO_LOGIN_REQUEST 20 #define FT_LOGIN_PATH 21 #define ED_LOGIN_PATH 22 -#define INFO_LOGIN_PATH 23 -#define BTN_LOGIN_PATH 24 -#define FT_LOGIN_USERNAME 25 -#define ED_LOGIN_USERNAME 26 -#define INFO_LOGIN_USERNAME 27 -#define FT_LOGIN_PASSWORD 28 -#define ED_LOGIN_PASSWORD 29 -#define FT_LOGIN_ACCOUNT 30 -#define ED_LOGIN_ACCOUNT 31 -#define CB_LOGIN_SAVEPASSWORD 32 -#define GB_LOGIN_LOGIN 33 -#define CB_LOGIN_USESYSCREDS 34 +#define BTN_LOGIN_PATH 23 +#define FT_LOGIN_USERNAME 24 +#define ED_LOGIN_USERNAME 25 +#define FT_LOGIN_PASSWORD 26 +#define ED_LOGIN_PASSWORD 27 +#define FT_LOGIN_ACCOUNT 28 +#define ED_LOGIN_ACCOUNT 29 +#define CB_LOGIN_SAVEPASSWORD 30 +#define CB_LOGIN_USESYSCREDS 31 +#define FL_LOGIN_1 32 +#define FL_LOGIN_2 33 +#define FL_BUTTONS 34 #define BTN_LOGIN_OK 50 #define BTN_LOGIN_CANCEL 51 diff --git a/uui/source/logindlg.hxx b/uui/source/logindlg.hxx index 0a4637d89251..05ba8e8d55d4 100644..100755 --- a/uui/source/logindlg.hxx +++ b/uui/source/logindlg.hxx @@ -53,23 +53,23 @@ //============================================================================ class LoginDialog : public ModalDialog { + FixedText aErrorFT; FixedInfo aErrorInfo; - FixedLine aErrorGB; + FixedLine aLogin1FL; FixedInfo aRequestInfo; + FixedLine aLogin2FL; FixedText aPathFT; Edit aPathED; - FixedInfo aPathInfo; PushButton aPathBtn; FixedText aNameFT; Edit aNameED; - FixedInfo aNameInfo; FixedText aPasswordFT; Edit aPasswordED; FixedText aAccountFT; Edit aAccountED; CheckBox aSavePasswdBtn; CheckBox aUseSysCredsCB; - FixedLine aLoginGB; + FixedLine aButtonsFL; OKButton aOKBtn; CancelButton aCancelBtn; HelpButton aHelpBtn; @@ -85,36 +85,30 @@ public: LoginDialog( Window* pParent, USHORT nFlags, const String& rServer, const String* pRealm, ResMgr * pResMgr ); + virtual ~LoginDialog(); - String GetPath() const { return aPathED.GetText(); } - void SetPath( const String& rNewPath ) - { aPathED.SetText( rNewPath ); - aPathInfo.SetText( rNewPath );} - String GetName() const { return aNameED.GetText(); } - void SetName( const String& rNewName ); - String GetPassword() const { return aPasswordED.GetText(); } - void SetPassword( const String& rNew ) - { aPasswordED.SetText( rNew ); } - String GetAccount() const { return aAccountED.GetText(); } - void SetAccount( const String& rNew ) - { aAccountED.SetText( rNew ); } - BOOL IsSavePassword() const - { return aSavePasswdBtn.IsChecked(); } - void SetSavePassword( BOOL bSave ) - { aSavePasswdBtn.Check( bSave ); } - void SetSavePasswordText( const String& rTxt ) - { aSavePasswdBtn.SetText( rTxt ); } - BOOL IsUseSystemCredentials() const - { return aUseSysCredsCB.IsChecked(); } + String GetPath() const { return aPathED.GetText(); } + void SetPath( const String& rNewPath ) { aPathED.SetText( rNewPath ); } + String GetName() const { return aNameED.GetText(); } + void SetName( const String& rNewName ) { aNameED.SetText( rNewName ); } + String GetPassword() const { return aPasswordED.GetText(); } + void SetPassword( const String& rNew ) { aPasswordED.SetText( rNew ); } + String GetAccount() const { return aAccountED.GetText(); } + void SetAccount( const String& rNew ) { aAccountED.SetText( rNew ); } + BOOL IsSavePassword() const { return aSavePasswdBtn.IsChecked(); } + void SetSavePassword( BOOL bSave ) { aSavePasswdBtn.Check( bSave ); } + void SetSavePasswordText( const String& rTxt ) { aSavePasswdBtn.SetText( rTxt ); } + BOOL IsUseSystemCredentials() const { return aUseSysCredsCB.IsChecked(); } void SetUseSystemCredentials( BOOL bUse ); - void SetErrorText( const String& rTxt ) - { aErrorInfo.SetText( rTxt ); } - void SetLoginRequestText( const String& rTxt ) - { aRequestInfo.SetText( rTxt ); } + void SetErrorText( const String& rTxt ) { aErrorInfo.SetText( rTxt ); } + void SetLoginRequestText( const String& rTxt ) { aRequestInfo.SetText( rTxt ); } void ClearPassword(); void ClearAccount(); }; +// ----------------------------------------------------------------------- + + //............................................................................ //............................................................................ diff --git a/uui/source/logindlg.src b/uui/source/logindlg.src index ce998f4945be..bf6a97c3b0ff 100644..100755 --- a/uui/source/logindlg.src +++ b/uui/source/logindlg.src @@ -16,7 +16,7 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). + *(a copy is included in the LICENSE file that accompanied this code). * * You should have received a copy of the GNU Lesser General Public License * version 3 along with OpenOffice.org. If not, see @@ -42,166 +42,156 @@ ModalDialog DLG_UUI_LOGIN Moveable = TRUE ; OutputSize = TRUE ; SVLook = TRUE ; - Size = MAP_APPFONT ( 265 , 170 ) ; - FixedText INFO_LOGIN_ERROR + Size = MAP_APPFONT( 177 , 247 ) ; + Text [ en-US ] = "Authentication Required" ; + + FixedText FT_LOGIN_ERROR { - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 185 , 18 ) ; + Pos = MAP_APPFONT( 6 , 6 ) ; + Size = MAP_APPFONT( 165 , 8 ) ; + Text [ en-US ] = "Message from server:" ; + }; + + FixedText FT_INFO_LOGIN_ERROR + { + Pos = MAP_APPFONT( 6 , 14 ) ; + Size = MAP_APPFONT( 165 , 3*8 ) ; WordBreak = TRUE ; }; - FixedLine GB_LOGIN_ERROR + + FixedLine FL_LOGIN_1 { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 197 , 8 ) ; - Text [ en-US ] = "Message from server" ; + Pos = MAP_APPFONT( 6 , 41 ) ; + Size = MAP_APPFONT( 165 , 8 ) ; }; - FixedText INFO_LOGIN_REQUEST + + FixedText FT_INFO_LOGIN_REQUEST { - Pos = MAP_APPFONT ( 12 , 55 ) ; - Size = MAP_APPFONT ( 185 , 18 ) ; + Pos = MAP_APPFONT( 6 , 52 ) ; + Size = MAP_APPFONT( 165 , 2*8 ) ; WordBreak = TRUE ; - Text [ en-US ] = "Enter the user name and password for %1 here." ; + Text [ en-US ] = "Enter user name and password for: \n%1" ; }; + + String STR_LOGIN_REALM + { + Text [ en-US ] = "Enter user name and password for: \n\"%2\" on %1" ; + }; + + FixedLine FL_LOGIN_2 + { + Pos = MAP_APPFONT( 6 , 71 ) ; + Size = MAP_APPFONT( 165 , 8 ) ; + }; + FixedText FT_LOGIN_PATH { - Pos = MAP_APPFONT ( 12 , 77 ) ; - Size = MAP_APPFONT ( 57 , 10 ) ; + Pos = MAP_APPFONT( 6 , 84 ) ; + Size = MAP_APPFONT( 112 , 8 ) ; Text [ en-US ] = "~Path" ; }; + Edit ED_LOGIN_PATH { + HelpId = HID_LOGIN_DLG_PATH; Border = TRUE ; - Pos = MAP_APPFONT ( 72 , 76 ) ; - Size = MAP_APPFONT ( 108 , 12 ) ; - }; - FixedText INFO_LOGIN_PATH - { - Hide = TRUE ; - Pos = MAP_APPFONT ( 72 , 77 ) ; - Size = MAP_APPFONT ( 125 , 10 ) ; + Pos = MAP_APPFONT( 6 , 95 ) ; + Size = MAP_APPFONT( 112 , 12 ) ; }; PushButton BTN_LOGIN_PATH { - Pos = MAP_APPFONT ( 183 , 75 ) ; - Size = MAP_APPFONT ( 14 , 14 ) ; - Text = "~..." ; + HelpId = HID_LOGIN_DLG_BROWSE; + Pos = MAP_APPFONT( 121 , 94 ) ; + Size = MAP_APPFONT( 50 , 14 ) ; + Text = "~Browse..." ; }; + FixedText FT_LOGIN_USERNAME { - Pos = MAP_APPFONT ( 12 , 92 ) ; - Size = MAP_APPFONT ( 57 , 10 ) ; + Pos = MAP_APPFONT( 6 , 110 ) ; + Size = MAP_APPFONT( 165 , 8 ) ; Text [ en-US ] = "~User name" ; }; + Edit ED_LOGIN_USERNAME { + HelpId = HID_LOGIN_DLG_USER_NAME; Border = TRUE ; - Pos = MAP_APPFONT ( 72 , 91 ) ; - Size = MAP_APPFONT ( 125 , 12 ) ; - }; - FixedText INFO_LOGIN_USERNAME - { - Hide = TRUE ; - Pos = MAP_APPFONT ( 72 , 92 ) ; - Size = MAP_APPFONT ( 125 , 10 ) ; + Pos = MAP_APPFONT( 6 , 121 ) ; + Size = MAP_APPFONT( 165 , 12 ) ; }; + FixedText FT_LOGIN_PASSWORD { - Pos = MAP_APPFONT ( 12 , 107 ) ; - Size = MAP_APPFONT ( 57 , 10 ) ; + Pos = MAP_APPFONT( 6 , 136 ) ; + Size = MAP_APPFONT( 165 , 8 ) ; Text [ en-US ] = "Pass~word" ; }; + Edit ED_LOGIN_PASSWORD { + HelpId = HID_LOGIN_DLG_PASSWORD; Border = TRUE ; - Pos = MAP_APPFONT ( 72 , 106 ) ; - Size = MAP_APPFONT ( 125 , 12 ) ; + Pos = MAP_APPFONT( 6 , 147 ) ; + Size = MAP_APPFONT( 165 , 12 ) ; PassWord = TRUE ; }; + FixedText FT_LOGIN_ACCOUNT { - Pos = MAP_APPFONT ( 12 , 122 ) ; - Size = MAP_APPFONT ( 57 , 10 ) ; + Pos = MAP_APPFONT( 6 , 162 ) ; + Size = MAP_APPFONT( 165 , 8 ) ; Text [ en-US ] = "A~ccount"; }; + Edit ED_LOGIN_ACCOUNT { + HelpId = HID_LOGIN_DLG_ACCOUNT; Border = TRUE ; - Pos = MAP_APPFONT ( 72 , 121 ) ; - Size = MAP_APPFONT ( 125 , 12 ) ; + Pos = MAP_APPFONT( 6 , 173 ) ; + Size = MAP_APPFONT( 165 , 12 ) ; PassWord = TRUE ; }; + CheckBox CB_LOGIN_SAVEPASSWORD { - Pos = MAP_APPFONT ( 12 , 136 ) ; - Size = MAP_APPFONT ( 185 , 10 ) ; - Text [ en-US ] = "~Save password" ; + HelpId = HID_LOGIN_DLG_REMEMBER_PASSWORD; + Pos = MAP_APPFONT( 6 , 190 ) ; + Size = MAP_APPFONT( 165 , 10 ) ; + Text [ en-US ] = "~Remember password" ; }; + CheckBox CB_LOGIN_USESYSCREDS { - Pos = MAP_APPFONT ( 12 , 148 ) ; - Size = MAP_APPFONT ( 185 , 10 ) ; - Text [ en-US ] = "~Use System Credentials" ; + HelpId = HID_LOGIN_DLG_USE_SYSTEM_CREDENTIALS; + Pos = MAP_APPFONT( 6 , 203 ) ; + Size = MAP_APPFONT( 165 , 10 ) ; + Text [ en-US ] = "~Use system credentials" ; }; - FixedLine GB_LOGIN_LOGIN + + FixedLine FL_BUTTONS { - Pos = MAP_APPFONT ( 7 , 44 ) ; - Size = MAP_APPFONT ( 197 , 8 ) ; - Text [ en-US ] = "Log in" ; + Pos = MAP_APPFONT( 0 , 216 ) ; + Size = MAP_APPFONT( 177 , 8 ) ; }; + OKButton BTN_LOGIN_OK { - Pos = MAP_APPFONT ( 209 , 6 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; + Pos = MAP_APPFONT( 6 , 227 ) ; + Size = MAP_APPFONT( 50 , 14 ) ; DefButton = TRUE ; }; + CancelButton BTN_LOGIN_CANCEL { - Pos = MAP_APPFONT ( 209 , 23 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; + Pos = MAP_APPFONT( 66 , 227 ) ; + Size = MAP_APPFONT( 50 , 14 ) ; }; + HelpButton BTN_LOGIN_HELP { - Pos = MAP_APPFONT ( 209 , 43 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - }; - String STR_LOGIN_REALM - { - Text [ en-US ] = "Please enter user name and password for \"%2\" on %1 here." ; + Pos = MAP_APPFONT( 121 , 227 ) ; + Size = MAP_APPFONT( 50 , 14 ) ; }; - Text [ en-US ] = "User Name and Password Required" ; }; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/uui/source/loginerr.hxx b/uui/source/loginerr.hxx index c8cbba96564b..ec1317dbd805 100644..100755 --- a/uui/source/loginerr.hxx +++ b/uui/source/loginerr.hxx @@ -25,131 +25,154 @@ * ************************************************************************/ -#ifndef _LOGINERR_HXX -#define _LOGINERR_HXX +#ifndef m_LOGINERR_HXX +#define m_LOGINERR_HXX #include <tools/string.hxx> //========================================================================= -#define LOGINERROR_FLAG_SET_SAVE_PASSWORD 1 -#define LOGINERROR_FLAG_MODIFY_ACCOUNT 2 -#define LOGINERROR_FLAG_MODIFY_USER_NAME 4 -#define LOGINERROR_FLAG_PERSISTENT_PASSWORD 8 -#define LOGINERROR_FLAG_CAN_USE_SYSCREDS 16 -#define LOGINERROR_FLAG_IS_USE_SYSCREDS 32 +#define LOGINERROR_FLAG_MODIFY_ACCOUNT 1 +#define LOGINERROR_FLAG_MODIFY_USER_NAME 2 +#define LOGINERROR_FLAG_CAN_REMEMBER_PASSWORD 4 +#define LOGINERROR_FLAG_IS_REMEMBER_PASSWORD 8 +#define LOGINERROR_FLAG_CAN_USE_SYSCREDS 16 +#define LOGINERROR_FLAG_IS_USE_SYSCREDS 32 +#define LOGINERROR_FLAG_REMEMBER_PERSISTENT 64 class LoginErrorInfo { private: - String _aTitle; - String _aServer; - String _aAccount; - String _aUserName; - String _aPassword; - String _aPath; - String _aErrorText; - BYTE _nFlags; - USHORT _nRet; + String m_aTitle; + String m_aServer; + String m_aAccount; + String m_aUserName; + String m_aPassword; + String m_aPasswordToModify; + String m_aPath; + String m_aErrorText; + BYTE m_nFlags; + USHORT m_nRet; + bool m_bRecommendToOpenReadonly; public: LoginErrorInfo() - : _nFlags( LOGINERROR_FLAG_MODIFY_USER_NAME ), - _nRet( ERRCODE_BUTTON_CANCEL ) + : m_nFlags( LOGINERROR_FLAG_MODIFY_USER_NAME ), + m_nRet( ERRCODE_BUTTON_CANCEL ) { } - const String& GetTitle() const { return _aTitle; } - const String& GetServer() const { return _aServer; } - const String& GetAccount() const { return _aAccount; } - const String& GetUserName() const { return _aUserName; } - const String& GetPassword() const { return _aPassword; } - const String& GetPath() const { return _aPath; } - const String& GetErrorText() const { return _aErrorText; } - BOOL GetIsPersistentPassword() const - { return ( _nFlags & LOGINERROR_FLAG_PERSISTENT_PASSWORD ); } - BOOL GetIsSavePassword() const - { return ( _nFlags & LOGINERROR_FLAG_SET_SAVE_PASSWORD ); } + const String& GetTitle() const { return m_aTitle; } + const String& GetServer() const { return m_aServer; } + const String& GetAccount() const { return m_aAccount; } + const String& GetUserName() const { return m_aUserName; } + const String& GetPassword() const { return m_aPassword; } + const String& GetPasswordToModify() const { return m_aPasswordToModify; } + const bool IsRecommendToOpenReadonly() const { return m_bRecommendToOpenReadonly; } + const String& GetPath() const { return m_aPath; } + const String& GetErrorText() const { return m_aErrorText; } + BOOL GetCanRememberPassword() const { return ( m_nFlags & LOGINERROR_FLAG_CAN_REMEMBER_PASSWORD ); } + BOOL GetIsRememberPersistent() const { return ( m_nFlags & LOGINERROR_FLAG_REMEMBER_PERSISTENT ); } + BOOL GetIsRememberPassword() const { return ( m_nFlags & LOGINERROR_FLAG_IS_REMEMBER_PASSWORD ); } + BOOL GetCanUseSystemCredentials() const - { return ( _nFlags & LOGINERROR_FLAG_CAN_USE_SYSCREDS ); } + { return ( m_nFlags & LOGINERROR_FLAG_CAN_USE_SYSCREDS ); } BOOL GetIsUseSystemCredentials() const - { return ( _nFlags & LOGINERROR_FLAG_IS_USE_SYSCREDS ) == + { return ( m_nFlags & LOGINERROR_FLAG_IS_USE_SYSCREDS ) == LOGINERROR_FLAG_IS_USE_SYSCREDS; } - BYTE GetFlags() const { return _nFlags; } - USHORT GetResult() const { return _nRet; } + BYTE GetFlags() const { return m_nFlags; } + USHORT GetResult() const { return m_nRet; } void SetTitle( const String& aTitle ) - { _aTitle = aTitle; } + { m_aTitle = aTitle; } void SetServer( const String& aServer ) - { _aServer = aServer; } + { m_aServer = aServer; } void SetAccount( const String& aAccount ) - { _aAccount = aAccount; } + { m_aAccount = aAccount; } void SetUserName( const String& aUserName ) - { _aUserName = aUserName; } + { m_aUserName = aUserName; } void SetPassword( const String& aPassword ) - { _aPassword = aPassword; } + { m_aPassword = aPassword; } + void SetPasswordToModify( const String& aPassword ) + { m_aPasswordToModify = aPassword; } + void SetRecommendToOpenReadonly( bool bVal ) + { m_bRecommendToOpenReadonly = bVal; } void SetPath( const String& aPath ) - { _aPath = aPath; } + { m_aPath = aPath; } void SetErrorText( const String& aErrorText ) - { _aErrorText = aErrorText; } + { m_aErrorText = aErrorText; } void SetFlags( BYTE nFlags ) - { _nFlags = nFlags; } - inline void SetSavePassword( BOOL bSet ); - inline void SetPersistentPassword( BOOL bSet ); + { m_nFlags = nFlags; } + + inline void SetCanRememberPassword( BOOL bSet ); + inline void SetIsRememberPassword( BOOL bSet ); + inline void SetIsRememberPersistent( BOOL bSet ); + inline void SetCanUseSystemCredentials( BOOL bSet ); inline void SetIsUseSystemCredentials( BOOL bSet ); inline void SetModifyAccount( BOOL bSet ); inline void SetModifyUserName( BOOL bSet ); + void SetResult( USHORT nRet ) - { _nRet = nRet; } + { m_nRet = nRet; } }; -inline void LoginErrorInfo::SetSavePassword( BOOL bSet ) +inline void LoginErrorInfo::SetCanRememberPassword( BOOL bSet ) { if ( bSet ) - _nFlags |= LOGINERROR_FLAG_SET_SAVE_PASSWORD; + m_nFlags |= LOGINERROR_FLAG_CAN_REMEMBER_PASSWORD; else - _nFlags &= ~LOGINERROR_FLAG_SET_SAVE_PASSWORD; + m_nFlags &= ~LOGINERROR_FLAG_CAN_REMEMBER_PASSWORD; } -inline void LoginErrorInfo::SetPersistentPassword( BOOL bSet ) +inline void LoginErrorInfo::SetIsRememberPassword( BOOL bSet ) { if ( bSet ) - _nFlags |= LOGINERROR_FLAG_PERSISTENT_PASSWORD; + m_nFlags |= LOGINERROR_FLAG_IS_REMEMBER_PASSWORD; else - _nFlags &= ~LOGINERROR_FLAG_PERSISTENT_PASSWORD; + m_nFlags &= ~LOGINERROR_FLAG_IS_REMEMBER_PASSWORD; +} + +inline void LoginErrorInfo::SetIsRememberPersistent( BOOL bSet ) +{ + if ( bSet ) + m_nFlags |= LOGINERROR_FLAG_REMEMBER_PERSISTENT; + else + m_nFlags &= ~LOGINERROR_FLAG_REMEMBER_PERSISTENT; } inline void LoginErrorInfo::SetCanUseSystemCredentials( BOOL bSet ) { if ( bSet ) - _nFlags |= LOGINERROR_FLAG_CAN_USE_SYSCREDS; + m_nFlags |= LOGINERROR_FLAG_CAN_USE_SYSCREDS; else - _nFlags &= ~LOGINERROR_FLAG_CAN_USE_SYSCREDS; + m_nFlags &= ~LOGINERROR_FLAG_CAN_USE_SYSCREDS; } inline void LoginErrorInfo::SetIsUseSystemCredentials( BOOL bSet ) { if ( bSet ) - _nFlags |= LOGINERROR_FLAG_IS_USE_SYSCREDS; + m_nFlags |= LOGINERROR_FLAG_IS_USE_SYSCREDS; else - _nFlags &= ~LOGINERROR_FLAG_IS_USE_SYSCREDS; + m_nFlags &= ~LOGINERROR_FLAG_IS_USE_SYSCREDS; } inline void LoginErrorInfo::SetModifyAccount( BOOL bSet ) { if ( bSet ) - _nFlags |= LOGINERROR_FLAG_MODIFY_ACCOUNT; + m_nFlags |= LOGINERROR_FLAG_MODIFY_ACCOUNT; else - _nFlags &= ~LOGINERROR_FLAG_MODIFY_ACCOUNT; + m_nFlags &= ~LOGINERROR_FLAG_MODIFY_ACCOUNT; } inline void LoginErrorInfo::SetModifyUserName( BOOL bSet ) { if ( bSet ) - _nFlags |= LOGINERROR_FLAG_MODIFY_USER_NAME; + m_nFlags |= LOGINERROR_FLAG_MODIFY_USER_NAME; else - _nFlags &= ~LOGINERROR_FLAG_MODIFY_USER_NAME; + m_nFlags &= ~LOGINERROR_FLAG_MODIFY_USER_NAME; } #endif + + diff --git a/uui/source/passwordcontainer.cxx b/uui/source/passwordcontainer.cxx index 26d22b320d8a..0a056289c29d 100644 --- a/uui/source/passwordcontainer.cxx +++ b/uui/source/passwordcontainer.cxx @@ -30,6 +30,7 @@ #include "com/sun/star/lang/XMultiServiceFactory.hpp" #include "com/sun/star/task/NoMasterException.hpp" #include "com/sun/star/task/XInteractionHandler.hpp" +#include "com/sun/star/task/XMasterPasswordHandling.hpp" #include "com/sun/star/task/XPasswordContainer.hpp" #include "com/sun/star/task/XUrlContainer.hpp" #include "com/sun/star/ucb/AuthenticationRequest.hpp" @@ -271,10 +272,20 @@ bool PasswordContainerHelper::addRecord( return false; if ( bPersist ) + { + uno::Reference< task::XMasterPasswordHandling > xMPH( + m_xPasswordContainer, uno::UNO_QUERY_THROW ); + + // If persistent storing of passwords is not yet + // allowed, enable it. + if ( !xMPH->isPersistentStoringAllowed() ) + xMPH->allowPersistentStoring( sal_True ); + m_xPasswordContainer->addPersistent( rURL, rUsername, rPasswords, xIH ); + } else m_xPasswordContainer->add( rURL, rUsername, @@ -429,7 +440,7 @@ PasswordContainerInteractionHandler::handle( // @@@ FIXME: this not able to // handle master pw request! // master pw request is never - // solvabe without UI! + // solvable without UI! this ) ) { // successfully handled diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx index 4962563601c3..c89184f54bc1 100644..100755 --- 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 ); diff --git a/uui/source/passworddlg.hxx b/uui/source/passworddlg.hxx index d07399012616..fe5fe7f2ef84 100644..100755 --- a/uui/source/passworddlg.hxx +++ b/uui/source/passworddlg.hxx @@ -50,7 +50,7 @@ class PasswordDialog : public ModalDialog DECL_LINK( OKHdl_Impl, OKButton * ); public: - PasswordDialog( Window* pParent, ::com::sun::star::task::PasswordRequestMode nDlgMode, ResMgr * pResMgr, ::rtl::OUString& aDocURL ); + PasswordDialog( Window* pParent, ::com::sun::star::task::PasswordRequestMode nDlgMode, ResMgr * pResMgr, ::rtl::OUString& aDocURL, bool bOpenToModify = false ); String GetPassword() const { return aEDPassword.GetText(); } diff --git a/uui/source/passworddlg.src b/uui/source/passworddlg.src index 96863ad9ca32..33767057e1bd 100644..100755 --- a/uui/source/passworddlg.src +++ b/uui/source/passworddlg.src @@ -41,27 +41,33 @@ ModalDialog DLG_UUI_PASSWORD Moveable = TRUE ; OutputSize = TRUE ; SVLook = TRUE ; - Size = MAP_APPFONT( 145, 75 ); + Size = MAP_APPFONT( 145, 91 ); Text [ en-US ] = "Enter password"; + FixedText FT_PASSWORD { Pos = MAP_APPFONT( 3, 4 ); Size = MAP_APPFONT( 139, 28 ); - Text [ en-US ] = "Enter password to open file: \n"; WordBreak = TRUE; }; Edit ED_PASSWORD { - Pos = MAP_APPFONT( 3, 35 ); + Pos = MAP_APPFONT( 3, 51 ); Size = MAP_APPFONT( 139, 13 ); Border = TRUE ; PassWord = TRUE ; }; + FixedLine FL_FIXED_LINE_1 + { + Pos = MAP_APPFONT( 0, 66 ); + Size = MAP_APPFONT( 145, 6 ); + }; + OKButton BTN_PASSWORD_OK { - Pos = MAP_APPFONT( 27, 56 ); + Pos = MAP_APPFONT( 27, 72 ); Size = MAP_APPFONT( 37, 15 ); DefButton = TRUE ; DefButton = TRUE; @@ -69,20 +75,24 @@ ModalDialog DLG_UUI_PASSWORD CancelButton BTN_PASSWORD_CANCEL { - Pos = MAP_APPFONT( 66, 56 ); + Pos = MAP_APPFONT( 66, 72 ); Size = MAP_APPFONT( 37, 15 ); }; HelpButton BTN_PASSWORD_HELP { - Pos = MAP_APPFONT( 105, 56 ); + Pos = MAP_APPFONT( 105, 72 ); Size = MAP_APPFONT( 37, 15 ); }; - FixedLine FL_FIXED_LINE_1 + String STR_ENTER_PASSWORD_TO_OPEN { - Pos = MAP_APPFONT( 0, 50 ); - Size = MAP_APPFONT( 145, 6 ); + Text [ en-US ] = "Enter password to open file: \n"; + }; + + String STR_ENTER_PASSWORD_TO_MODIFY + { + Text [ en-US ] = "Enter password to modify file: \n"; }; }; diff --git a/uui/source/passworderrs.src b/uui/source/passworderrs.src index fe631257c9d2..91b244ae543e 100644..100755 --- a/uui/source/passworderrs.src +++ b/uui/source/passworderrs.src @@ -31,9 +31,14 @@ #include <ids.hrc> #endif -String STR_ERROR_PASSWORD_WRONG +String STR_ERROR_PASSWORD_TO_OPEN_WRONG { - Text [ en-US ] = "The password is incorrect. The document cannot be opened."; + Text [ en-US ] = "The password is incorrect. The file cannot be opened."; +}; + +String STR_ERROR_PASSWORD_TO_MODIFY_WRONG +{ + Text [ en-US ] = "The password is incorrect. The file cannot be modified."; }; String STR_ERROR_MASTERPASSWORD_WRONG |