summaryrefslogtreecommitdiff
path: root/uui
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-12-12 12:52:51 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-12-12 12:52:51 +0000
commit4aea6bc177a92f159bb19e9870fe86b6a034dabc (patch)
treee97002e911982ba1cfd85bd5d08ebe523d88de05 /uui
parentb167d99496b51b8c7ce6e823cbd654cb064ff685 (diff)
CWS-TOOLING: integrate CWS fwk92
2008-12-04 14:43:28 +0100 oc r264844 : #i96788# 2008-12-03 02:15:17 +0100 fredrikh r264734 : i96817 2008-12-02 16:42:46 +0100 tbo r264720 : #i96763# changes to password dialog for framework, math, global 2008-11-26 16:26:28 +0100 mav r264418 : #i93617# fix typo 2008-11-26 16:13:03 +0100 mav r264411 : #i93617# fix the linux scenario 2008-11-25 17:58:01 +0100 mav r264323 : #i93617# fix the windows problems 2008-11-25 17:51:33 +0100 mav r264321 : #i93617# fix the windows problems 2008-11-21 16:01:18 +0100 mav r264145 : #i78753# integrate the patch 2008-11-21 14:08:32 +0100 mav r264136 : #i93617# integrate the patch 2008-11-21 13:01:56 +0100 mav r264127 : #i82947# integrate the patch 2008-11-20 18:14:19 +0100 mav r264092 : #i95793# look for import filter 2008-11-18 15:23:44 +0100 pb r263776 : fix: #i92579# #i92583# SvxSecurity/SearchPage: more space for controls 2008-11-18 15:21:39 +0100 pb r263774 : fix: #i92579# #i92583# SvxSecurity/SearchPage: more space for controls 2008-11-18 15:18:54 +0100 pb r263772 : fix: #i92583# SvxSearchPage::InitControls_Impl() added 2008-11-18 15:16:07 +0100 pb r263771 : fix: #i92579# columns calculated newly 2008-11-18 11:09:28 +0100 mav r263751 : #i21923# small fixes 2008-11-17 17:22:04 +0100 mav r263730 : #i21923# integrate the patch 2008-11-17 14:29:02 +0100 mav r263723 : #i21923# integrate the patch 2008-11-13 16:46:08 +0100 mav r263653 : #i88127# integrate the patch 2008-11-13 14:46:56 +0100 mav r263645 : #i54638# integrate the patch 2008-11-11 13:11:03 +0100 pb r263554 : fix: #i93142# disable maRecommReadOnlyCB on read-only documents 2008-11-10 13:30:58 +0100 pb r263516 : fix: #i93833# Mozilla Plug-in -> Browser Plug-in 2008-11-10 13:29:10 +0100 pb r263515 : fix: #i93833# Mozilla Plug-in -> Browser Plug-in 2008-11-10 06:10:11 +0100 pb r263505 : fix: #i94937# now .uno.ExtendedHelp without image 2008-11-04 20:52:50 +0100 mav r263337 : migrate cws fwk92 to svn
Diffstat (limited to 'uui')
-rw-r--r--uui/source/iahndl.cxx20
-rw-r--r--uui/source/masterpasscrtdlg.cxx33
-rw-r--r--uui/source/masterpasscrtdlg.hrc2
-rw-r--r--uui/source/masterpasscrtdlg.hxx3
-rw-r--r--uui/source/masterpasscrtdlg.src49
-rw-r--r--uui/source/masterpassworddlg.cxx1
-rw-r--r--uui/source/masterpassworddlg.hrc1
-rw-r--r--uui/source/masterpassworddlg.hxx1
-rw-r--r--uui/source/masterpassworddlg.src29
-rw-r--r--uui/source/passcrtdlg.cxx64
-rw-r--r--uui/source/passcrtdlg.hrc24
-rw-r--r--uui/source/passcrtdlg.hxx16
-rw-r--r--uui/source/passcrtdlg.src81
-rw-r--r--uui/source/passworddlg.cxx66
-rw-r--r--uui/source/passworddlg.hrc21
-rw-r--r--uui/source/passworddlg.hxx15
-rw-r--r--uui/source/passworddlg.src37
-rw-r--r--uui/source/passworderrs.src6
18 files changed, 280 insertions, 189 deletions
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index 8d2ae77555..b12322cc80 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -1623,15 +1623,6 @@ UUIInteractionHelper::executePasswordDialog(
xDialog(new PasswordCreateDialog(
getParentProperty(), xManager.get()));
- ::rtl::OUString aTitle( xDialog->GetText() );
- if( aDocName.getLength() )
- {
- aTitle += ::rtl::OUString::createFromAscii( " [" );
- aTitle += aDocName;
- aTitle += ::rtl::OUString::createFromAscii( "]" );
- xDialog->SetText( aTitle );
- }
-
rInfo.SetResult(xDialog->Execute() == RET_OK ? ERRCODE_BUTTON_OK :
ERRCODE_BUTTON_CANCEL);
rInfo.SetPassword( xDialog->GetPassword() );
@@ -1640,16 +1631,7 @@ UUIInteractionHelper::executePasswordDialog(
{
std::auto_ptr< PasswordDialog >
xDialog(new PasswordDialog(
- getParentProperty(), nMode, xManager.get()));
-
- ::rtl::OUString aTitle( xDialog->GetText() );
- if( aDocName.getLength() )
- {
- aTitle += ::rtl::OUString::createFromAscii( " [" );
- aTitle += aDocName;
- aTitle += ::rtl::OUString::createFromAscii( "]" );
- xDialog->SetText( aTitle );
- }
+ getParentProperty(), nMode, xManager.get(), aDocName ));
rInfo.SetResult(xDialog->Execute() == RET_OK ? ERRCODE_BUTTON_OK :
ERRCODE_BUTTON_CANCEL);
diff --git a/uui/source/masterpasscrtdlg.cxx b/uui/source/masterpasscrtdlg.cxx
index 3fff44076e..d4e4ec8c3c 100644
--- a/uui/source/masterpasscrtdlg.cxx
+++ b/uui/source/masterpasscrtdlg.cxx
@@ -82,6 +82,8 @@ MasterPasswordCreateDialog::MasterPasswordCreateDialog
aEDMasterPasswordCrt ( this, ResId( ED_MASTERPASSWORD_CRT, *pResMgr ) ),
aFTMasterPasswordRepeat ( this, ResId( FT_MASTERPASSWORD_REPEAT, *pResMgr ) ),
aEDMasterPasswordRepeat ( this, ResId( ED_MASTERPASSWORD_REPEAT, *pResMgr ) ),
+ aFTMasterPasswordWarning ( this, ResId( FT_MASTERPASSWORD_WARNING, *pResMgr ) ),
+ aFL ( this, ResId( FL_FIXED_LINE, *pResMgr ) ),
aOKBtn ( this, ResId( BTN_MASTERPASSCRT_OK, *pResMgr ) ),
aCancelBtn ( this, ResId( BTN_MASTERPASSCRT_CANCEL, *pResMgr ) ),
aHelpBtn ( this, ResId( BTN_MASTERPASSCRT_HELP, *pResMgr ) ),
@@ -93,5 +95,36 @@ MasterPasswordCreateDialog::MasterPasswordCreateDialog
aOKBtn.Enable( sal_False );
aOKBtn.SetClickHdl( LINK( this, MasterPasswordCreateDialog, OKHdl_Impl ) );
aEDMasterPasswordCrt.SetModifyHdl( LINK( this, MasterPasswordCreateDialog, EditHdl_Impl ) );
+
+ long nLableWidth = aFTMasterPasswordWarning.GetSizePixel().Width();
+ long nLabelHeight = aFTMasterPasswordWarning.GetSizePixel().Height();
+ long nTextWidth = aFTMasterPasswordWarning.GetCtrlTextWidth( aFTMasterPasswordWarning.GetText() );
+ long nTextHeight = aFTMasterPasswordWarning.GetTextHeight();
+
+ Rectangle aLabelRect( aFTMasterPasswordWarning.GetPosPixel(), aFTMasterPasswordWarning.GetSizePixel() );
+ Rectangle aRect = aFTMasterPasswordWarning.GetTextRect( aLabelRect, aFTMasterPasswordWarning.GetText() );
+
+ long nNewLabelHeight = 0;
+ for( nNewLabelHeight = ( nTextWidth / nLableWidth + 1 ) * nTextHeight;
+ nNewLabelHeight < aRect.GetHeight();
+ nNewLabelHeight += nTextHeight );
+
+ long nDelta = nNewLabelHeight - nLabelHeight;
+ Size aNewDlgSize = GetSizePixel();
+ aNewDlgSize.Height() += nDelta;
+ SetSizePixel( aNewDlgSize );
+
+ Size aNewWarningSize = aFTMasterPasswordWarning.GetSizePixel();
+ aNewWarningSize.Height() = nNewLabelHeight;
+ aFTMasterPasswordWarning.SetPosSizePixel( aFTMasterPasswordWarning.GetPosPixel(), aNewWarningSize );
+
+ Window* pControls[] = { &aFL, &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/masterpasscrtdlg.hrc b/uui/source/masterpasscrtdlg.hrc
index 48e22b63ae..811023db51 100644
--- a/uui/source/masterpasscrtdlg.hrc
+++ b/uui/source/masterpasscrtdlg.hrc
@@ -36,6 +36,8 @@
#define ED_MASTERPASSWORD_CRT 21
#define FT_MASTERPASSWORD_REPEAT 22
#define ED_MASTERPASSWORD_REPEAT 23
+#define FT_MASTERPASSWORD_WARNING 24
+#define FL_FIXED_LINE 30
#define BTN_MASTERPASSCRT_OK 50
#define BTN_MASTERPASSCRT_CANCEL 51
diff --git a/uui/source/masterpasscrtdlg.hxx b/uui/source/masterpasscrtdlg.hxx
index 9bd4059bde..077b686cb8 100644
--- a/uui/source/masterpasscrtdlg.hxx
+++ b/uui/source/masterpasscrtdlg.hxx
@@ -41,6 +41,7 @@
#include <vcl/dialog.hxx>
#include <vcl/edit.hxx>
#include <vcl/group.hxx>
+#include <vcl/fixed.hxx>
//============================================================================
class MasterPasswordCreateDialog : public ModalDialog
@@ -49,6 +50,8 @@ class MasterPasswordCreateDialog : public ModalDialog
Edit aEDMasterPasswordCrt;
FixedText aFTMasterPasswordRepeat;
Edit aEDMasterPasswordRepeat;
+ FixedText aFTMasterPasswordWarning;
+ FixedLine aFL;
OKButton aOKBtn;
CancelButton aCancelBtn;
HelpButton aHelpBtn;
diff --git a/uui/source/masterpasscrtdlg.src b/uui/source/masterpasscrtdlg.src
index 39cd82d26d..4ab8c6ba39 100644
--- a/uui/source/masterpasscrtdlg.src
+++ b/uui/source/masterpasscrtdlg.src
@@ -44,51 +44,64 @@ ModalDialog DLG_UUI_MASTERPASSWORD_CRT
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
- Size = MAP_APPFONT ( 265 , 64 ) ;
+ Size = MAP_APPFONT ( 175 ,135 ) ;
FixedText FT_MASTERPASSWORD_CRT
{
- Pos = MAP_APPFONT ( 12 , 17 ) ;
- Size = MAP_APPFONT ( 71 , 10 ) ;
- Text [ en-US ] = "Master password";
+ Pos = MAP_APPFONT ( 3 , 4 ) ;
+ Size = MAP_APPFONT ( 169 , 9 ) ;
+ Text [ en-US ] = "Enter new password";
};
Edit ED_MASTERPASSWORD_CRT
{
Border = TRUE ;
- Pos = MAP_APPFONT ( 86 , 16 ) ;
- Size = MAP_APPFONT ( 94 , 12 ) ;
+ Pos = MAP_APPFONT ( 3 , 17 ) ;
+ Size = MAP_APPFONT ( 169 , 13 ) ;
PassWord = TRUE ;
};
FixedText FT_MASTERPASSWORD_REPEAT
{
- Pos = MAP_APPFONT ( 12 , 37 ) ;
- Size = MAP_APPFONT ( 71 , 10 ) ;
- Text [ en-US ] = "~Confirm master password";
+ Pos = MAP_APPFONT ( 3 , 33 ) ;
+ Size = MAP_APPFONT ( 169 , 9 ) ;
+ Text [ en-US ] = "~Reenter password";
};
Edit ED_MASTERPASSWORD_REPEAT
{
Border = TRUE ;
- Pos = MAP_APPFONT ( 86 , 36 ) ;
- Size = MAP_APPFONT ( 94 , 12 ) ;
+ Pos = MAP_APPFONT ( 3 , 46 ) ;
+ Size = MAP_APPFONT ( 169 , 13 ) ;
PassWord = TRUE ;
};
+ FixedText FT_MASTERPASSWORD_WARNING
+ {
+ Pos = MAP_APPFONT ( 3 , 62 ) ;
+ Size = MAP_APPFONT ( 169 , 42 ) ;
+ 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.";
+ WordBreak = TRUE;
+ };
+ FixedLine FL_FIXED_LINE
+ {
+ Pos = MAP_APPFONT( 0, 105 );
+ Size = MAP_APPFONT( 175, 6 );
+ };
+
OKButton BTN_MASTERPASSCRT_OK
{
- Pos = MAP_APPFONT ( 209 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT ( 65 , 115 ) ;
+ Size = MAP_APPFONT ( 51 , 13 ) ;
DefButton = TRUE ;
};
CancelButton BTN_MASTERPASSCRT_CANCEL
{
- Pos = MAP_APPFONT ( 209 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT ( 120 , 115 ) ;
+ Size = MAP_APPFONT ( 51 , 13 ) ;
};
HelpButton BTN_MASTERPASSCRT_HELP
{
- Pos = MAP_APPFONT ( 209 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT ( 5 , 115 ) ;
+ Size = MAP_APPFONT ( 51 , 13 ) ;
};
- Text [ en-US ] = "Enter Master Password";
+ Text [ en-US ] = "Change Master Password";
};
diff --git a/uui/source/masterpassworddlg.cxx b/uui/source/masterpassworddlg.cxx
index 5dbd7f20bd..9a5e667e43 100644
--- a/uui/source/masterpassworddlg.cxx
+++ b/uui/source/masterpassworddlg.cxx
@@ -62,6 +62,7 @@ MasterPasswordDialog::MasterPasswordDialog
aFTMasterPassword ( this, ResId( FT_MASTERPASSWORD, *pResMgr ) ),
aEDMasterPassword ( this, ResId( ED_MASTERPASSWORD, *pResMgr ) ),
+ aFL ( this, ResId( FL_FIXED_LINE, *pResMgr ) ),
aOKBtn ( this, ResId( BTN_MASTERPASSWORD_OK, *pResMgr ) ),
aCancelBtn ( this, ResId( BTN_MASTERPASSWORD_CANCEL, *pResMgr ) ),
aHelpBtn ( this, ResId( BTN_MASTERPASSWORD_HELP, *pResMgr ) ),
diff --git a/uui/source/masterpassworddlg.hrc b/uui/source/masterpassworddlg.hrc
index 26667860ec..32649dd578 100644
--- a/uui/source/masterpassworddlg.hrc
+++ b/uui/source/masterpassworddlg.hrc
@@ -36,6 +36,7 @@
#define ED_MASTERPASSWORD 21
#define FT_MASTERPASSWORD_REPEAT 22
#define ED_MASTERPASSWORD_REPEAT 23
+#define FL_FIXED_LINE 30
#define BTN_MASTERPASSWORD_OK 50
#define BTN_MASTERPASSWORD_CANCEL 51
diff --git a/uui/source/masterpassworddlg.hxx b/uui/source/masterpassworddlg.hxx
index 78f0ecc6b2..228e2ea223 100644
--- a/uui/source/masterpassworddlg.hxx
+++ b/uui/source/masterpassworddlg.hxx
@@ -47,6 +47,7 @@ class MasterPasswordDialog : public ModalDialog
{
FixedText aFTMasterPassword;
Edit aEDMasterPassword;
+ FixedLine aFL;
OKButton aOKBtn;
CancelButton aCancelBtn;
HelpButton aHelpBtn;
diff --git a/uui/source/masterpassworddlg.src b/uui/source/masterpassworddlg.src
index d1ed787dfd..3c2d6a5817 100644
--- a/uui/source/masterpassworddlg.src
+++ b/uui/source/masterpassworddlg.src
@@ -44,36 +44,41 @@ ModalDialog DLG_UUI_MASTERPASSWORD
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
- Size = MAP_APPFONT ( 265 , 64 ) ;
+ Size = MAP_APPFONT ( 175 , 66 ) ;
FixedText FT_MASTERPASSWORD
{
- Pos = MAP_APPFONT ( 12 , 27 ) ;
- Size = MAP_APPFONT ( 71 , 10 ) ;
- Text [ en-US ] = "Master password";
+ Pos = MAP_APPFONT ( 3 , 4 ) ;
+ Size = MAP_APPFONT ( 169 , 9 ) ;
+ Text [ en-US ] = "Enter password";
};
Edit ED_MASTERPASSWORD
{
Border = TRUE ;
- Pos = MAP_APPFONT ( 86 , 26 ) ;
- Size = MAP_APPFONT ( 94 , 12 ) ;
+ Pos = MAP_APPFONT ( 3 , 17 ) ;
+ Size = MAP_APPFONT ( 169 , 13 ) ;
PassWord = TRUE ;
};
+ FixedLine FL_FIXED_LINE
+ {
+ Pos = MAP_APPFONT( 0, 35 );
+ Size = MAP_APPFONT( 175, 6 );
+ };
OKButton BTN_MASTERPASSWORD_OK
{
- Pos = MAP_APPFONT ( 209 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT ( 65 , 45 ) ;
+ Size = MAP_APPFONT ( 51 , 13 ) ;
DefButton = TRUE ;
};
CancelButton BTN_MASTERPASSWORD_CANCEL
{
- Pos = MAP_APPFONT ( 209 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT ( 120 , 45 ) ;
+ Size = MAP_APPFONT ( 51 , 13 ) ;
};
HelpButton BTN_MASTERPASSWORD_HELP
{
- Pos = MAP_APPFONT ( 209 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT ( 5 , 45 ) ;
+ Size = MAP_APPFONT ( 51 , 13 ) ;
};
Text [ en-US ] = "Enter Master Password";
};
diff --git a/uui/source/passcrtdlg.cxx b/uui/source/passcrtdlg.cxx
index 887f60a9d9..6a48122352 100644
--- a/uui/source/passcrtdlg.cxx
+++ b/uui/source/passcrtdlg.cxx
@@ -61,7 +61,6 @@ IMPL_LINK( PasswordCreateDialog, OKHdl_Impl, OKButton *, EMPTYARG )
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();
}
@@ -70,23 +69,19 @@ IMPL_LINK( PasswordCreateDialog, OKHdl_Impl, OKButton *, EMPTYARG )
// -----------------------------------------------------------------------
-PasswordCreateDialog::PasswordCreateDialog
-(
- Window* pParent,
- ResMgr* pResMgr
-) :
-
- 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 ) ),
- aOKBtn ( this, ResId( BTN_PASSCRT_OK, *pResMgr ) ),
- aCancelBtn ( this, ResId( BTN_PASSCRT_CANCEL, *pResMgr ) ),
- aHelpBtn ( this, ResId( BTN_PASSCRT_HELP, *pResMgr ) ),
- pResourceMgr ( pResMgr ),
- nMinLen(5)
+PasswordCreateDialog::PasswordCreateDialog( Window* _pParent, ResMgr * pResMgr )
+ :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( 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(5)
{
FreeResource();
@@ -94,5 +89,36 @@ PasswordCreateDialog::PasswordCreateDialog
aEDPasswordCrt.SetModifyHdl( LINK( this, PasswordCreateDialog, EditHdl_Impl ) );
aOKBtn.Enable( sal_False );
-};
+ 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.hrc b/uui/source/passcrtdlg.hrc
index b39717a8d9..a899f98853 100644
--- a/uui/source/passcrtdlg.hrc
+++ b/uui/source/passcrtdlg.hrc
@@ -28,17 +28,19 @@
*
************************************************************************/
-#ifndef UUI_PASSCRT_HRC
-#define UUI_PASSCRT_HRC
+#ifndef UUI_PASSCRTDLG_HRC
+#define UUI_PASSCRTDLG_HRC
-//============================================================================
-#define FT_PASSWORD_CRT 20
-#define ED_PASSWORD_CRT 21
-#define FT_PASSWORD_REPEAT 22
-#define ED_PASSWORD_REPEAT 23
+// 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 BTN_PASSCRT_OK 50
-#define BTN_PASSCRT_CANCEL 51
-#define BTN_PASSCRT_HELP 52
-#endif // UUI_PASSCRT_HRC
+#endif // UUI_PASSCRTDLG_HRC
diff --git a/uui/source/passcrtdlg.hxx b/uui/source/passcrtdlg.hxx
index 8f84293ba5..eeb2ca3a68 100644
--- a/uui/source/passcrtdlg.hxx
+++ b/uui/source/passcrtdlg.hxx
@@ -31,16 +31,12 @@
#ifndef UUI_PASSCRTDLG_HXX
#define UUI_PASSCRTDLG_HXX
-#ifndef _COM_SUN_STAR_TASK_PASSWORDREQUESTMODE_HPP
#include <com/sun/star/task/PasswordRequestMode.hpp>
-#endif
#include <svtools/stdctrl.hxx>
-#ifndef _SV_BUTTON_HXX
-#include <vcl/button.hxx>
-#endif
#include <vcl/dialog.hxx>
#include <vcl/edit.hxx>
-#include <vcl/group.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/button.hxx>
//============================================================================
class PasswordCreateDialog : public ModalDialog
@@ -49,10 +45,14 @@ class PasswordCreateDialog : public ModalDialog
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 * );
@@ -61,10 +61,6 @@ public:
PasswordCreateDialog( Window* pParent, ResMgr * pResMgr );
String GetPassword() const { return aEDPasswordCrt.GetText(); }
-
-private:
- ResMgr* pResourceMgr;
- sal_uInt16 nMinLen;
};
#endif // UUI_PASSCRTDLG_HXX
diff --git a/uui/source/passcrtdlg.src b/uui/source/passcrtdlg.src
index dc4aac63a6..719d13a794 100644
--- a/uui/source/passcrtdlg.src
+++ b/uui/source/passcrtdlg.src
@@ -34,7 +34,7 @@
#include <ids.hrc>
#endif
#ifndef UUI_PASSCRTDLG_HRC
-#include <passcrtdlg.hrc>
+#include "passcrtdlg.hrc"
#endif
ModalDialog DLG_UUI_PASSWORD_CRT
@@ -44,74 +44,61 @@ ModalDialog DLG_UUI_PASSWORD_CRT
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
- Size = MAP_APPFONT ( 165 , 67 ) ;
+ Size = MAP_APPFONT( 145, 129 );
FixedText FT_PASSWORD_CRT
{
- Pos = MAP_APPFONT ( 6 , 5 ) ;
- Size = MAP_APPFONT ( 94 , 10 ) ;
- Text [ en-US ] = "~Enter password";
+ Pos = MAP_APPFONT( 3, 4 );
+ Size = MAP_APPFONT( 139, 9 );
+ Text [ en-US ] = "Enter password";
};
Edit ED_PASSWORD_CRT
{
Border = TRUE ;
- Pos = MAP_APPFONT ( 6 , 15 ) ;
- Size = MAP_APPFONT ( 94 , 12 ) ;
+ Pos = MAP_APPFONT( 3, 17 );
+ Size = MAP_APPFONT( 139, 13 );
PassWord = TRUE ;
};
- FixedText FT_PASSWORD_REPEAT
- {
- Pos = MAP_APPFONT ( 6 , 34 ) ;
- Size = MAP_APPFONT ( 94 , 10 ) ;
- Text [ en-US ] = "~Confirm password";
- };
Edit ED_PASSWORD_REPEAT
{
Border = TRUE ;
- Pos = MAP_APPFONT ( 6 , 44 ) ;
- Size = MAP_APPFONT ( 94 , 12 ) ;
+ Pos = MAP_APPFONT( 3, 47 );
+ Size = MAP_APPFONT( 139, 13 );
PassWord = TRUE ;
};
-
OKButton BTN_PASSCRT_OK
{
- Pos = MAP_APPFONT ( 109 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT( 27, 110 );
+ Size = MAP_APPFONT( 37, 15 );
DefButton = TRUE ;
};
CancelButton BTN_PASSCRT_CANCEL
{
- Pos = MAP_APPFONT ( 109 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT( 66, 110 );
+ Size = MAP_APPFONT( 37, 15 );
};
HelpButton BTN_PASSCRT_HELP
{
- Pos = MAP_APPFONT ( 109 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT( 105, 110 );
+ Size = MAP_APPFONT( 37, 15 );
};
- Text [ en-US ] = "Password";
+ 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 and at least five 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/passworddlg.cxx b/uui/source/passworddlg.cxx
index 72d54b1dea..1be6742283 100644
--- a/uui/source/passworddlg.cxx
+++ b/uui/source/passworddlg.cxx
@@ -53,30 +53,64 @@ IMPL_LINK( PasswordDialog, OKHdl_Impl, OKButton *, EMPTYARG )
PasswordDialog::PasswordDialog
(
- Window* pParent,
- ::com::sun::star::task::PasswordRequestMode aDialogMode,
- ResMgr* pResMgr
-) :
-
- 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 ) ),
- nDialogMode ( aDialogMode ),
- pResourceMgr ( pResMgr )
+ Window* _pParent,
+ ::com::sun::star::task::PasswordRequestMode nDlgMode,
+ ResMgr * pResMgr,
+ rtl::OUString& aDocURL
+ )
+ :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 )
{
if( nDialogMode == ::com::sun::star::task::PasswordRequestMode_PASSWORD_REENTER )
{
String aErrorMsg( ResId( STR_ERROR_PASSWORD_WRONG, *pResourceMgr ));
- ErrorBox aErrorBox( pParent, WB_OK, aErrorMsg );
+ ErrorBox aErrorBox( _pParent, WB_OK, aErrorMsg );
aErrorBox.Execute();
}
FreeResource();
+ aFTPassword.SetText( aFTPassword.GetText() + aDocURL );
+
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();
+
+ Rectangle aLabelRect( aFTPassword.GetPosPixel(), aFTPassword.GetSizePixel() );
+ Rectangle aRect = aFTPassword.GetTextRect( aLabelRect, aFTPassword.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 aNewLabelSize = aFTPassword.GetSizePixel();
+ 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 )
+ {
+ Point aNewPos =(*pControls[i]).GetPosPixel();
+ aNewPos.Y() += nDelta;
+ pControls[i]->SetPosSizePixel( aNewPos, pControls[i]->GetSizePixel() );
+ }
+
+}
diff --git a/uui/source/passworddlg.hrc b/uui/source/passworddlg.hrc
index c1bb0c7d6e..ccfa706c60 100644
--- a/uui/source/passworddlg.hrc
+++ b/uui/source/passworddlg.hrc
@@ -28,17 +28,16 @@
*
************************************************************************/
-#ifndef UUI_PASSWORD_HRC
-#define UUI_PASSWORD_HRC
+#ifndef PASSWORDDLG_HRC
+#define PASSWORDDLG_HRC
-//============================================================================
-#define FT_PASSWORD 20
-#define ED_PASSWORD 21
-#define FT_PASSWORD_REPEAT 22
-#define ED_PASSWORD_REPEAT 23
+// 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 50
-#define BTN_PASSWORD_CANCEL 51
-#define BTN_PASSWORD_HELP 52
-#endif // UUI_PASSWORD_HRC
+#endif // PASSWORDDLG_HRC
diff --git a/uui/source/passworddlg.hxx b/uui/source/passworddlg.hxx
index 1961493247..18c4996a7a 100644
--- a/uui/source/passworddlg.hxx
+++ b/uui/source/passworddlg.hxx
@@ -28,19 +28,16 @@
*
************************************************************************/
-#ifndef UUI_PASSWORDDLG_HXX
-#define UUI_PASSWORDDLG_HXX
+#ifndef PASSWORDDLG_HXX
+#define PASSWORDDLG_HXX
-#ifndef _COM_SUN_STAR_TASK_PASSWORDREQUESTMODE_HPP
#include <com/sun/star/task/PasswordRequestMode.hpp>
-#endif
#include <svtools/stdctrl.hxx>
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
#include <vcl/dialog.hxx>
#include <vcl/edit.hxx>
#include <vcl/group.hxx>
+#include <vcl/fixed.hxx>
//============================================================================
class PasswordDialog : public ModalDialog
@@ -50,12 +47,13 @@ class PasswordDialog : public ModalDialog
OKButton aOKBtn;
CancelButton aCancelBtn;
HelpButton aHelpBtn;
+ FixedLine aFixedLine1;
DECL_LINK( OKHdl_Impl, OKButton * );
public:
- PasswordDialog( Window* pParent, ::com::sun::star::task::PasswordRequestMode nDlgMode, ResMgr * pResMgr );
+ PasswordDialog( Window* pParent, ::com::sun::star::task::PasswordRequestMode nDlgMode, ResMgr * pResMgr, ::rtl::OUString& aDocURL );
String GetPassword() const { return aEDPassword.GetText(); }
@@ -64,5 +62,4 @@ private:
ResMgr* pResourceMgr;
};
-#endif // UUI_PASSWORDDLG_HXX
-
+#endif // PASSWORDDLG_HXX
diff --git a/uui/source/passworddlg.src b/uui/source/passworddlg.src
index 75305c133a..be21a82ce4 100644
--- a/uui/source/passworddlg.src
+++ b/uui/source/passworddlg.src
@@ -44,37 +44,46 @@ ModalDialog DLG_UUI_PASSWORD
Moveable = TRUE ;
OutputSize = TRUE ;
SVLook = TRUE ;
- Size = MAP_APPFONT ( 165 , 64 ) ;
- Text [ en-US ] = "Password";
+ Size = MAP_APPFONT( 145, 75 );
+ Text [ en-US ] = "Enter password";
FixedText FT_PASSWORD
{
- Pos = MAP_APPFONT ( 6 , 5 ) ;
- Size = MAP_APPFONT ( 94 , 10 ) ;
- Text [ en-US ] = "Enter password";
+ Pos = MAP_APPFONT( 3, 4 );
+ Size = MAP_APPFONT( 139, 28 );
+ Text [ en-US ] = "Enter password to open the file: \n";
+ WordBreak = TRUE;
};
+
Edit ED_PASSWORD
{
+ Pos = MAP_APPFONT( 3, 35 );
+ Size = MAP_APPFONT( 139, 13 );
Border = TRUE ;
- Pos = MAP_APPFONT ( 6 , 15 ) ;
- Size = MAP_APPFONT ( 94 , 12 ) ;
PassWord = TRUE ;
};
OKButton BTN_PASSWORD_OK
{
- Pos = MAP_APPFONT ( 109 , 6 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
- DefButton = TRUE ;
+ Pos = MAP_APPFONT( 27, 56 );
+ Size = MAP_APPFONT( 37, 15 );
};
+
CancelButton BTN_PASSWORD_CANCEL
{
- Pos = MAP_APPFONT ( 109 , 23 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT( 66, 56 );
+ Size = MAP_APPFONT( 37, 15 );
};
+
HelpButton BTN_PASSWORD_HELP
{
- Pos = MAP_APPFONT ( 109 , 43 ) ;
- Size = MAP_APPFONT ( 50 , 14 ) ;
+ Pos = MAP_APPFONT( 105, 56 );
+ Size = MAP_APPFONT( 37, 15 );
+ };
+
+ FixedLine FL_FIXED_LINE_1
+ {
+ Pos = MAP_APPFONT( 0, 50 );
+ Size = MAP_APPFONT( 145, 6 );
};
};
diff --git a/uui/source/passworderrs.src b/uui/source/passworderrs.src
index 6f03df074a..6bb98d1bdb 100644
--- a/uui/source/passworderrs.src
+++ b/uui/source/passworderrs.src
@@ -36,17 +36,17 @@
String STR_ERROR_PASSWORD_WRONG
{
- Text [ en-US ] = "An incorrect password was entered. Please enter it again.";
+ Text [ en-US ] = "The password is incorrect. The document cannot be opened.";
};
String STR_ERROR_MASTERPASSWORD_WRONG
{
- Text [ en-US ] = "An incorrect master password was entered. Please enter it again.";
+ 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.";
};
String STR_ERROR_PASSWORDS_NOT_IDENTICAL
{
- Text [ en-US ] = "The passwords do not match. Please enter the password again.";
+ Text [ en-US ] = "The password confirmation does not match.";
};