summaryrefslogtreecommitdiff
path: root/uui
diff options
context:
space:
mode:
authorXiaofei Zhang <Zhangxiaofei@openoffice.org>2010-11-10 13:50:33 +0800
committerXiaofei Zhang <Zhangxiaofei@openoffice.org>2010-11-10 13:50:33 +0800
commit8c3fc316ba4b8ebd3900273c788e98130b3dbe4e (patch)
treefaab853a943d7c0b5a990406fd8213c294794fa7 /uui
parent61e3d4b9cfe7dc0721ee01cabc2702d0ef4932a0 (diff)
parentc6855c9a268d45364f3d7e951c101b256eb9df7d (diff)
removetooltypes01: #i112600# resync to DEV300_m92; remove tooltypes from xmloff, linguistic, vcl, svtools, accessibility, fpicker, uui and framework
Diffstat (limited to 'uui')
-rw-r--r--uui/prj/build.lst2
-rw-r--r--uui/prj/d.lst1
-rw-r--r--uui/source/cookiedg.cxx12
-rw-r--r--uui/source/cookiedg.src5
-rw-r--r--uui/source/fltdlg.cxx6
-rw-r--r--uui/source/fltdlg.src1
-rw-r--r--uui/source/iahndl-authentication.cxx167
-rw-r--r--uui/source/iahndl-errorhandler.cxx8
-rwxr-xr-xuui/source/iahndl.cxx83
-rwxr-xr-xuui/source/iahndl.hxx5
-rw-r--r--uui/source/ids.hrc273
-rw-r--r--uui/source/logindlg.cxx182
-rw-r--r--uui/source/logindlg.hrc30
-rw-r--r--uui/source/logindlg.hxx58
-rw-r--r--uui/source/logindlg.src194
-rw-r--r--uui/source/loginerr.hxx162
-rwxr-xr-x[-rw-r--r--]uui/source/makefile.mk4
-rw-r--r--uui/source/masterpasscrtdlg.cxx2
-rw-r--r--uui/source/masterpasscrtdlg.src4
-rw-r--r--uui/source/masterpassworddlg.src1
-rwxr-xr-xuui/source/nameclashdlg.cxx107
-rwxr-xr-x[-rw-r--r--]uui/source/nameclashdlg.hrc (renamed from uui/source/passcrtdlg.hrc)26
-rwxr-xr-x[-rw-r--r--]uui/source/nameclashdlg.hxx (renamed from uui/source/passcrtdlg.hxx)56
-rw-r--r--uui/source/nameclashdlg.src116
-rw-r--r--uui/source/newerverwarn.src1
-rw-r--r--uui/source/passcrtdlg.cxx128
-rw-r--r--uui/source/passcrtdlg.src108
-rw-r--r--uui/source/passwordcontainer.hxx2
-rw-r--r--uui/source/passworddlg.cxx150
-rw-r--r--uui/source/passworddlg.hrc18
-rw-r--r--uui/source/passworddlg.hxx10
-rw-r--r--uui/source/passworddlg.src86
-rw-r--r--uui/source/passworderrs.src16
-rw-r--r--uui/source/secmacrowarnings.src2
-rw-r--r--uui/source/services.cxx80
-rw-r--r--uui/source/sslwarndlg.src2
-rw-r--r--uui/source/unknownauthdlg.src4
-rw-r--r--uui/util/makefile.mk8
-rw-r--r--uui/util/uui.component44
39 files changed, 1157 insertions, 1007 deletions
diff --git a/uui/prj/build.lst b/uui/prj/build.lst
index 0ebacfcb81..dbe31cb1b5 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/prj/d.lst b/uui/prj/d.lst
index 30c6f812fd..46b0118319 100644
--- a/uui/prj/d.lst
+++ b/uui/prj/d.lst
@@ -7,3 +7,4 @@ mkdir: %COMMON_DEST%\bin%_EXT%\hid
..\%__SRC%\lib\iuui.lib %_DEST%\lib%_EXT%\iuui.lib
..\util\uui.xml %_DEST%\xml%_EXT%\uui.xml
+..\%__SRC%\misc\uui.component %_DEST%\xml%_EXT%\uui.component
diff --git a/uui/source/cookiedg.cxx b/uui/source/cookiedg.cxx
index fea8b9a274..5e3e338e28 100644
--- a/uui/source/cookiedg.cxx
+++ b/uui/source/cookiedg.cxx
@@ -80,7 +80,7 @@ CookiesDialog::CookiesDialog( Window* pParent,
maCookieFB.SetPosSizePixel( LogicToPixel( aPoint ), aSize );
maCookieFB.Show();
- USHORT nOffset = CNTHTTP_COOKIE_REQUEST_RECV == mpCookieRequest->m_eType
+ sal_uInt16 nOffset = CNTHTTP_COOKIE_REQUEST_RECV == mpCookieRequest->m_eType
? 0 : STR_COOKIES_SEND_START - STR_COOKIES_RECV_START;
INetURLObject aObj( mpCookieRequest->m_rURL );
SetText( String( ResId( STR_COOKIES_RECV_TITLE + nOffset, *pResMgr ) ) );
@@ -91,7 +91,7 @@ CookiesDialog::CookiesDialog( Window* pParent,
List& rList =mpCookieRequest->m_rCookieList;
String aPair, aCookie;
- for ( USHORT i = (USHORT)rList.Count(); i--; )
+ for ( sal_uInt16 i = (sal_uInt16)rList.Count(); i--; )
{
CntHTTPCookie* pCookie = (CntHTTPCookie*)rList.GetObject(i);
@@ -107,7 +107,7 @@ CookiesDialog::CookiesDialog( Window* pParent,
aMsg += aCookie;
}
}
- maInFutureInteractiveBtn.Check( TRUE );
+ maInFutureInteractiveBtn.Check( sal_True );
maCookieFT.SetText( aMsg );
}
@@ -117,7 +117,7 @@ short CookiesDialog::Execute()
{
maSendBtn.GrabFocus();
short nRet = ModalDialog::Execute();
- USHORT nStatus = CNTHTTP_COOKIE_POLICY_INTERACTIVE;
+ sal_uInt16 nStatus = CNTHTTP_COOKIE_POLICY_INTERACTIVE;
if ( maInFutureSendBtn.IsChecked() )
nStatus = CNTHTTP_COOKIE_POLICY_ACCEPTED;
@@ -126,9 +126,9 @@ short CookiesDialog::Execute()
nStatus = CNTHTTP_COOKIE_POLICY_BANNED;
List& rList = mpCookieRequest->m_rCookieList;
- for ( USHORT i = (USHORT)rList.Count(); i--; )
+ for ( sal_uInt16 i = (sal_uInt16)rList.Count(); i--; )
{
- USHORT& rStatus = ( (CntHTTPCookie*)rList.GetObject(i) )->m_nPolicy;
+ sal_uInt16& rStatus = ( (CntHTTPCookie*)rList.GetObject(i) )->m_nPolicy;
if ( rStatus == CNTHTTP_COOKIE_POLICY_INTERACTIVE )
rStatus = nStatus;
diff --git a/uui/source/cookiedg.src b/uui/source/cookiedg.src
index 0737ff3f5c..6120acaefb 100644
--- a/uui/source/cookiedg.src
+++ b/uui/source/cookiedg.src
@@ -64,18 +64,21 @@ ModalDialog DLG_COOKIES
};
RadioButton RB_INFUTURE_SEND
{
+ HelpID = "uui:RadioButton:DLG_COOKIES:RB_INFUTURE_SEND";
Pos = MAP_APPFONT ( 12 , 171 ) ;
Size = MAP_APPFONT ( 52 , 10 ) ;
Text [ en-US ] = "~Send" ;
};
RadioButton RB_INFUTURE_IGNORE
{
+ HelpID = "uui:RadioButton:DLG_COOKIES:RB_INFUTURE_IGNORE";
Pos = MAP_APPFONT ( 67 , 171 ) ;
Size = MAP_APPFONT ( 52 , 10 ) ;
Text [ en-US ] = "I~gnore" ;
};
RadioButton RB_INFUTURE_INTERACTIVE
{
+ HelpID = "uui:RadioButton:DLG_COOKIES:RB_INFUTURE_INTERACTIVE";
Pos = MAP_APPFONT ( 122 , 171 ) ;
Size = MAP_APPFONT ( 52 , 10 ) ;
Text [ en-US ] = "I~nteractive" ;
@@ -90,12 +93,14 @@ ModalDialog DLG_COOKIES
};
PushButton BTN_COOKIES_CANCEL
{
+ HelpID = "uui:PushButton:DLG_COOKIES:BTN_COOKIES_CANCEL";
Pos = MAP_APPFONT ( 186 , 173 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Ignore" ;
};
PushButton BTN_COOKIES_OK
{
+ HelpID = "uui:PushButton:DLG_COOKIES:BTN_COOKIES_OK";
Pos = MAP_APPFONT ( 239 , 173 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
DefButton = TRUE ;
diff --git a/uui/source/fltdlg.cxx b/uui/source/fltdlg.cxx
index 3c09d66767..9afae25cf4 100644
--- a/uui/source/fltdlg.cxx
+++ b/uui/source/fltdlg.cxx
@@ -140,15 +140,15 @@ void FilterDialog::ChangeFilters( const FilterNameList* pFilterNames )
/*-************************************************************************************************************//**
@short ask user for his decision
@descr We show the dialog and if user finish it with "OK" - we try to find selected item in internal saved
- name list (which you must set in "ChangeFilters()"!). If we return TRUE as result, you can use out
+ name list (which you must set in "ChangeFilters()"!). If we return sal_True as result, you can use out
parameter "pSelectedItem" as pointer into your FilterNameList to get selected item realy ...
- but if we return FALSE ... user hsa cancel the dialog ... you shouldnt do that. pSelectedItem isnt
+ but if we return sal_False ... user hsa cancel the dialog ... you shouldnt do that. pSelectedItem isnt
set to any valid value then. We don't change them ...
@seealso method ChangeFilters()
@param "pSelectedItem", returns result of selection as pointer into set list of filter names
- (valid for function return TRUE only!)
+ (valid for function return sal_True only!)
@return true => pSelectedItem parameter points into name list and represent use decision
false => use has cancelled dialog (pSelectedItem isnt valid then!)
diff --git a/uui/source/fltdlg.src b/uui/source/fltdlg.src
index 82b230e38f..e2c6162f97 100644
--- a/uui/source/fltdlg.src
+++ b/uui/source/fltdlg.src
@@ -53,6 +53,7 @@ ModalDialog DLG_FILTER_SELECT
ListBox LB_FILTERS
{
+ HelpID = "uui:ListBox:DLG_FILTER_SELECT:LB_FILTERS";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 19 ) ;
Size = MAP_APPFONT ( 182 , 175 ) ;
diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx
index f5599595fe..8aea8c6b89 100644
--- 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"
@@ -47,7 +52,6 @@
#include "logindlg.hxx"
#include "masterpasscrtdlg.hxx"
#include "masterpassworddlg.hxx"
-#include "passcrtdlg.hxx"
#include "passworddlg.hxx"
#include "iahndl.hxx"
@@ -67,8 +71,7 @@ executeLoginDialog(
{
vos::OGuard aGuard(Application::GetSolarMutex());
- bool bAccount
- = (rInfo.GetFlags() & LOGINERROR_FLAG_MODIFY_ACCOUNT) != 0;
+ bool bAccount = (rInfo.GetFlags() & LOGINERROR_FLAG_MODIFY_ACCOUNT) != 0;
bool bSavePassword = rInfo.GetCanRememberPassword();
bool bCanUseSysCreds = rInfo.GetCanUseSystemCredentials();
@@ -88,15 +91,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());
@@ -118,8 +116,7 @@ executeLoginDialog(
}
if ( bCanUseSysCreds )
- xDialog->SetUseSystemCredentials(
- rInfo.GetIsUseSystemCredentials() );
+ xDialog->SetUseSystemCredentials( rInfo.GetIsUseSystemCredentials() );
rInfo.SetResult(xDialog->Execute() == RET_OK ? ERRCODE_BUTTON_OK :
ERRCODE_BUTTON_CANCEL);
@@ -272,7 +269,7 @@ handleAuthenticationRequest_(
aInfo.SetCanRememberPassword(
ePreferredRememberMode != eAlternateRememberMode);
aInfo.SetIsRememberPassword(
- eDefaultRememberMode != ucb::RememberAuthentication_NO);
+ ePreferredRememberMode == eDefaultRememberMode);
aInfo.SetIsRememberPersistent(
ePreferredRememberMode == ucb::RememberAuthentication_PERSISTENT);
@@ -521,7 +518,9 @@ executePasswordDialog(
LoginErrorInfo & rInfo,
task::PasswordRequestMode nMode,
::rtl::OUString aDocName,
- bool bMSCryptoMode)
+ bool bMSCryptoMode,
+ bool bIsPasswordToModify,
+ bool bIsSimplePasswordRequest )
SAL_THROW((uno::RuntimeException))
{
try
@@ -532,23 +531,40 @@ executePasswordDialog(
ResMgr::CreateResMgr(CREATEVERSIONRESMGR_NAME(uui)));
if( nMode == task::PasswordRequestMode_PASSWORD_CREATE )
{
- std::auto_ptr< PasswordCreateDialog > xDialog(
- new PasswordCreateDialog(pParent,
- xManager.get(),
- bMSCryptoMode));
+ if (bIsSimplePasswordRequest)
+ {
+ std::auto_ptr< PasswordDialog > pDialog(
+ new PasswordDialog( pParent, nMode, xManager.get(), aDocName,
+ bIsPasswordToModify, bIsSimplePasswordRequest ) );
+ pDialog->SetMinLen(0);
- 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( pDialog->GetPassword() );
+ }
+ else
+ {
+ const sal_uInt16 nMaxPasswdLen = bMSCryptoMode ? 15 : 0; // 0 -> allow any length
+
+ 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
+ else // enter password or reenter password
{
- std::auto_ptr< PasswordDialog > xDialog(
- new PasswordDialog(pParent, nMode, xManager.get(), aDocName));
-
- rInfo.SetResult(xDialog->Execute()
- == RET_OK ? ERRCODE_BUTTON_OK : ERRCODE_BUTTON_CANCEL);
- rInfo.SetPassword( xDialog->GetPassword() );
+ std::auto_ptr< PasswordDialog > pDialog(
+ new PasswordDialog( pParent, nMode, xManager.get(), aDocName,
+ bIsPasswordToModify, bIsSimplePasswordRequest ) );
+ pDialog->SetMinLen(0);
+
+ 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 &)
@@ -566,26 +582,37 @@ handlePasswordRequest_(
uno::Sequence< uno::Reference< task::XInteractionContinuation > > const &
rContinuations,
::rtl::OUString aDocumentName,
- bool bMSCryptoMode )
+ bool bMSCryptoMode,
+ bool bIsPasswordToModify,
+ bool bIsSimplePasswordRequest = false )
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, bIsSimplePasswordRequest );
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();
}
@@ -661,27 +688,66 @@ 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))
{
- handlePasswordRequest_(getParentProperty(),
- aDocumentMSPasswordRequest.Mode,
- rRequest->getContinuations(),
- aDocumentMSPasswordRequest.Name,
- true /* bool bMSCryptoMode */);
+ 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;
}
@@ -692,9 +758,12 @@ UUIInteractionHelper::handlePasswordRequest(
aPasswordRequest.Mode,
rRequest->getContinuations(),
rtl::OUString(),
- false /* bool bMSCryptoMode */);
+ false /* bool bMSCryptoMode */,
+ false /* bool bIsPasswordToModify */,
+ true /* bool bIsSimplePasswordRequest */ );
return true;
}
return false;
}
+
diff --git a/uui/source/iahndl-errorhandler.cxx b/uui/source/iahndl-errorhandler.cxx
index 6388a900cf..588c011414 100644
--- a/uui/source/iahndl-errorhandler.cxx
+++ b/uui/source/iahndl-errorhandler.cxx
@@ -48,7 +48,7 @@ using namespace com::sun::star;
namespace {
-USHORT
+sal_uInt16
executeErrorDialog(
Window * pParent,
task::InteractionClassification eClassification,
@@ -112,7 +112,7 @@ executeErrorDialog(
uno::Reference< uno::XInterface >());
}
- USHORT aResult = xBox->Execute();
+ sal_uInt16 aResult = xBox->Execute();
switch( aResult )
{
case BUTTONID_OK:
@@ -164,7 +164,7 @@ UUIInteractionHelper::handleErrorHandlerRequest(
CREATEVERSIONRESMGR_NAME(cnt),
CREATEVERSIONRESMGR_NAME(svx),
CREATEVERSIONRESMGR_NAME(uui) };
- static USHORT const aId[4]
+ static sal_uInt16 const aId[4]
= { RID_ERRHDL,
RID_CHAOS_START + 12,
// cf. chaos/source/inc/cntrids.hrc, where
@@ -276,7 +276,7 @@ UUIInteractionHelper::handleErrorHandlerRequest(
}
}
- USHORT nResult = executeErrorDialog(
+ sal_uInt16 nResult = executeErrorDialog(
getParentProperty(), eClassification, aContext, aMessage, nButtonMask );
switch (nResult)
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index e90a064993..9252854009 100755
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -89,6 +89,7 @@
#include "newerverwarn.hxx"
#include "iahndl.hxx"
+#include "nameclashdlg.hxx"
/** === begin UNO using === **/
using ::com::sun::star::uno::Sequence;
@@ -185,7 +186,7 @@ UUIInteractionHelper::handleRequest(
HandleData aHD(rRequest);
Link aLink(&aHD,handlerequest);
pApp->PostUserEvent(aLink,this);
- ULONG locks = Application::ReleaseSolarMutex();
+ sal_uIntPtr locks = Application::ReleaseSolarMutex();
aHD.wait();
Application::AcquireSolarMutex(locks);
return aHD.bHandled;
@@ -246,7 +247,7 @@ UUIInteractionHelper::getStringFromRequest(
HandleData aHD(rRequest);
Link aLink(&aHD,getstringfromrequest);
pApp->PostUserEvent(aLink,this);
- ULONG locks = Application::ReleaseSolarMutex();
+ sal_uIntPtr locks = Application::ReleaseSolarMutex();
aHD.wait();
Application::AcquireSolarMutex(locks);
return aHD.m_aResult;
@@ -867,8 +868,6 @@ UUIInteractionHelper::handleRequest_impl(
if ( handleCertificateValidationRequest( rRequest ) )
return true;
-// @@@ Todo #i29340#: activate!
-#if 0
ucb::NameClashResolveRequest aNameClashResolveRequest;
if (aAnyRequest >>= aNameClashResolveRequest)
{
@@ -876,7 +875,7 @@ UUIInteractionHelper::handleRequest_impl(
rRequest->getContinuations());
return true;
}
-#endif
+
if ( handleMasterPasswordRequest( rRequest ) )
return true;
@@ -1153,7 +1152,7 @@ UUIInteractionHelper::getInteractionHandler()
namespace {
-USHORT
+sal_uInt16
executeMessageBox(
Window * pParent,
rtl::OUString const & rTitle,
@@ -1165,7 +1164,7 @@ executeMessageBox(
MessBox xBox( pParent, nButtonMask, rTitle, rMessage );
- USHORT aResult = xBox.Execute();
+ sal_uInt16 aResult = xBox.Execute();
switch( aResult )
{
case BUTTONID_OK:
@@ -1188,40 +1187,26 @@ executeMessageBox(
return aResult;
}
-// @@@ Todo #i29340#: activate!
-#if 0
-enum NameClashResolveDialogResult { ABORT, RENAME, OVERWRITE };
-
-NameClashResolveDialogResult
-executeNameClashResolveDialog(
- Window * /*pParent*/,
- rtl::OUString const & /*rTargetFolderURL*/,
- rtl::OUString const & /*rClashingName*/,
- rtl::OUString & /*rProposedNewName*/)
+NameClashResolveDialogResult executeSimpleNameClashResolveDialog( Window *pParent,
+ rtl::OUString const & rTargetFolderURL,
+ rtl::OUString const & rClashingName,
+ rtl::OUString & rProposedNewName,
+ bool bAllowOverwrite )
{
- // @@@ Todo DV: execute overwrite-rename dialog, deliver result
- OSL_ENSURE( false,
- "executeNameClashResolveDialog not yet implemented!" );
- return ABORT;
-}
+ std::auto_ptr< ResMgr > xManager( ResMgr::CreateResMgr( CREATEVERSIONRESMGR_NAME( uui ) ) );
+ if ( !xManager.get() )
+ return ABORT;
-NameClashResolveDialogResult
-executeSimpleNameClashResolveDialog(
- Window * /*pParent*/,
- rtl::OUString const & /*rTargetFolderURL*/,
- rtl::OUString const & /*rClashingName*/,
- rtl::OUString & /*rProposedNewName*/)
-{
- // @@@ Todo DV: execute rename-only dialog, deliver result
- OSL_ENSURE( false,
- "executeSimpleNameClashResolveDialog not yet implemented!" );
- return ABORT;
+ NameClashDialog aDialog( pParent, xManager.get(), rTargetFolderURL,
+ rClashingName, rProposedNewName, bAllowOverwrite );
+
+ NameClashResolveDialogResult eResult = (NameClashResolveDialogResult) aDialog.Execute();
+ rProposedNewName = aDialog.getNewName();
+ return eResult;
}
-#endif
+
} // namespace
-// @@@ Todo #i29340#: activate!
-#if 0
void
UUIInteractionHelper::handleNameClashResolveRequest(
ucb::NameClashResolveRequest const & rRequest,
@@ -1251,18 +1236,12 @@ UUIInteractionHelper::handleNameClashResolveRequest(
NameClashResolveDialogResult eResult = ABORT;
rtl::OUString aProposedNewName( rRequest.ProposedNewName );
- if ( xReplaceExistingData.is() )
- eResult = executeNameClashResolveDialog(
- getParentProperty(),
- rRequest.TargetFolderURL,
- rRequest.ClashingName,
- aProposedNewName);
- else
- eResult = executeSimpleNameClashResolveDialog(
- getParentProperty(),
- rRequest.TargetFolderURL,
- rRequest.ClashingName,
- aProposedNewName);
+
+ eResult = executeSimpleNameClashResolveDialog( getParentProperty(),
+ rRequest.TargetFolderURL,
+ rRequest.ClashingName,
+ aProposedNewName,
+ xReplaceExistingData.is() );
switch ( eResult )
{
@@ -1282,14 +1261,8 @@ UUIInteractionHelper::handleNameClashResolveRequest(
"No ReplaceExistingData continuation available!" );
xReplaceExistingData->select();
break;
-
- default:
- OSL_ENSURE( false, "Unknown NameClashResolveDialogResult value. "
- "Interaction Request not handled!" );
- break;
}
}
-#endif
void
UUIInteractionHelper::handleGenericErrorRequest(
@@ -1603,7 +1576,7 @@ ErrorResource::getString(ErrCode nErrorCode, rtl::OUString * pString)
const SAL_THROW(())
{
OSL_ENSURE(pString, "specification violation");
- ResId aResId(static_cast< USHORT >(nErrorCode & ERRCODE_RES_MASK),
+ ResId aResId(static_cast< sal_uInt16 >(nErrorCode & ERRCODE_RES_MASK),
*m_pResMgr);
aResId.SetRT(RSC_STRING);
if (!IsAvailableRes(aResId))
diff --git a/uui/source/iahndl.hxx b/uui/source/iahndl.hxx
index 0f54e9ee8a..fd97a7ceba 100755
--- a/uui/source/iahndl.hxx
+++ b/uui/source/iahndl.hxx
@@ -39,7 +39,7 @@
#include "com/sun/star/beans/Optional.hpp"
#include "com/sun/star/task/InteractionClassification.hpp"
-#include "tools/solar.h" // USHORT
+#include "tools/solar.h" // sal_uInt16
#include "tools/errcode.hxx" // ErrCode
#include "tools/rc.hxx" // Resource
#include "vcl/wintypes.hxx" // WinBits
@@ -215,8 +215,6 @@ 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,
@@ -225,7 +223,6 @@ 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 d7b8ae15d7..23e377f4dd 100644
--- a/uui/source/ids.hrc
+++ b/uui/source/ids.hrc
@@ -35,126 +35,136 @@
#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 DLG_SIMPLE_NAME_CLASH (RID_UUI_START + 13)
+#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 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 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 STR_ERROR_SIMPLE_PASSWORD_WRONG (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 STR_RENAME_OR_REPLACE (RID_UUI_START + 58)
+#define STR_NAME_CLASH_RENAME_ONLY (RID_UUI_START + 59)
+#define STR_SAME_NAME_USED (RID_UUI_START + 60)
+#define STR_ENTER_SIMPLE_PASSWORD (RID_UUI_START + 61)
+#define STR_CONFIRM_SIMPLE_PASSWORD (RID_UUI_START + 62)
-#define ERRCODE_AREA_UUI_UNKNOWNAUTH 25000
-#define SSLWARN_TYPE_DOMAINMISMATCH 10
-#define SSLWARN_TYPE_EXPIRED 20
-#define SSLWARN_TYPE_INVALID 30
+#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_UUI_UNKNOWNAUTH_UNTRUSTED (ERRCODE_AREA_UUI_UNKNOWNAUTH + 1)
@@ -167,17 +177,26 @@
#define ERRCODE_UUI_SSLWARN_INVALID_1 (ERRCODE_AREA_UUI_UNKNOWNAUTH + SSLWARN_TYPE_INVALID + 1)
#define TITLE_UUI_SSLWARN_INVALID (ERRCODE_AREA_UUI_UNKNOWNAUTH + SSLWARN_TYPE_INVALID + 3)
-#define HID_DLG_LOGIN (HID_UUI_START + 0)
-#define HID_DLG_COOKIES (HID_UUI_START + 1)
-#define HID_DLG_MASTERPASSWORD_UUI (HID_UUI_START+2)
-#define HID_DLG_MASTERPASSWORD_CRT (HID_UUI_START+3)
-#define HID_DLG_FILTER_SELECT (HID_UUI_START+4)
-#define HID_DLG_PASSWORD_UUI (HID_UUI_START+5)
-#define HID_DLG_PASSWORD_CRT (HID_UUI_START+6)
-#define HID_DLG_UNKNOWNAUTH_UUI (HID_UUI_START+7)
-#define HID_DLG_SSLWARN_UUI (HID_UUI_START+8)
-#define HID_XMLSECDLG_MACROWARN (HID_UUI_START+9)
-#define HID_DLG_NEWERVERSIONWARNING (HID_UUI_START+10)
+#define HID_DLG_LOGIN "UUI_HID_DLG_LOGIN"
+#define HID_DLG_COOKIES "UUI_HID_DLG_COOKIES"
+#define HID_DLG_MASTERPASSWORD_UUI "UUI_HID_DLG_MASTERPASSWORD_UUI"
+#define HID_DLG_MASTERPASSWORD_CRT "UUI_HID_DLG_MASTERPASSWORD_CRT"
+#define HID_DLG_FILTER_SELECT "UUI_HID_DLG_FILTER_SELECT"
+#define HID_DLG_PASSWORD_UUI "UUI_HID_DLG_PASSWORD_UUI"
+#define HID_DLG_PASSWORD_CRT "UUI_HID_DLG_PASSWORD_CRT"
+#define HID_DLG_UNKNOWNAUTH_UUI "UUI_HID_DLG_UNKNOWNAUTH_UUI"
+#define HID_DLG_SSLWARN_UUI "UUI_HID_DLG_SSLWARN_UUI"
+#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"
+#define HID_DLG_SIMPLE_NAME_CLASH "UUI_HID_DLG_SIMPLE_NAME_CLASH"
// HID_UUI_END (aka HID_CHAOS_NEW_DATABASE) is reserved in
// sfx2/util/hidother.src
diff --git a/uui/source/logindlg.cxx b/uui/source/logindlg.cxx
index 4bfa2147ec..5901790eff 100644
--- a/uui/source/logindlg.cxx
+++ b/uui/source/logindlg.cxx
@@ -47,25 +47,32 @@
//............................................................................
//............................................................................
-void LoginDialog::HideControls_Impl( USHORT nFlags )
+static void lcl_Move( Window &rWin, long nOffset )
{
- FASTBOOL bPathHide = FALSE;
- FASTBOOL bErrorHide = FALSE;
- FASTBOOL bAccountHide = FALSE;
- FASTBOOL bUseSysCredsHide = FALSE;
+ Point aTmp( rWin.GetPosPixel() );
+ aTmp.Y() -= nOffset;
+ rWin.SetPosPixel( aTmp );
+}
+
+
+void LoginDialog::HideControls_Impl( sal_uInt16 nFlags )
+{
+ bool bPathHide = sal_False;
+ bool bErrorHide = sal_False;
+ bool bAccountHide = sal_False;
+ bool bUseSysCredsHide = sal_False;
if ( ( nFlags & LF_NO_PATH ) == LF_NO_PATH )
{
aPathFT.Hide();
aPathED.Hide();
aPathBtn.Hide();
- bPathHide = TRUE;
+ bPathHide = sal_True;
}
else if ( ( nFlags & LF_PATH_READONLY ) == LF_PATH_READONLY )
{
- aPathED.Hide();
- aPathInfo.Show();
- aPathBtn.Hide();
+ aPathED.Enable( sal_False );
+ aPathBtn.Enable( sal_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( sal_False );
}
if ( ( nFlags & LF_NO_PASSWORD ) == LF_NO_PASSWORD )
@@ -91,72 +97,46 @@ void LoginDialog::HideControls_Impl( USHORT nFlags )
if ( ( nFlags & LF_NO_ERRORTEXT ) == LF_NO_ERRORTEXT )
{
aErrorInfo.Hide();
- aErrorGB.Hide();
- bErrorHide = TRUE;
+ aErrorFT.Hide();
+ aLogin1FL.Hide();
+ bErrorHide = sal_True;
}
if ( ( nFlags & LF_NO_ACCOUNT ) == LF_NO_ACCOUNT )
{
aAccountFT.Hide();
aAccountED.Hide();
- bAccountHide = TRUE;
+ bAccountHide = sal_True;
}
if ( ( nFlags & LF_NO_USESYSCREDS ) == LF_NO_USESYSCREDS )
{
aUseSysCredsCB.Hide();
- bUseSysCredsHide = TRUE;
+ bUseSysCredsHide = sal_True;
}
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;
@@ -216,18 +196,16 @@ void LoginDialog::HideControls_Impl( USHORT nFlags )
};
// -----------------------------------------------------------------------
-void LoginDialog::EnableUseSysCredsControls_Impl( BOOL bUseSysCredsEnabled )
+void LoginDialog::EnableUseSysCredsControls_Impl( sal_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 );
@@ -274,7 +252,7 @@ IMPL_LINK( LoginDialog, UseSysCredsHdl_Impl, CheckBox *, EMPTYARG )
LoginDialog::LoginDialog
(
Window* pParent,
- USHORT nFlags,
+ sal_uInt16 nFlags,
const String& rServer,
const String* pRealm,
ResMgr* pResMgr
@@ -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,15 +311,13 @@ LoginDialog::LoginDialog
// -----------------------------------------------------------------------
-void LoginDialog::SetName( const String& rNewName )
+LoginDialog::~LoginDialog()
{
- aNameED.SetText( rNewName );
- aNameInfo.SetText( rNewName );
-}
+}
// -----------------------------------------------------------------------
-void LoginDialog::SetUseSystemCredentials( BOOL bUse )
+void LoginDialog::SetUseSystemCredentials( sal_Bool bUse )
{
if ( aUseSysCredsCB.IsVisible() )
{
diff --git a/uui/source/logindlg.hrc b/uui/source/logindlg.hrc
index 13848e694a..d2a5d48aaf 100644
--- 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 a8b2fa9c60..fea12e76e0 100644
--- a/uui/source/logindlg.hxx
+++ b/uui/source/logindlg.hxx
@@ -53,68 +53,62 @@
//============================================================================
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;
- void HideControls_Impl( USHORT nFlags );
- void EnableUseSysCredsControls_Impl( BOOL bUseSysCredsEnabled );
+ void HideControls_Impl( sal_uInt16 nFlags );
+ void EnableUseSysCredsControls_Impl( sal_Bool bUseSysCredsEnabled );
DECL_LINK( OKHdl_Impl, OKButton * );
DECL_LINK( PathHdl_Impl, PushButton * );
DECL_LINK( UseSysCredsHdl_Impl, CheckBox * );
public:
- LoginDialog( Window* pParent, USHORT nFlags,
+ LoginDialog( Window* pParent, sal_uInt16 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(); }
- void SetUseSystemCredentials( BOOL bUse );
- void SetErrorText( const String& rTxt )
- { aErrorInfo.SetText( rTxt ); }
- void SetLoginRequestText( const String& rTxt )
- { aRequestInfo.SetText( rTxt ); }
+ 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 ); }
+ sal_Bool IsSavePassword() const { return aSavePasswdBtn.IsChecked(); }
+ void SetSavePassword( sal_Bool bSave ) { aSavePasswdBtn.Check( bSave ); }
+ void SetSavePasswordText( const String& rTxt ) { aSavePasswdBtn.SetText( rTxt ); }
+ sal_Bool IsUseSystemCredentials() const { return aUseSysCredsCB.IsChecked(); }
+ void SetUseSystemCredentials( sal_Bool bUse );
+ 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 ced176d10a..822547faf3 100644
--- 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( 6 , 6 ) ;
+ Size = MAP_APPFONT( 165 , 8 ) ;
+ Text [ en-US ] = "Message from server:" ;
+ };
+
+ FixedText FT_INFO_LOGIN_ERROR
{
- Pos = MAP_APPFONT ( 12 , 14 ) ;
- Size = MAP_APPFONT ( 185 , 18 ) ;
+ 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 ) ;
};
+
+ HelpButton BTN_LOGIN_HELP
+ {
+ Pos = MAP_APPFONT( 6 , 227 ) ;
+ Size = MAP_APPFONT( 50 , 14 ) ;
+ };
+
OKButton BTN_LOGIN_OK
{
- Pos = MAP_APPFONT ( 209 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT( 66 , 227 ) ;
+ Size = MAP_APPFONT( 50 , 14 ) ;
DefButton = TRUE ;
};
+
CancelButton BTN_LOGIN_CANCEL
{
- Pos = MAP_APPFONT ( 209 , 23 ) ;
- 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 39e5b81caf..208228eef1 100644
--- a/uui/source/loginerr.hxx
+++ b/uui/source/loginerr.hxx
@@ -25,8 +25,8 @@
*
************************************************************************/
-#ifndef _LOGINERR_HXX
-#define _LOGINERR_HXX
+#ifndef m_LOGINERR_HXX
+#define m_LOGINERR_HXX
#include <tools/string.hxx>
@@ -43,128 +43,136 @@
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;
+ sal_uInt8 m_nFlags;
+ sal_uInt16 m_nRet;
+ bool m_bRecommendToOpenReadonly;
public:
LoginErrorInfo()
- : _nFlags( LOGINERROR_FLAG_MODIFY_USER_NAME ),
- _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 GetCanRememberPassword() const
- { return ( _nFlags & LOGINERROR_FLAG_CAN_REMEMBER_PASSWORD ); }
- BOOL GetIsRememberPersistent() const
- { return ( _nFlags & LOGINERROR_FLAG_REMEMBER_PERSISTENT ); }
- BOOL GetIsRememberPassword() const
- { return ( _nFlags & LOGINERROR_FLAG_IS_REMEMBER_PASSWORD ); }
-
- BOOL GetCanUseSystemCredentials() const
- { return ( _nFlags & LOGINERROR_FLAG_CAN_USE_SYSCREDS ); }
- BOOL GetIsUseSystemCredentials() const
- { return ( _nFlags & LOGINERROR_FLAG_IS_USE_SYSCREDS ) ==
+ : m_nFlags( LOGINERROR_FLAG_MODIFY_USER_NAME ),
+ m_nRet( ERRCODE_BUTTON_CANCEL )
+ {
+ }
+
+ 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; }
+ bool IsRecommendToOpenReadonly() const { return m_bRecommendToOpenReadonly; }
+ const String& GetPath() const { return m_aPath; }
+ const String& GetErrorText() const { return m_aErrorText; }
+ sal_Bool GetCanRememberPassword() const { return ( m_nFlags & LOGINERROR_FLAG_CAN_REMEMBER_PASSWORD ); }
+ sal_Bool GetIsRememberPersistent() const { return ( m_nFlags & LOGINERROR_FLAG_REMEMBER_PERSISTENT ); }
+ sal_Bool GetIsRememberPassword() const { return ( m_nFlags & LOGINERROR_FLAG_IS_REMEMBER_PASSWORD ); }
+
+ sal_Bool GetCanUseSystemCredentials() const
+ { return ( m_nFlags & LOGINERROR_FLAG_CAN_USE_SYSCREDS ); }
+ sal_Bool GetIsUseSystemCredentials() const
+ { return ( m_nFlags & LOGINERROR_FLAG_IS_USE_SYSCREDS ) ==
LOGINERROR_FLAG_IS_USE_SYSCREDS; }
- BYTE GetFlags() const { return _nFlags; }
- USHORT GetResult() const { return _nRet; }
+ sal_uInt8 GetFlags() const { return m_nFlags; }
+ sal_uInt16 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; }
- void SetFlags( BYTE nFlags )
- { _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_aErrorText = aErrorText; }
+ void SetFlags( sal_uInt8 nFlags )
+ { m_nFlags = nFlags; }
+
+ inline void SetCanRememberPassword( sal_Bool bSet );
+ inline void SetIsRememberPassword( sal_Bool bSet );
+ inline void SetIsRememberPersistent( sal_Bool bSet );
+
+ inline void SetCanUseSystemCredentials( sal_Bool bSet );
+ inline void SetIsUseSystemCredentials( sal_Bool bSet );
+ inline void SetModifyAccount( sal_Bool bSet );
+ inline void SetModifyUserName( sal_Bool bSet );
+
+ void SetResult( sal_uInt16 nRet )
+ { m_nRet = nRet; }
};
-inline void LoginErrorInfo::SetCanRememberPassword( BOOL bSet )
+inline void LoginErrorInfo::SetCanRememberPassword( sal_Bool bSet )
{
if ( bSet )
- _nFlags |= LOGINERROR_FLAG_CAN_REMEMBER_PASSWORD;
+ m_nFlags |= LOGINERROR_FLAG_CAN_REMEMBER_PASSWORD;
else
- _nFlags &= ~LOGINERROR_FLAG_CAN_REMEMBER_PASSWORD;
+ m_nFlags &= ~LOGINERROR_FLAG_CAN_REMEMBER_PASSWORD;
}
-inline void LoginErrorInfo::SetIsRememberPassword( BOOL bSet )
+inline void LoginErrorInfo::SetIsRememberPassword( sal_Bool bSet )
{
if ( bSet )
- _nFlags |= LOGINERROR_FLAG_IS_REMEMBER_PASSWORD;
+ m_nFlags |= LOGINERROR_FLAG_IS_REMEMBER_PASSWORD;
else
- _nFlags &= ~LOGINERROR_FLAG_IS_REMEMBER_PASSWORD;
+ m_nFlags &= ~LOGINERROR_FLAG_IS_REMEMBER_PASSWORD;
}
-inline void LoginErrorInfo::SetIsRememberPersistent( BOOL bSet )
+inline void LoginErrorInfo::SetIsRememberPersistent( sal_Bool bSet )
{
if ( bSet )
- _nFlags |= LOGINERROR_FLAG_REMEMBER_PERSISTENT;
+ m_nFlags |= LOGINERROR_FLAG_REMEMBER_PERSISTENT;
else
- _nFlags &= ~LOGINERROR_FLAG_REMEMBER_PERSISTENT;
+ m_nFlags &= ~LOGINERROR_FLAG_REMEMBER_PERSISTENT;
}
-inline void LoginErrorInfo::SetCanUseSystemCredentials( BOOL bSet )
+inline void LoginErrorInfo::SetCanUseSystemCredentials( sal_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 )
+inline void LoginErrorInfo::SetIsUseSystemCredentials( sal_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 )
+inline void LoginErrorInfo::SetModifyAccount( sal_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 )
+inline void LoginErrorInfo::SetModifyUserName( sal_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/makefile.mk b/uui/source/makefile.mk
index 5c20e59304..e09f5c01e9 100644..100755
--- a/uui/source/makefile.mk
+++ b/uui/source/makefile.mk
@@ -48,7 +48,6 @@ SLOFILES = \
$(SLO)$/masterpasscrtdlg.obj \
$(SLO)$/openlocked.obj \
$(SLO)$/passworddlg.obj \
- $(SLO)$/passcrtdlg.obj \
$(SLO)$/fltdlg.obj \
$(SLO)$/interactionhandler.obj \
$(SLO)$/requeststringresolver.obj \
@@ -60,6 +59,7 @@ SLOFILES = \
$(SLO)$/lockfailed.obj \
$(SLO)$/trylater.obj \
$(SLO)$/newerverwarn.obj \
+ $(SLO)$/nameclashdlg.obj \
$(SLO)$/passwordcontainer.obj
SRS1NAME=$(TARGET)
@@ -71,7 +71,6 @@ SRC1FILES = \
masterpasscrtdlg.src \
openlocked.src \
passworddlg.src \
- passcrtdlg.src \
passworderrs.src \
fltdlg.src \
unknownauthdlg.src\
@@ -81,6 +80,7 @@ SRC1FILES = \
alreadyopen.src\
lockfailed.src\
trylater.src\
+ nameclashdlg.src\
newerverwarn.src
.INCLUDE: target.mk
diff --git a/uui/source/masterpasscrtdlg.cxx b/uui/source/masterpasscrtdlg.cxx
index b9e82b862f..b7e70233ce 100644
--- a/uui/source/masterpasscrtdlg.cxx
+++ b/uui/source/masterpasscrtdlg.cxx
@@ -93,7 +93,7 @@ MasterPasswordCreateDialog::MasterPasswordCreateDialog
aHelpBtn ( this, ResId( BTN_MASTERPASSCRT_HELP, *pResMgr ) ),
pResourceMgr ( pResMgr ),
- nMinLen ( 5 )
+ nMinLen ( 1 )
{
FreeResource();
diff --git a/uui/source/masterpasscrtdlg.src b/uui/source/masterpasscrtdlg.src
index 65e24205a5..211f9959ec 100644
--- a/uui/source/masterpasscrtdlg.src
+++ b/uui/source/masterpasscrtdlg.src
@@ -63,6 +63,7 @@ ModalDialog DLG_UUI_MASTERPASSWORD_CRT
};
Edit ED_MASTERPASSWORD_CRT
{
+ HelpID = "uui:Edit:DLG_UUI_MASTERPASSWORD_CRT:ED_MASTERPASSWORD_CRT";
Pos = MAP_APPFONT ( COL_0 , ROW_3 ) ;
Size = MAP_APPFONT ( CTRL_WIDTH , RSC_CD_TEXTBOX_HEIGHT ) ;
Border = TRUE ;
@@ -76,6 +77,7 @@ ModalDialog DLG_UUI_MASTERPASSWORD_CRT
};
Edit ED_MASTERPASSWORD_REPEAT
{
+ HelpID = "uui:Edit:DLG_UUI_MASTERPASSWORD_CRT:ED_MASTERPASSWORD_REPEAT";
Pos = MAP_APPFONT ( COL_0 , ROW_5 ) ;
Size = MAP_APPFONT ( CTRL_WIDTH , RSC_CD_TEXTBOX_HEIGHT ) ;
Border = TRUE ;
@@ -86,7 +88,7 @@ ModalDialog DLG_UUI_MASTERPASSWORD_CRT
Pos = MAP_APPFONT ( COL_0 , ROW_6 ) ;
Size = MAP_APPFONT ( CTRL_WIDTH , 8*RSC_CD_FIXEDTEXT_HEIGHT ) ;
WordBreak = TRUE ;
- 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.";
+ Text [ en-US ] = "Caution: If you forget the master password, you will be unable to access any of the information protected by it. Passwords are case-sensitive.";
};
FixedLine FL_CAUTIONTEXT
{
diff --git a/uui/source/masterpassworddlg.src b/uui/source/masterpassworddlg.src
index 29d799c5cc..c08250e2a7 100644
--- a/uui/source/masterpassworddlg.src
+++ b/uui/source/masterpassworddlg.src
@@ -50,6 +50,7 @@ ModalDialog DLG_UUI_MASTERPASSWORD
};
Edit ED_MASTERPASSWORD
{
+ HelpID = "uui:Edit:DLG_UUI_MASTERPASSWORD:ED_MASTERPASSWORD";
Border = TRUE ;
Pos = MAP_APPFONT ( 3 , 17 ) ;
Size = MAP_APPFONT ( 169 , 13 ) ;
diff --git a/uui/source/nameclashdlg.cxx b/uui/source/nameclashdlg.cxx
new file mode 100755
index 0000000000..3393dff289
--- /dev/null
+++ b/uui/source/nameclashdlg.cxx
@@ -0,0 +1,107 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * 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).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#include "vcl/msgbox.hxx"
+#include "osl/file.hxx"
+
+#include "ids.hrc"
+#include "nameclashdlg.hrc"
+#include "nameclashdlg.hxx"
+
+// NameClashDialog ---------------------------------------------------------
+
+IMPL_LINK( NameClashDialog, ButtonHdl_Impl, PushButton *, pBtn )
+{
+ long nRet = (long) ABORT;
+ if ( &maBtnRename == pBtn )
+ {
+ nRet = (long) RENAME;
+ rtl::OUString aNewName = maEDNewName.GetText();
+ if ( ( aNewName == maNewName ) || !aNewName.getLength() )
+ {
+ ErrorBox aError( NULL, WB_OK, maSameName );
+ aError.Execute();
+ return 1;
+ }
+ maNewName = aNewName;
+ }
+ else if ( &maBtnOverwrite == pBtn )
+ nRet = (long) OVERWRITE;
+
+ EndDialog( nRet );
+
+ return 1;
+}
+
+// -----------------------------------------------------------------------
+NameClashDialog::NameClashDialog( Window* pParent, ResMgr* pResMgr,
+ rtl::OUString const & rTargetFolderURL,
+ rtl::OUString const & rClashingName,
+ rtl::OUString const & rProposedNewName,
+ bool bAllowOverwrite )
+ : ModalDialog( pParent, ResId( DLG_SIMPLE_NAME_CLASH, *pResMgr ) ),
+ maFTMessage ( this, ResId( FT_FILE_EXISTS_WARNING, *pResMgr ) ),
+ maEDNewName ( this, ResId( EDIT_NEW_NAME, *pResMgr ) ),
+ maBtnOverwrite ( this, ResId( BTN_OVERWRITE, *pResMgr ) ),
+ maBtnRename ( this, ResId( BTN_RENAME, *pResMgr ) ),
+ maBtnCancel ( this, ResId( BTN_CANCEL, *pResMgr ) ),
+ maBtnHelp ( this, ResId( BTN_HELP, *pResMgr ) ),
+ maNewName ( rClashingName )
+{
+ FreeResource();
+
+ Link aLink( LINK( this, NameClashDialog, ButtonHdl_Impl ) );
+ maBtnOverwrite.SetClickHdl( aLink );
+ maBtnRename.SetClickHdl( aLink );
+ maBtnCancel.SetClickHdl( aLink );
+
+ String aInfo;
+ if ( bAllowOverwrite )
+ {
+ aInfo = String( ResId( STR_RENAME_OR_REPLACE, *pResMgr ) );
+ }
+ else
+ {
+ aInfo = String( ResId( STR_NAME_CLASH_RENAME_ONLY, *pResMgr ) );
+ maBtnOverwrite.Hide();
+ }
+
+ rtl::OUString aPath;
+ if ( osl::FileBase::E_None != osl::FileBase::getSystemPathFromFileURL( rTargetFolderURL, aPath ) )
+ aPath = rTargetFolderURL;
+
+ maSameName = String ( ResId( STR_SAME_NAME_USED, *pResMgr ) );
+
+ aInfo.SearchAndReplaceAscii( "%NAME", rClashingName );
+ aInfo.SearchAndReplaceAscii( "%FOLDER", aPath );
+ maFTMessage.SetText( aInfo );
+ if ( rProposedNewName.getLength() )
+ maEDNewName.SetText( rProposedNewName );
+ else
+ maEDNewName.SetText( rClashingName );
+}
+
diff --git a/uui/source/passcrtdlg.hrc b/uui/source/nameclashdlg.hrc
index 8e3740abf0..81d112f25d 100644..100755
--- a/uui/source/passcrtdlg.hrc
+++ b/uui/source/nameclashdlg.hrc
@@ -25,19 +25,17 @@
*
************************************************************************/
-#ifndef UUI_PASSCRTDLG_HRC
-#define UUI_PASSCRTDLG_HRC
+#ifndef UUI_NAMECLASHDLG_HRC
+#define UUI_NAMECLASHDLG_HRC
-// local identifiers
-#define BTN_PASSCRT_CANCEL 1
-#define ED_PASSWORD_CRT 2
-#define FT_PASSWORD_REPEAT 3
-#define FT_PASSWORD_WARNING 4
-#define ED_PASSWORD_REPEAT 5
-#define FL_FIXED_LINE_1 6
-#define BTN_PASSCRT_OK 7
-#define BTN_PASSCRT_HELP 8
-#define FT_PASSWORD_CRT 9
-#define FT_MSPASSWORD_WARNING 10
+//============================================================================
+
+#define FT_FILE_EXISTS_WARNING 20
+#define EDIT_NEW_NAME 21
+#define BTN_OVERWRITE 22
+#define BTN_RENAME 23
+#define BTN_CANCEL 24
+#define BTN_HELP 25
+
+#endif // UUI_NAMECLASHDLG_HRC
-#endif // UUI_PASSCRTDLG_HRC
diff --git a/uui/source/passcrtdlg.hxx b/uui/source/nameclashdlg.hxx
index 4e9d065ee1..346b1faafd 100644..100755
--- a/uui/source/passcrtdlg.hxx
+++ b/uui/source/nameclashdlg.hxx
@@ -25,39 +25,39 @@
*
************************************************************************/
-#ifndef UUI_PASSCRTDLG_HXX
-#define UUI_PASSCRTDLG_HXX
+#ifndef UUI_NAMECLASHDLG_HXX
+#define UUI_NAMECLASHDLG_HXX
-#include <com/sun/star/task/PasswordRequestMode.hpp>
-#include <svtools/stdctrl.hxx>
-#include <vcl/dialog.hxx>
-#include <vcl/edit.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/button.hxx>
+#include "vcl/button.hxx"
+#include "vcl/dialog.hxx"
+#include "vcl/fixed.hxx"
+#include "vcl/edit.hxx"
//============================================================================
-class PasswordCreateDialog : public ModalDialog
+
+enum NameClashResolveDialogResult { ABORT, RENAME, OVERWRITE };
+
+class NameClashDialog : public ModalDialog
{
- FixedText aFTPasswordCrt;
- Edit aEDPasswordCrt;
- FixedText aFTPasswordRepeat;
- Edit aEDPasswordRepeat;
- FixedText aFTWarning;
- FixedLine aFixedLine1;
- OKButton aOKBtn;
- CancelButton aCancelBtn;
- HelpButton aHelpBtn;
-
- ResMgr* pResourceMgr;
- sal_uInt16 nMinLen;
-
- DECL_LINK( OKHdl_Impl, OKButton * );
- DECL_LINK( EditHdl_Impl, Edit * );
+ FixedText maFTMessage;
+ Edit maEDNewName;
+ PushButton maBtnOverwrite;
+ PushButton maBtnRename;
+ CancelButton maBtnCancel;
+ HelpButton maBtnHelp;
+ rtl::OUString maSameName;
+ rtl::OUString maNewName;
-public:
- PasswordCreateDialog( Window* pParent, ResMgr * pResMgr, bool bMSCryptoMode = false );
+ DECL_LINK( ButtonHdl_Impl, PushButton * );
- String GetPassword() const { return aEDPasswordCrt.GetText(); }
+public:
+ NameClashDialog( Window* pParent, ResMgr* pResMgr,
+ rtl::OUString const & rTargetFolderURL,
+ rtl::OUString const & rClashingName,
+ rtl::OUString const & rProposedNewName,
+ bool bAllowOverwrite );
+ rtl::OUString getNewName() const { return maNewName; }
};
-#endif // UUI_PASSCRTDLG_HXX
+#endif // UUI_COOKIEDG_HXX
+
diff --git a/uui/source/nameclashdlg.src b/uui/source/nameclashdlg.src
new file mode 100644
index 0000000000..4a3a457a0d
--- /dev/null
+++ b/uui/source/nameclashdlg.src
@@ -0,0 +1,116 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * 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).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#define __RSC
+
+#ifndef UUI_IDS_HRC
+#include "ids.hrc"
+#endif
+
+#ifndef UUI_NAMECLASHDLG_HRC
+#include "nameclashdlg.hrc"
+#endif
+
+#define DLG_WIDTH 250
+#define DLG_HEIGTH 75
+#define BORDER_OFFSET 6
+#define EDIT_HEIGTH 12
+#define BTN_WIDTH 50
+#define BTN_HEIGTH 14
+
+ModalDialog DLG_SIMPLE_NAME_CLASH
+{
+ HelpId = HID_DLG_SIMPLE_NAME_CLASH ;
+ OutputSize = TRUE ;
+ SVLook = TRUE ;
+ Size = MAP_APPFONT ( DLG_WIDTH , DLG_HEIGTH ) ;
+ Moveable = TRUE ;
+ Text [ en-US ] = "File Exists" ;
+
+ FixedText FT_FILE_EXISTS_WARNING
+ {
+ Pos = MAP_APPFONT ( BORDER_OFFSET, BORDER_OFFSET ) ;
+ Size = MAP_APPFONT ( DLG_WIDTH - 2*BORDER_OFFSET, DLG_HEIGTH - EDIT_HEIGTH - BTN_HEIGTH - 4*BORDER_OFFSET ) ;
+ WordBreak = TRUE ;
+ };
+
+ Edit EDIT_NEW_NAME
+ {
+ HelpID = "uui:Edit:DLG_SIMPLE_NAME_CLASH:EDIT_NEW_NAME";
+ Border = TRUE ;
+ Pos = MAP_APPFONT ( BORDER_OFFSET, DLG_HEIGTH - EDIT_HEIGTH - BTN_HEIGTH - 2*BORDER_OFFSET ) ;
+ Size = MAP_APPFONT ( DLG_WIDTH - 2*BORDER_OFFSET , EDIT_HEIGTH ) ;
+ };
+
+ PushButton BTN_OVERWRITE
+ {
+ HelpID = "uui:PushButton:DLG_SIMPLE_NAME_CLASH:BTN_OVERWRITE";
+ Pos = MAP_APPFONT ( DLG_WIDTH - 3*(BTN_WIDTH + BORDER_OFFSET) , DLG_HEIGTH - BTN_HEIGTH - BORDER_OFFSET ) ;
+ Size = MAP_APPFONT ( BTN_WIDTH, BTN_HEIGTH ) ;
+ TabStop = TRUE ;
+ Text [ en-US ] = "Replace" ;
+ };
+
+ PushButton BTN_RENAME
+ {
+ HelpID = "uui:PushButton:DLG_SIMPLE_NAME_CLASH:BTN_RENAME";
+ Pos = MAP_APPFONT ( DLG_WIDTH - 2*(BTN_WIDTH + BORDER_OFFSET) , DLG_HEIGTH - BTN_HEIGTH - BORDER_OFFSET ) ;
+ Size = MAP_APPFONT ( BTN_WIDTH, BTN_HEIGTH ) ;
+ TabStop = TRUE ;
+ Text [ en-US ] = "Rename" ;
+ DefButton = TRUE ;
+ };
+
+ CancelButton BTN_CANCEL
+ {
+ Pos = MAP_APPFONT ( DLG_WIDTH - BTN_WIDTH - BORDER_OFFSET, DLG_HEIGTH - BTN_HEIGTH - BORDER_OFFSET ) ;
+ Size = MAP_APPFONT ( BTN_WIDTH, BTN_HEIGTH ) ;
+ TabStop = TRUE ;
+ };
+
+ HelpButton BTN_HELP
+ {
+ Pos = MAP_APPFONT ( BORDER_OFFSET, DLG_HEIGTH - BTN_HEIGTH - BORDER_OFFSET ) ;
+ Size = MAP_APPFONT ( BTN_WIDTH, BTN_HEIGTH ) ;
+ TabStop = TRUE ;
+ };
+};
+
+String STR_RENAME_OR_REPLACE
+{
+ Text = "A file with the name \"%NAME\" already exists in the location \"%FOLDER\".\nChoose Replace to overwrite the existing file or provide a new name.";
+};
+
+String STR_NAME_CLASH_RENAME_ONLY
+{
+ Text = "A file with the name \"%NAME\" already exists in the location \"%FOLDER\".\nPlease enter a new name.";
+};
+
+String STR_SAME_NAME_USED
+{
+ Text = "Please provide a different file name!";
+};
diff --git a/uui/source/newerverwarn.src b/uui/source/newerverwarn.src
index c9889e6648..076aaae697 100644
--- a/uui/source/newerverwarn.src
+++ b/uui/source/newerverwarn.src
@@ -66,6 +66,7 @@ ModalDialog RID_DLG_NEWER_VERSION_WARNING
};
PushButton PB_UPDATE
{
+ HelpID = "uui:PushButton:RID_DLG_NEWER_VERSION_WARNING:PB_UPDATE";
Pos = MAP_APPFONT ( COL_3 , ROW_3 ) ;
Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
TabStop = TRUE ;
diff --git a/uui/source/passcrtdlg.cxx b/uui/source/passcrtdlg.cxx
deleted file mode 100644
index 6dbaeedd93..0000000000
--- a/uui/source/passcrtdlg.cxx
+++ /dev/null
@@ -1,128 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * 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).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include <svtools/filedlg.hxx>
-#include <vcl/msgbox.hxx>
-
-#ifndef UUI_IDS_HRC
-#include <ids.hrc>
-#endif
-#ifndef UUI_PASSCRTDLG_HRC
-#include <passcrtdlg.hrc>
-#endif
-#include <passcrtdlg.hxx>
-
-// PasswordCreateDialog---------------------------------------------------
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK( PasswordCreateDialog, EditHdl_Impl, Edit *, EMPTYARG )
-{
- aOKBtn.Enable( aEDPasswordCrt.GetText().Len() >= nMinLen );
- return 0;
-}
-
-// -----------------------------------------------------------------------
-
-IMPL_LINK( PasswordCreateDialog, OKHdl_Impl, OKButton *, EMPTYARG )
-{
- // compare both passwords and show message box if there are not equal!!
- if( aEDPasswordCrt.GetText() == aEDPasswordRepeat.GetText() )
- EndDialog( RET_OK );
- else
- {
- String aErrorMsg( ResId( STR_ERROR_PASSWORDS_NOT_IDENTICAL, *pResourceMgr ));
- ErrorBox aErrorBox( this, WB_OK, aErrorMsg );
- aErrorBox.Execute();
- aEDPasswordCrt.SetText( String() );
- aEDPasswordRepeat.SetText( String() );
- aEDPasswordCrt.GrabFocus();
- }
- return 1;
-}
-
-// -----------------------------------------------------------------------
-
-PasswordCreateDialog::PasswordCreateDialog( Window* _pParent, ResMgr * pResMgr, bool bMSCryptoMode)
- :ModalDialog( _pParent, ResId( DLG_UUI_PASSWORD_CRT, *pResMgr ) )
- ,aFTPasswordCrt ( this, ResId( FT_PASSWORD_CRT, *pResMgr ) )
- ,aEDPasswordCrt ( this, ResId( ED_PASSWORD_CRT, *pResMgr ) )
- ,aFTPasswordRepeat ( this, ResId( FT_PASSWORD_REPEAT, *pResMgr ) )
- ,aEDPasswordRepeat ( this, ResId( ED_PASSWORD_REPEAT, *pResMgr ) )
- ,aFTWarning ( this, ResId( bMSCryptoMode ? FT_MSPASSWORD_WARNING : FT_PASSWORD_WARNING, *pResMgr ) )
- ,aFixedLine1 ( this, ResId( FL_FIXED_LINE_1, *pResMgr ) )
- ,aOKBtn ( this, ResId( BTN_PASSCRT_OK, *pResMgr ) )
- ,aCancelBtn ( this, ResId( BTN_PASSCRT_CANCEL, *pResMgr ) )
- ,aHelpBtn ( this, ResId( BTN_PASSCRT_HELP, *pResMgr ) )
- ,pResourceMgr ( pResMgr )
- ,nMinLen(1) // if it should be changed for ODF, it must stay 1 for bMSCryptoMode
-{
- FreeResource();
-
- aOKBtn.SetClickHdl( LINK( this, PasswordCreateDialog, OKHdl_Impl ) );
- aEDPasswordCrt.SetModifyHdl( LINK( this, PasswordCreateDialog, EditHdl_Impl ) );
-
- aOKBtn.Enable( sal_False );
-
- if ( bMSCryptoMode )
- {
- aEDPasswordCrt.SetMaxTextLen( 15 );
- aEDPasswordRepeat.SetMaxTextLen( 15 );
- }
-
- long nLabelWidth = aFTWarning.GetSizePixel().Width();
- long nLabelHeight = aFTWarning.GetSizePixel().Height();
- long nTextWidth = aFTWarning.GetCtrlTextWidth( aFTWarning.GetText() );
- long nTextHeight = aFTWarning.GetTextHeight();
-
- Rectangle aLabelRect( aFTWarning.GetPosPixel(), aFTWarning.GetSizePixel() );
- Rectangle aRect = aFTWarning.GetTextRect( aLabelRect, aFTWarning.GetText() );
-
- long nNewLabelHeight = 0;
- for( nNewLabelHeight = ( nTextWidth / nLabelWidth + 1 ) * nTextHeight;
- nNewLabelHeight < aRect.GetHeight();
- nNewLabelHeight += nTextHeight ) {} ;
-
- long nDelta = nNewLabelHeight - nLabelHeight;
-
- Size aNewDlgSize = GetSizePixel();
- aNewDlgSize.Height() += nDelta;
- SetSizePixel( aNewDlgSize );
-
- Size aNewWarningSize = aFTWarning.GetSizePixel();
- aNewWarningSize.Height() = nNewLabelHeight;
- aFTWarning.SetPosSizePixel( aFTWarning.GetPosPixel(), aNewWarningSize );
-
- Window* pControls[] = { &aFixedLine1, &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() );
- }
-}
diff --git a/uui/source/passcrtdlg.src b/uui/source/passcrtdlg.src
deleted file mode 100644
index b4ba3f2125..0000000000
--- a/uui/source/passcrtdlg.src
+++ /dev/null
@@ -1,108 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * 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).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#define __RSC
-
-#ifndef UUI_IDS_HRC
-#include <ids.hrc>
-#endif
-#ifndef UUI_PASSCRTDLG_HRC
-#include "passcrtdlg.hrc"
-#endif
-
-ModalDialog DLG_UUI_PASSWORD_CRT
-{
- HelpId = HID_DLG_PASSWORD_CRT ;
- Border = TRUE ;
- Moveable = TRUE ;
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT( 145, 129 );
- FixedText FT_PASSWORD_CRT
- {
- Pos = MAP_APPFONT( 3, 4 );
- Size = MAP_APPFONT( 139, 9 );
- Text [ en-US ] = "Enter password";
- };
- Edit ED_PASSWORD_CRT
- {
- Border = TRUE ;
- Pos = MAP_APPFONT( 3, 17 );
- Size = MAP_APPFONT( 139, 13 );
- PassWord = TRUE ;
- };
- Edit ED_PASSWORD_REPEAT
- {
- Border = TRUE ;
- Pos = MAP_APPFONT( 3, 47 );
- Size = MAP_APPFONT( 139, 13 );
- PassWord = TRUE ;
- };
- OKButton BTN_PASSCRT_OK
- {
- Pos = MAP_APPFONT( 27, 110 );
- Size = MAP_APPFONT( 37, 15 );
- DefButton = TRUE ;
- };
- CancelButton BTN_PASSCRT_CANCEL
- {
- Pos = MAP_APPFONT( 66, 110 );
- Size = MAP_APPFONT( 37, 15 );
- };
- HelpButton BTN_PASSCRT_HELP
- {
- Pos = MAP_APPFONT( 105, 110 );
- Size = MAP_APPFONT( 37, 15 );
- };
- FixedText FT_PASSWORD_REPEAT
- {
- Pos = MAP_APPFONT( 3, 34 );
- Size = MAP_APPFONT( 139, 9 );
- Text [ en-US ] = "Reenter password";
- };
- FixedText FT_PASSWORD_WARNING
- {
- Pos = MAP_APPFONT( 4, 64 );
- Size = MAP_APPFONT( 137, 40 );
- Text [ en-US ] = "WARNING: If you lose or forget the password, it cannot be recovered. It is advisable to keep passwords in a safe place. Passwords are case-sensitive.";
- WordBreak = TRUE;
- };
- FixedText FT_MSPASSWORD_WARNING
- {
- Pos = MAP_APPFONT( 4, 64 );
- Size = MAP_APPFONT( 137, 40 );
- Text [ en-US ] = "WARNING: If you lose or forget the password, it cannot be recovered. It is advisable to keep passwords in a safe place. Passwords are case-sensitive and at most fifteen characters long.";
- WordBreak = TRUE;
- };
- FixedLine FL_FIXED_LINE_1
- {
- Pos = MAP_APPFONT( 0, 104 );
- Size = MAP_APPFONT( 145, 6 );
- };
- Text [ en-US ] = "Enter Password";
-};
-
diff --git a/uui/source/passwordcontainer.hxx b/uui/source/passwordcontainer.hxx
index 36db115bf3..aafcd1c4c1 100644
--- a/uui/source/passwordcontainer.hxx
+++ b/uui/source/passwordcontainer.hxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
diff --git a/uui/source/passworddlg.cxx b/uui/source/passworddlg.cxx
index 4e644a980f..f38d6c55f2 100644
--- a/uui/source/passworddlg.cxx
+++ b/uui/source/passworddlg.cxx
@@ -25,63 +25,119 @@
*
************************************************************************/
+#include "passworddlg.hxx"
+#include "passworddlg.hrc"
+#include "ids.hrc"
+
#include <svtools/filedlg.hxx>
#include <vcl/msgbox.hxx>
-#ifndef UUI_IDS_HRC
-#include <ids.hrc>
-#endif
-#ifndef UUI_PASSWORDDLG_HRC
-#include <passworddlg.hrc>
-#endif
-#include <passworddlg.hxx>
-// PasswordDialog---------------------------------------------------------
+using namespace ::com::sun::star;
+
// -----------------------------------------------------------------------
-IMPL_LINK( PasswordDialog, OKHdl_Impl, OKButton *, EMPTYARG )
+static void lcl_Move( Window &rWin, long nOffset )
{
- EndDialog( RET_OK );
- return 1;
+ Point aTmp( rWin.GetPosPixel() );
+ aTmp.Y() += nOffset;
+ rWin.SetPosPixel( aTmp );
}
// -----------------------------------------------------------------------
-PasswordDialog::PasswordDialog
-(
+PasswordDialog::PasswordDialog(
Window* _pParent,
- ::com::sun::star::task::PasswordRequestMode nDlgMode,
+ task::PasswordRequestMode nDlgMode,
ResMgr * pResMgr,
- rtl::OUString& aDocURL
- )
+ rtl::OUString& aDocURL,
+ bool bOpenToModify,
+ bool bIsSimplePasswordRequest )
+
: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 ))
+ ,aFTConfirmPassword( this, ResId( FT_CONFIRM_PASSWORD, *pResMgr ))
+ ,aEDConfirmPassword( this, ResId( ED_CONFIRM_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 ))
+ ,nMinLen(1)
+ ,aPasswdMismatch( ResId( STR_PASSWORD_MISMATCH, *pResMgr ))
+ ,nDialogMode( nDlgMode )
+ ,pResourceMgr ( pResMgr )
{
- if( nDialogMode == ::com::sun::star::task::PasswordRequestMode_PASSWORD_REENTER )
+ if( nDialogMode == task::PasswordRequestMode_PASSWORD_REENTER )
{
- String aErrorMsg( ResId( STR_ERROR_PASSWORD_WRONG, *pResourceMgr ));
- ErrorBox aErrorBox( _pParent, WB_OK, aErrorMsg );
+ const sal_uInt16 nOpenToModifyErrStrId = bOpenToModify ? STR_ERROR_PASSWORD_TO_MODIFY_WRONG : STR_ERROR_PASSWORD_TO_OPEN_WRONG;
+ const sal_uInt16 nErrStrId = bIsSimplePasswordRequest ? STR_ERROR_SIMPLE_PASSWORD_WRONG : nOpenToModifyErrStrId;
+ String aErrorMsg( ResId( nErrStrId, *pResourceMgr ));
+ ErrorBox aErrorBox( this, WB_OK, aErrorMsg );
aErrorBox.Execute();
}
- FreeResource();
+ // default settings for enter password or reenter passwd...
+ String aTitle( ResId( STR_TITLE_ENTER_PASSWORD, *pResourceMgr ) );
+ aFTConfirmPassword.Hide();
+ aEDConfirmPassword.Hide();
+ aFTConfirmPassword.Enable( sal_False );
+ aEDConfirmPassword.Enable( sal_False );
+
+ // settings for create password
+ if (nDialogMode == task::PasswordRequestMode_PASSWORD_CREATE)
+ {
+ aTitle = String( ResId( STR_TITLE_CREATE_PASSWORD, *pResourceMgr ) );
+
+ aFTConfirmPassword.SetText( String( ResId( STR_CONFIRM_SIMPLE_PASSWORD, *pResourceMgr ) ) );
+
+ aFTConfirmPassword.Show();
+ aEDConfirmPassword.Show();
+ aFTConfirmPassword.Enable( sal_True );
+ aEDConfirmPassword.Enable( sal_True );
+ }
+ else
+ {
+ // shrink dialog by size of hidden controls and move rest up accordingly
+
+ long nDelta = aFixedLine1.GetPosPixel().Y() - aFTConfirmPassword.GetPosPixel().Y();
+
+ lcl_Move( aFixedLine1, -nDelta );
+ lcl_Move( aOKBtn, -nDelta );
+ lcl_Move( aCancelBtn, -nDelta );
+ lcl_Move( aHelpBtn, -nDelta );
+
+ Size aNewDlgSize = GetSizePixel();
+ aNewDlgSize.Height() -= nDelta;
+ SetSizePixel( aNewDlgSize );
+ }
+
+ SetText( aTitle );
+ sal_uInt16 nStrId = bOpenToModify ? STR_ENTER_PASSWORD_TO_MODIFY : STR_ENTER_PASSWORD_TO_OPEN;
+ aFTPassword.SetText( String( ResId( nStrId, *pResourceMgr ) ) );
aFTPassword.SetText( aFTPassword.GetText() + aDocURL );
+ if (bIsSimplePasswordRequest)
+ {
+ DBG_ASSERT( aDocURL.getLength() == 0, "A simple password request should not have a document URL! Use document password request instead." );
+ aFTPassword.SetText( String( ResId( STR_ENTER_SIMPLE_PASSWORD, *pResourceMgr ) ) );
+ }
+
+ FreeResource();
aOKBtn.SetClickHdl( LINK( this, PasswordDialog, OKHdl_Impl ) );
- long nLabelWidth = aFTPassword.GetSizePixel().Width();
- long nLabelHeight = aFTPassword.GetSizePixel().Height();
- long nTextWidth = aFTPassword.GetCtrlTextWidth( aFTPassword.GetText() );
- long nTextHeight = aFTPassword.GetTextHeight();
+
+ //
+ // move controls down by extra height needed for aFTPassword
+ // (usually only needed if a URL was provided)
+ //
+
+ long nLabelWidth = aFTPassword.GetSizePixel().Width();
+ long nLabelHeight = aFTPassword.GetSizePixel().Height();
+ long nTextWidth = aFTPassword.GetCtrlTextWidth( aFTPassword.GetText() );
+ long nTextHeight = aFTPassword.GetTextHeight();
Rectangle aLabelRect( aFTPassword.GetPosPixel(), aFTPassword.GetSizePixel() );
Rectangle aRect = aFTPassword.GetTextRect( aLabelRect, aFTPassword.GetText() );
@@ -101,13 +157,31 @@ PasswordDialog::PasswordDialog
aNewLabelSize.Height() = nNewLabelHeight;
aFTPassword.SetPosSizePixel( aFTPassword.GetPosPixel(), aNewLabelSize );
- Window* pControls[] = { &aEDPassword, &aFixedLine1, &aOKBtn, &aCancelBtn, &aHelpBtn };
- const sal_Int32 nCCount = sizeof( pControls ) / sizeof( pControls[0] );
- for ( int i = 0; i < nCCount; ++i )
+ lcl_Move( aEDPassword, nDelta );
+ lcl_Move( aFTConfirmPassword, nDelta );
+ lcl_Move( aEDConfirmPassword, nDelta );
+ lcl_Move( aFixedLine1, nDelta );
+ lcl_Move( aOKBtn, nDelta );
+ lcl_Move( aCancelBtn, nDelta );
+ lcl_Move( aHelpBtn, nDelta );
+}
+
+
+IMPL_LINK( PasswordDialog, OKHdl_Impl, OKButton *, EMPTYARG )
+{
+ bool bEDPasswdValid = aEDPassword.GetText().Len() >= nMinLen;
+ bool bPasswdMismatch = aEDConfirmPassword.GetText() != aEDPassword.GetText();
+ bool bValid = (!aEDConfirmPassword.IsVisible() && bEDPasswdValid) ||
+ (aEDConfirmPassword.IsVisible() && bEDPasswdValid && !bPasswdMismatch);
+
+ if (aEDConfirmPassword.IsVisible() && bPasswdMismatch)
{
- Point aNewPos =(*pControls[i]).GetPosPixel();
- aNewPos.Y() += nDelta;
- pControls[i]->SetPosSizePixel( aNewPos, pControls[i]->GetSizePixel() );
+ ErrorBox aErrorBox( this, WB_OK, aPasswdMismatch );
+ aErrorBox.Execute();
}
+ else if (bValid)
+ EndDialog( RET_OK );
+ return 1;
}
+
diff --git a/uui/source/passworddlg.hrc b/uui/source/passworddlg.hrc
index edda2504c1..24ec8aca9d 100644
--- a/uui/source/passworddlg.hrc
+++ b/uui/source/passworddlg.hrc
@@ -29,12 +29,18 @@
#define PASSWORDDLG_HRC
// local identifiers
-#define BTN_PASSWORD_OK 1
-#define ED_PASSWORD 2
-#define FT_PASSWORD 3
-#define FL_FIXED_LINE_1 4
-#define BTN_PASSWORD_HELP 5
-#define BTN_PASSWORD_CANCEL 6
+#define BTN_PASSWORD_OK 1
+#define ED_PASSWORD 2
+#define FT_PASSWORD 3
+#define FT_CONFIRM_PASSWORD 4
+#define ED_CONFIRM_PASSWORD 5
+#define FL_FIXED_LINE_1 6
+#define BTN_PASSWORD_HELP 7
+#define BTN_PASSWORD_CANCEL 8
+
+#define STR_TITLE_CREATE_PASSWORD 9
+#define STR_TITLE_ENTER_PASSWORD 10
+#define STR_PASSWORD_MISMATCH 11
#endif // PASSWORDDLG_HRC
diff --git a/uui/source/passworddlg.hxx b/uui/source/passworddlg.hxx
index 44d30ab57b..3a180597c1 100644
--- a/uui/source/passworddlg.hxx
+++ b/uui/source/passworddlg.hxx
@@ -37,21 +37,28 @@
#include <vcl/fixed.hxx>
//============================================================================
+
class PasswordDialog : public ModalDialog
{
FixedText aFTPassword;
Edit aEDPassword;
+ FixedText aFTConfirmPassword;
+ Edit aEDConfirmPassword;
OKButton aOKBtn;
CancelButton aCancelBtn;
HelpButton aHelpBtn;
FixedLine aFixedLine1;
+ sal_uInt16 nMinLen;
+ String aPasswdMismatch;
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, bool bIsSimplePasswordRequest = false );
+ void SetMinLen( sal_uInt16 nMin ) { nMinLen = nMin; }
String GetPassword() const { return aEDPassword.GetText(); }
private:
@@ -60,3 +67,4 @@ private:
};
#endif // PASSWORDDLG_HXX
+
diff --git a/uui/source/passworddlg.src b/uui/source/passworddlg.src
index 24fce39772..96c3699370 100644
--- a/uui/source/passworddlg.src
+++ b/uui/source/passworddlg.src
@@ -41,48 +41,98 @@ ModalDialog DLG_UUI_PASSWORD
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
- Size = MAP_APPFONT( 145, 75 );
- Text [ en-US ] = "Enter password";
+ Size = MAP_APPFONT( 165, 95 );
+
FixedText FT_PASSWORD
{
- Pos = MAP_APPFONT( 3, 4 );
- Size = MAP_APPFONT( 139, 28 );
- Text [ en-US ] = "Enter password to open file: \n";
+ Pos = MAP_APPFONT( 3, 6 );
+ Size = MAP_APPFONT( 159, 8 );
WordBreak = TRUE;
};
Edit ED_PASSWORD
{
- Pos = MAP_APPFONT( 3, 35 );
- Size = MAP_APPFONT( 139, 13 );
+ HelpID = "uui:Edit:DLG_UUI_PASSWORD:ED_PASSWORD";
+ Pos = MAP_APPFONT( 3, 17 );
+ Size = MAP_APPFONT( 159, 12 );
Border = TRUE ;
PassWord = TRUE ;
};
+ FixedText FT_CONFIRM_PASSWORD
+ {
+ Pos = MAP_APPFONT( 3, 34 );
+ Size = MAP_APPFONT( 159, 8 );
+ WordBreak = TRUE;
+ };
+
+ Edit ED_CONFIRM_PASSWORD
+ {
+ HelpID = "uui:Edit:DLG_UUI_PASSWORD:ED_CONFIRM_PASSWORD";
+ Pos = MAP_APPFONT( 3, 45 );
+ Size = MAP_APPFONT( 159, 12 );
+ Border = TRUE ;
+ PassWord = TRUE ;
+ };
+
+ FixedLine FL_FIXED_LINE_1
+ {
+ Pos = MAP_APPFONT( 0, 63 );
+ Size = MAP_APPFONT( 165, 8 );
+ };
+
+ HelpButton BTN_PASSWORD_HELP
+ {
+ Pos = MAP_APPFONT( 3, 76 );
+ Size = MAP_APPFONT( 50, 14 );
+ };
+
OKButton BTN_PASSWORD_OK
{
- Pos = MAP_APPFONT( 27, 56 );
- Size = MAP_APPFONT( 37, 15 );
+ Pos = MAP_APPFONT( 59, 76 );
+ Size = MAP_APPFONT( 50, 14 );
DefButton = TRUE ;
- DefButton = TRUE;
};
CancelButton BTN_PASSWORD_CANCEL
{
- Pos = MAP_APPFONT( 66, 56 );
- Size = MAP_APPFONT( 37, 15 );
+ Pos = MAP_APPFONT( 112, 76 );
+ Size = MAP_APPFONT( 50, 14 );
};
- HelpButton BTN_PASSWORD_HELP
+ String STR_ENTER_PASSWORD_TO_OPEN
{
- Pos = MAP_APPFONT( 105, 56 );
- Size = MAP_APPFONT( 37, 15 );
+ Text [ en-US ] = "Enter password to open file: \n";
};
- FixedLine FL_FIXED_LINE_1
+ String STR_ENTER_PASSWORD_TO_MODIFY
+ {
+ Text [ en-US ] = "Enter password to modify file: \n";
+ };
+
+ String STR_ENTER_SIMPLE_PASSWORD
+ {
+ Text [ en-US ] = "Enter password: ";
+ };
+
+ String STR_CONFIRM_SIMPLE_PASSWORD
+ {
+ Text [ en-US ] = "Confirm password: ";
+ };
+
+ String STR_TITLE_CREATE_PASSWORD
+ {
+ Text [ en-US ] = "Set Password";
+ };
+
+ String STR_TITLE_ENTER_PASSWORD
+ {
+ Text [ en-US ] = "Enter Password";
+ };
+
+ String STR_PASSWORD_MISMATCH
{
- Pos = MAP_APPFONT( 0, 50 );
- Size = MAP_APPFONT( 145, 6 );
+ Text [ en-US ] = "The confirmation password did not match the password. Set the password again by entering the same password in both boxes." ;
};
};
diff --git a/uui/source/passworderrs.src b/uui/source/passworderrs.src
index 124a360db9..249aa1f559 100644
--- a/uui/source/passworderrs.src
+++ b/uui/source/passworderrs.src
@@ -31,14 +31,24 @@
#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
{
- 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.";
+ Text [ en-US ] = "The master password is incorrect.";
+};
+
+String STR_ERROR_SIMPLE_PASSWORD_WRONG
+{
+ Text [ en-US ] = "The password is incorrect.";
};
String STR_ERROR_PASSWORDS_NOT_IDENTICAL
diff --git a/uui/source/secmacrowarnings.src b/uui/source/secmacrowarnings.src
index 9ae4186ec8..3e71a2cecd 100644
--- a/uui/source/secmacrowarnings.src
+++ b/uui/source/secmacrowarnings.src
@@ -74,6 +74,7 @@ ModalDialog RID_XMLSECDLG_MACROWARN
};
PushButton PB_VIEWSIGNS
{
+ HelpID = "uui:PushButton:RID_XMLSECDLG_MACROWARN:PB_VIEWSIGNS";
Pos = MAP_APPFONT( MW_COL_3, MW_ROW_2 );
Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
Text [ en-US ] = "View Signatures...";
@@ -87,6 +88,7 @@ ModalDialog RID_XMLSECDLG_MACROWARN
};
CheckBox CB_ALWAYSTRUST
{
+ HelpID = "uui:CheckBox:RID_XMLSECDLG_MACROWARN:CB_ALWAYSTRUST";
Pos = MAP_APPFONT( MW_COL_1, MW_ROW_4 );
Size = MAP_APPFONT( MW_COL_4-MW_COL_1, RSC_CD_CHECKBOX_HEIGHT );
Text [ en-US ] = "Always trust macros from this source";
diff --git a/uui/source/services.cxx b/uui/source/services.cxx
index 7ec7c34056..30af064df6 100644
--- a/uui/source/services.cxx
+++ b/uui/source/services.cxx
@@ -41,49 +41,6 @@ using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::registry;
-namespace {
-
-sal_Bool writeInfo( void * pRegistryKey,
- const OUString & rImplementationName,
- Sequence< OUString > const & rServiceNames )
-{
- OUString aKeyName( OUString::createFromAscii( "/" ) );
- aKeyName += rImplementationName;
- aKeyName += OUString::createFromAscii( "/UNO/SERVICES" );
-
- Reference< XRegistryKey > xKey;
- try
- {
- xKey = static_cast< XRegistryKey * >(
- pRegistryKey )->createKey( aKeyName );
- }
- catch ( InvalidRegistryException const & )
- {
- }
-
- if ( !xKey.is() )
- {
- return sal_False;
- }
- sal_Bool bSuccess = sal_True;
-
- for ( sal_Int32 n = 0; n < rServiceNames.getLength(); ++n )
- {
- try
- {
- xKey->createKey( rServiceNames[ n ] );
- }
- catch ( InvalidRegistryException const & )
- {
- bSuccess = sal_False;
- break;
- }
- }
- return bSuccess;
-}
-
-} // namespace
-
//============================================================================
//
// component_getImplementationEnvironment
@@ -99,43 +56,6 @@ component_getImplementationEnvironment(sal_Char const ** pEnvTypeName,
//============================================================================
//
-// component_writeInfo
-//
-//============================================================================
-
-extern "C" sal_Bool SAL_CALL component_writeInfo(void *, void * pRegistryKey)
-{
- return pRegistryKey &&
-
- //////////////////////////////////////////////////////////////////////
- // UUI Interaction Handler.
- //////////////////////////////////////////////////////////////////////
-
- writeInfo( pRegistryKey,
- OUString::createFromAscii(
- UUIInteractionHandler::m_aImplementationName ),
- UUIInteractionHandler::getSupportedServiceNames_static() ) &&
-
- //////////////////////////////////////////////////////////////////////
- // UUI Interaction Request String Resolver.
- //////////////////////////////////////////////////////////////////////
-
- writeInfo( pRegistryKey,
- OUString::createFromAscii(
- UUIInteractionRequestStringResolver::m_aImplementationName ),
- UUIInteractionRequestStringResolver::getSupportedServiceNames_static() ) &&
-
- //////////////////////////////////////////////////////////////////////
- // UUI Password Container Interaction Handler.
- //////////////////////////////////////////////////////////////////////
-
- writeInfo( pRegistryKey,
- uui::PasswordContainerInteractionHandler::getImplementationName_Static(),
- uui::PasswordContainerInteractionHandler::getSupportedServiceNames_Static() );
-}
-
-//============================================================================
-//
// component_getFactory
//
//============================================================================
diff --git a/uui/source/sslwarndlg.src b/uui/source/sslwarndlg.src
index bea7d06da3..934a35faca 100644
--- a/uui/source/sslwarndlg.src
+++ b/uui/source/sslwarndlg.src
@@ -59,6 +59,7 @@ ModalDialog DLG_UUI_SSLWARN
PushButton PB_VIEW__CERTIFICATE
{
+ HelpID = "uui:PushButton:DLG_UUI_SSLWARN:PB_VIEW__CERTIFICATE";
Pos = MAP_APPFONT( DLG_CTLBTN_CERT_START_X, DLG_CTLBTN_START_Y );
Size = MAP_APPFONT( DLG_CTLBTN_CERT_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
@@ -77,6 +78,7 @@ ModalDialog DLG_UUI_SSLWARN
PushButton PB_OK
{
+ HelpID = "uui:PushButton:DLG_UUI_SSLWARN:PB_OK";
Pos = MAP_APPFONT( DLG_CTLBTN_OK_START_X, DLG_CTLBTN_START_Y );
Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
diff --git a/uui/source/unknownauthdlg.src b/uui/source/unknownauthdlg.src
index aadb52282d..a9e518df07 100644
--- a/uui/source/unknownauthdlg.src
+++ b/uui/source/unknownauthdlg.src
@@ -62,6 +62,7 @@ ModalDialog DLG_UUI_UNKNOWNAUTH
PushButton PB_VIEW__CERTIFICATE
{
+ HelpID = "uui:PushButton:DLG_UUI_UNKNOWNAUTH:PB_VIEW__CERTIFICATE";
Pos = MAP_APPFONT( DLG_TEXT_START_X, RSC_SP_DLG_INNERBORDER_TOP + DLG_TEXT_1_HEIGHT + RSC_SP_CTRL_GROUP_Y );
Size = MAP_APPFONT( 70, RSC_CD_PUSHBUTTON_HEIGHT );
@@ -80,6 +81,7 @@ ModalDialog DLG_UUI_UNKNOWNAUTH
PushButton PB_OK
{
+ HelpID = "uui:PushButton:DLG_UUI_UNKNOWNAUTH:PB_OK";
Pos = MAP_APPFONT( DLG_CTLBTN_OK_START_X, DLG_CTLBTN_START_Y );
Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
@@ -96,6 +98,7 @@ ModalDialog DLG_UUI_UNKNOWNAUTH
RadioButton RB_ACCEPT_1
{
+ HelpID = "uui:RadioButton:DLG_UUI_UNKNOWNAUTH:RB_ACCEPT_1";
Pos = MAP_APPFONT( DLG_TEXT_START_X, DLG_RADIOBTN_START_Y );
Size = MAP_APPFONT( 182, RSC_CD_RADIOBUTTON_HEIGHT );
@@ -106,6 +109,7 @@ ModalDialog DLG_UUI_UNKNOWNAUTH
RadioButton RB_DONTACCEPT_2
{
+ HelpID = "uui:RadioButton:DLG_UUI_UNKNOWNAUTH:RB_DONTACCEPT_2";
Pos = MAP_APPFONT( DLG_TEXT_START_X, DLG_RADIOBTN_START_Y + RSC_CD_RADIOBUTTON_HEIGHT );
Size = MAP_APPFONT( 182, RSC_CD_RADIOBUTTON_HEIGHT );
diff --git a/uui/util/makefile.mk b/uui/util/makefile.mk
index 163a7bb550..8a77e71b5e 100644
--- a/uui/util/makefile.mk
+++ b/uui/util/makefile.mk
@@ -62,3 +62,11 @@ RESLIB1SRSFILES = \
$(SRS)$/source.srs
.INCLUDE: target.mk
+
+ALLTAR : $(MISC)/uui.component
+
+$(MISC)/uui.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ uui.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt uui.component
diff --git a/uui/util/uui.component b/uui/util/uui.component
new file mode 100644
index 0000000000..0a15ad6eb8
--- /dev/null
+++ b/uui/util/uui.component
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* 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).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation
+ name="com.sun.star.comp.uui.PasswordContainerInteractionHandler">
+ <service name="com.sun.star.task.PasswordContainerInteractionHandler"/>
+ </implementation>
+ <implementation name="com.sun.star.comp.uui.UUIInteractionHandler">
+ <service name="com.sun.star.configuration.backend.InteractionHandler"/>
+ <service name="com.sun.star.task.InteractionHandler"/>
+ <service name="com.sun.star.uui.InteractionHandler"/>
+ </implementation>
+ <implementation
+ name="com.sun.star.comp.uui.UUIInteractionRequestStringResolver">
+ <service name="com.sun.star.task.InteractionRequestStringResolver"/>
+ </implementation>
+</component>