summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cui/UIConfig_cui.mk1
-rw-r--r--cui/source/dialogs/passwdomdlg.cxx195
-rw-r--r--cui/source/dialogs/passwdomdlg.hrc50
-rw-r--r--cui/source/dialogs/passwdomdlg.src193
-rw-r--r--cui/source/inc/cuires.hrc9
-rw-r--r--cui/source/inc/helpid.hrc7
-rw-r--r--cui/uiconfig/ui/password.ui329
7 files changed, 411 insertions, 373 deletions
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk
index 49919721ab77..9a7040566a01 100644
--- a/cui/UIConfig_cui.mk
+++ b/cui/UIConfig_cui.mk
@@ -117,6 +117,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\
cui/uiconfig/ui/paragalignpage \
cui/uiconfig/ui/paraindentspacing \
cui/uiconfig/ui/paratabspage \
+ cui/uiconfig/ui/password \
cui/uiconfig/ui/pastespecial \
cui/uiconfig/ui/percentdialog \
cui/uiconfig/ui/personalization_tab \
diff --git a/cui/source/dialogs/passwdomdlg.cxx b/cui/source/dialogs/passwdomdlg.cxx
index fba34921ca79..1a86bc480d6a 100644
--- a/cui/source/dialogs/passwdomdlg.cxx
+++ b/cui/source/dialogs/passwdomdlg.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "passwdomdlg.hrc"
#include "passwdomdlg.hxx"
#include "cuires.hrc"
@@ -27,78 +26,21 @@
#include <vcl/fixed.hxx>
#include <vcl/edit.hxx>
#include <vcl/button.hxx>
-#include <vcl/morebtn.hxx>
+#include <vcl/layout.hxx>
#include <vcl/settings.hxx>
#include <vcl/msgbox.hxx>
-
-
-
-class PasswordReenterEdit_Impl : public Edit
-{
- OUString m_aDefaultTxt;
-
- // disallow use of copy c-tor and assignment operator
- PasswordReenterEdit_Impl( const PasswordReenterEdit_Impl & );
- PasswordReenterEdit_Impl & operator = ( const PasswordReenterEdit_Impl & );
-
-public:
- PasswordReenterEdit_Impl( Window * pParent, const ResId &rResId );
- virtual ~PasswordReenterEdit_Impl();
-
- // Edit
- virtual void Paint( const Rectangle& rRect );
-};
-
-
-PasswordReenterEdit_Impl::PasswordReenterEdit_Impl( Window * pParent, const ResId &rResId ) :
- Edit( pParent, rResId )
-{
-}
-
-
-PasswordReenterEdit_Impl::~PasswordReenterEdit_Impl()
-{
-}
-
-
-void PasswordReenterEdit_Impl::Paint( const Rectangle& rRect )
-{
- if (GetText().isEmpty())
- {
- Push( PUSH_TEXTCOLOR );
- SetTextColor( Color( COL_GRAY ) );
- DrawText( Point(), m_aDefaultTxt );
-
- Pop();
- }
- else
- Edit::Paint( rRect );
-}
-
-
-
-
struct PasswordToOpenModifyDialog_Impl
{
PasswordToOpenModifyDialog * m_pParent;
- FixedLine m_aFileEncryptionFL;
- FixedText m_aPasswdToOpenFT;
- Edit m_aPasswdToOpenED;
- FixedText m_aReenterPasswdToOpenFT;
- PasswordReenterEdit_Impl m_aReenterPasswdToOpenED;
- FixedText m_aPasswdNoteFT;
- FixedLine m_aButtonsFL;
- MoreButton m_aMoreFewerOptionsBTN;
- OKButton m_aOk;
- CancelButton m_aCancel;
- FixedLine m_aFileSharingOptionsFL;
- CheckBox m_aOpenReadonlyCB;
- FixedText m_aPasswdToModifyFT;
- Edit m_aPasswdToModifyED;
- FixedText m_aReenterPasswdToModifyFT;
- PasswordReenterEdit_Impl m_aReenterPasswdToModifyED;
+ Edit* m_pPasswdToOpenED;
+ Edit* m_pReenterPasswdToOpenED;
+ VclExpander* m_pOptionsExpander;
+ OKButton* m_pOk;
+ CheckBox* m_pOpenReadonlyCB;
+ Edit* m_pPasswdToModifyED;
+ Edit* m_pReenterPasswdToModifyED;
OUString m_aOneMismatch;
OUString m_aTwoMismatch;
@@ -112,70 +54,52 @@ struct PasswordToOpenModifyDialog_Impl
PasswordToOpenModifyDialog_Impl( PasswordToOpenModifyDialog * pParent,
sal_uInt16 nMinPasswdLen, sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify );
- ~PasswordToOpenModifyDialog_Impl();
};
-
PasswordToOpenModifyDialog_Impl::PasswordToOpenModifyDialog_Impl(
PasswordToOpenModifyDialog * pParent,
sal_uInt16 nMinPasswdLen,
sal_uInt16 nMaxPasswdLen,
- bool bIsPasswordToModify ) :
- m_pParent( pParent ),
- m_aFileEncryptionFL ( pParent, CUI_RES( FL_FILE_ENCRYPTION ) ),
- m_aPasswdToOpenFT ( pParent, CUI_RES( FT_PASSWD_TO_OPEN ) ),
- m_aPasswdToOpenED ( pParent, CUI_RES( ED_PASSWD_TO_OPEN ) ),
- m_aReenterPasswdToOpenFT ( pParent, CUI_RES( FT_REENTER_PASSWD_TO_OPEN ) ),
- m_aReenterPasswdToOpenED ( pParent, CUI_RES( ED_REENTER_PASSWD_TO_OPEN ) ),
- m_aPasswdNoteFT ( pParent, CUI_RES( FT_PASSWD_NOTE ) ),
- m_aButtonsFL ( pParent, CUI_RES( FL_BUTTONS ) ),
- m_aMoreFewerOptionsBTN ( pParent, CUI_RES( BTN_MORE_FEWER_OPTIONS ) ),
- m_aOk ( pParent, CUI_RES( BTN_OK ) ),
- m_aCancel ( pParent, CUI_RES( BTN_CANCEL ) ),
- m_aFileSharingOptionsFL ( pParent, CUI_RES( FL_FILE_SHARING_OPTIONS ) ),
- m_aOpenReadonlyCB ( pParent, CUI_RES( CB_OPEN_READONLY ) ),
- m_aPasswdToModifyFT ( pParent, CUI_RES( FT_PASSWD_TO_MODIFY ) ),
- m_aPasswdToModifyED ( pParent, CUI_RES( ED_PASSWD_TO_MODIFY ) ),
- m_aReenterPasswdToModifyFT ( pParent, CUI_RES( FT_REENTER_PASSWD_TO_MODIFY ) ),
- m_aReenterPasswdToModifyED ( pParent, CUI_RES( ED_REENTER_PASSWD_TO_MODIFY ) ),
- m_aOneMismatch( CUI_RES( STR_ONE_PASSWORD_MISMATCH ) ),
- m_aTwoMismatch( CUI_RES( STR_TWO_PASSWORDS_MISMATCH ) ),
- m_aInvalidStateForOkButton( CUI_RES( STR_INVALID_STATE_FOR_OK_BUTTON ) ),
- m_aInvalidStateForOkButton_v2( CUI_RES( STR_INVALID_STATE_FOR_OK_BUTTON_V2 ) ),
- m_bIsPasswordToModify( bIsPasswordToModify )
+ bool bIsPasswordToModify )
+ : m_pParent( pParent )
+ , m_aOneMismatch( CUI_RES( RID_SVXSTR_ONE_PASSWORD_MISMATCH ) )
+ , m_aTwoMismatch( CUI_RES( RID_SVXSTR_TWO_PASSWORDS_MISMATCH ) )
+ , m_aInvalidStateForOkButton( CUI_RES( RID_SVXSTR_INVALID_STATE_FOR_OK_BUTTON ) )
+ , m_aInvalidStateForOkButton_v2( CUI_RES( RID_SVXSTR_INVALID_STATE_FOR_OK_BUTTON_V2 ) )
+ , m_bIsPasswordToModify( bIsPasswordToModify )
{
- m_aMoreFewerOptionsBTN.SetMoreText( CUI_RES( STR_MORE_OPTIONS ) );
- m_aMoreFewerOptionsBTN.SetLessText( CUI_RES( STR_FEWER_OPTIONS ) );
+ pParent->get(m_pPasswdToOpenED, "newpassEntry");
+ pParent->get(m_pReenterPasswdToOpenED, "confirmpassEntry");
+ pParent->get(m_pOk, "ok");
+ pParent->get(m_pOpenReadonlyCB, "readonly");
+ pParent->get(m_pPasswdToModifyED, "newpassroEntry");
+ pParent->get(m_pReenterPasswdToModifyED, "confirmropassEntry");
+ pParent->get(m_pOptionsExpander, "expander");
- m_aOk.SetClickHdl( LINK( this, PasswordToOpenModifyDialog_Impl, OkBtnClickHdl ) );
+ m_pOk->SetClickHdl( LINK( this, PasswordToOpenModifyDialog_Impl, OkBtnClickHdl ) );
if (nMaxPasswdLen)
{
- m_aPasswdToOpenED.SetMaxTextLen( nMaxPasswdLen );
- m_aReenterPasswdToOpenED.SetMaxTextLen( nMaxPasswdLen );
- m_aPasswdToModifyED.SetMaxTextLen( nMaxPasswdLen );
- m_aReenterPasswdToModifyED.SetMaxTextLen( nMaxPasswdLen );
+ m_pPasswdToOpenED->SetMaxTextLen( nMaxPasswdLen );
+ m_pReenterPasswdToOpenED->SetMaxTextLen( nMaxPasswdLen );
+ m_pPasswdToModifyED->SetMaxTextLen( nMaxPasswdLen );
+ m_pReenterPasswdToModifyED->SetMaxTextLen( nMaxPasswdLen );
}
(void) nMinPasswdLen; // currently not supported
- m_aPasswdToOpenED.GrabFocus();
+ m_pPasswdToOpenED->GrabFocus();
- m_aMoreFewerOptionsBTN.Enable( bIsPasswordToModify );
+ m_pOptionsExpander->Enable(bIsPasswordToModify);
if (!bIsPasswordToModify)
- m_aMoreFewerOptionsBTN.Hide();
-}
-
-
-PasswordToOpenModifyDialog_Impl::~PasswordToOpenModifyDialog_Impl()
-{
+ m_pOptionsExpander->Hide();
}
IMPL_LINK( PasswordToOpenModifyDialog_Impl, OkBtnClickHdl, OKButton *, EMPTYARG /*pBtn*/ )
{
- bool bInvalidState = !m_aOpenReadonlyCB.IsChecked() &&
- m_aPasswdToOpenED.GetText().isEmpty() &&
- m_aPasswdToModifyED.GetText().isEmpty();
+ bool bInvalidState = !m_pOpenReadonlyCB->IsChecked() &&
+ m_pPasswdToOpenED->GetText().isEmpty() &&
+ m_pPasswdToModifyED->GetText().isEmpty();
if (bInvalidState)
{
ErrorBox aErrorBox( m_pParent, WB_OK,
@@ -184,30 +108,30 @@ IMPL_LINK( PasswordToOpenModifyDialog_Impl, OkBtnClickHdl, OKButton *, EMPTYARG
}
else // check for mismatched passwords...
{
- const bool bToOpenMatch = m_aPasswdToOpenED.GetText() == m_aReenterPasswdToOpenED.GetText();
- const bool bToModifyMatch = m_aPasswdToModifyED.GetText() == m_aReenterPasswdToModifyED.GetText();
+ const bool bToOpenMatch = m_pPasswdToOpenED->GetText() == m_pReenterPasswdToOpenED->GetText();
+ const bool bToModifyMatch = m_pPasswdToModifyED->GetText() == m_pReenterPasswdToModifyED->GetText();
const int nMismatch = (bToOpenMatch? 0 : 1) + (bToModifyMatch? 0 : 1);
if (nMismatch > 0)
{
ErrorBox aErrorBox( m_pParent, WB_OK, nMismatch == 1 ? m_aOneMismatch : m_aTwoMismatch );
aErrorBox.Execute();
- Edit &rEdit = !bToOpenMatch? m_aPasswdToOpenED : m_aPasswdToModifyED;
- PasswordReenterEdit_Impl &rRepeatEdit = !bToOpenMatch? m_aReenterPasswdToOpenED : m_aReenterPasswdToModifyED;
+ Edit* pEdit = !bToOpenMatch ? m_pPasswdToOpenED : m_pPasswdToModifyED;
+ Edit* pRepeatEdit = !bToOpenMatch? m_pReenterPasswdToOpenED : m_pReenterPasswdToModifyED;
OUString aEmpty;
if (nMismatch == 1)
{
- rEdit.SetText( aEmpty );
- rRepeatEdit.SetText( aEmpty );
+ pEdit->SetText( aEmpty );
+ pRepeatEdit->SetText( aEmpty );
}
else if (nMismatch == 2)
{
- m_aPasswdToOpenED.SetText( aEmpty );
- m_aReenterPasswdToOpenED.SetText( aEmpty );
- m_aPasswdToModifyED.SetText( aEmpty );
- m_aReenterPasswdToModifyED.SetText( aEmpty );
+ m_pPasswdToOpenED->SetText( aEmpty );
+ m_pReenterPasswdToOpenED->SetText( aEmpty );
+ m_pPasswdToModifyED->SetText( aEmpty );
+ m_pReenterPasswdToModifyED->SetText( aEmpty );
}
- rEdit.GrabFocus();
+ pEdit->GrabFocus();
}
else
{
@@ -218,20 +142,13 @@ IMPL_LINK( PasswordToOpenModifyDialog_Impl, OkBtnClickHdl, OKButton *, EMPTYARG
return 0;
}
-
-
-
PasswordToOpenModifyDialog::PasswordToOpenModifyDialog(
- Window * pParent,
- sal_uInt16 nMinPasswdLen,
- sal_uInt16 nMaxPasswdLen,
- bool bIsPasswordToModify ) :
- SfxModalDialog( pParent, CUI_RES( RID_DLG_PASSWORD_TO_OPEN_MODIFY ) )
+ Window * pParent, sal_uInt16 nMinPasswdLen,
+ sal_uInt16 nMaxPasswdLen, bool bIsPasswordToModify)
+ : SfxModalDialog( pParent, "PasswordDialog", "cui/ui/password.ui" )
{
- m_pImpl.reset(
- new PasswordToOpenModifyDialog_Impl( this, nMinPasswdLen, nMaxPasswdLen, bIsPasswordToModify ) );
-
- FreeResource();
+ m_pImpl.reset(new PasswordToOpenModifyDialog_Impl(this,
+ nMinPasswdLen, nMaxPasswdLen, bIsPasswordToModify ) );
}
@@ -243,24 +160,24 @@ PasswordToOpenModifyDialog::~PasswordToOpenModifyDialog()
OUString PasswordToOpenModifyDialog::GetPasswordToOpen() const
{
const bool bPasswdOk =
- !m_pImpl->m_aPasswdToOpenED.GetText().isEmpty() &&
- m_pImpl->m_aPasswdToOpenED.GetText() == m_pImpl->m_aReenterPasswdToOpenED.GetText();
- return bPasswdOk ? m_pImpl->m_aPasswdToOpenED.GetText() : OUString();
+ !m_pImpl->m_pPasswdToOpenED->GetText().isEmpty() &&
+ m_pImpl->m_pPasswdToOpenED->GetText() == m_pImpl->m_pReenterPasswdToOpenED->GetText();
+ return bPasswdOk ? m_pImpl->m_pPasswdToOpenED->GetText() : OUString();
}
OUString PasswordToOpenModifyDialog::GetPasswordToModify() const
{
const bool bPasswdOk =
- !m_pImpl->m_aPasswdToModifyED.GetText().isEmpty() &&
- m_pImpl->m_aPasswdToModifyED.GetText() == m_pImpl->m_aReenterPasswdToModifyED.GetText();
- return bPasswdOk ? m_pImpl->m_aPasswdToModifyED.GetText() : OUString();
+ !m_pImpl->m_pPasswdToModifyED->GetText().isEmpty() &&
+ m_pImpl->m_pPasswdToModifyED->GetText() == m_pImpl->m_pReenterPasswdToModifyED->GetText();
+ return bPasswdOk ? m_pImpl->m_pPasswdToModifyED->GetText() : OUString();
}
bool PasswordToOpenModifyDialog::IsRecommendToOpenReadonly() const
{
- return m_pImpl->m_aOpenReadonlyCB.IsChecked();
+ return m_pImpl->m_pOpenReadonlyCB->IsChecked();
}
diff --git a/cui/source/dialogs/passwdomdlg.hrc b/cui/source/dialogs/passwdomdlg.hrc
deleted file mode 100644
index 5c54fa1eb479..000000000000
--- a/cui/source/dialogs/passwdomdlg.hrc
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed
- * with this work for additional information regarding copyright
- * ownership. The ASF licenses this file to you under the Apache
- * License, Version 2.0 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-
-#ifndef _CUI_PASSWDOMDLG_HRC_
-#define _CUI_PASSWDOMDLG_HRC_
-
-#define FL_FILE_ENCRYPTION 10
-#define FT_PASSWD_TO_OPEN 11
-#define ED_PASSWD_TO_OPEN 12
-#define FT_REENTER_PASSWD_TO_OPEN 13
-#define ED_REENTER_PASSWD_TO_OPEN 14
-#define FT_PASSWD_NOTE 17
-#define FL_BUTTONS 18
-#define BTN_MORE_FEWER_OPTIONS 19
-#define BTN_OK 20
-#define BTN_CANCEL 21
-#define FL_FILE_SHARING_OPTIONS 22
-#define FT_PASSWD_TO_MODIFY 23
-#define ED_PASSWD_TO_MODIFY 24
-#define FT_REENTER_PASSWD_TO_MODIFY 25
-#define ED_REENTER_PASSWD_TO_MODIFY 26
-#define CB_OPEN_READONLY 29
-
-#define STR_MORE_OPTIONS 51
-#define STR_FEWER_OPTIONS 52
-#define STR_PASSWD_MUST_BE_CONFIRMED 53
-#define STR_ONE_PASSWORD_MISMATCH 54
-#define STR_TWO_PASSWORDS_MISMATCH 55
-#define STR_INVALID_STATE_FOR_OK_BUTTON 56
-#define STR_INVALID_STATE_FOR_OK_BUTTON_V2 57
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/dialogs/passwdomdlg.src b/cui/source/dialogs/passwdomdlg.src
index 8de7bc1c5358..8ea1c09435d1 100644
--- a/cui/source/dialogs/passwdomdlg.src
+++ b/cui/source/dialogs/passwdomdlg.src
@@ -17,187 +17,32 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
#include <cuires.hrc>
-#include "passwdomdlg.hrc"
-#include "helpid.hrc"
-
-ModalDialog RID_DLG_PASSWORD_TO_OPEN_MODIFY
+String RID_SVXSTR_PASSWD_MUST_BE_CONFIRMED
{
- Size = MAP_APPFONT( 171, 150 );
- Text [ en-US ] = "Set Password";
- HelpId = HID_DLG_PASSWORD_TO_OPEN_MODIFY;
- Border = TRUE ;
- Moveable = TRUE ;
- OutputSize = TRUE ;
- SVLook = TRUE ;
-
- FixedLine FL_FILE_ENCRYPTION
- {
- Pos = MAP_APPFONT( 3, 3 );
- Size = MAP_APPFONT( 165, 8 );
- Text [ en-US ] = "File encryption password";
- };
-
- FixedText FT_PASSWD_TO_OPEN
- {
- Pos = MAP_APPFONT( 6, 17 );
- Size = MAP_APPFONT( 159, 8 );
- Text [ en-US ] = "~Enter password to open";
- WordBreak = TRUE;
- };
-
- Edit ED_PASSWD_TO_OPEN
- {
- HelpId = HID_DLG_PASSWORD_TO_OPEN_MODIFY_PASSWORD_TO_OPEN;
- Pos = MAP_APPFONT( 6, 28 );
- Size = MAP_APPFONT( 159, 12 );
- Border = TRUE ;
- PassWord = TRUE ;
- };
-
- FixedText FT_REENTER_PASSWD_TO_OPEN
- {
- Pos = MAP_APPFONT( 6, 45 );
- Size = MAP_APPFONT( 159, 8 );
- Text [ en-US ] = "Confirm password";
- WordBreak = TRUE;
- };
-
- Edit ED_REENTER_PASSWD_TO_OPEN
- {
- HelpId = HID_DLG_PASSWORD_TO_OPEN_MODIFY_CONFIRM_PASSWORD_TO_OPEN;
- Pos = MAP_APPFONT( 6, 56 );
- Size = MAP_APPFONT( 159, 12 );
- Border = TRUE ;
- PassWord = TRUE ;
- };
-
- FixedText FT_PASSWD_NOTE
- {
- Pos = MAP_APPFONT( 6, 80 );
- Size = MAP_APPFONT( 159, 4*8 ); // some extra space for translation in other languages
- Text [ en-US ] = "Note: After a password has been set, the document will only open with "\
- "the password. Should you lose the password, there will be no way to "\
- "recover the document. Please also note that this password is case-sensitive.";
- WordBreak = TRUE;
- };
-
- FixedLine FL_BUTTONS
- {
- Pos = MAP_APPFONT( 0, 117 );
- Size = MAP_APPFONT( 171, 8 );
- };
-
- MoreButton BTN_MORE_FEWER_OPTIONS
- {
- HelpId = HID_DLG_PASSWORD_TO_OPEN_MODIFY_MORE;
- Pos = MAP_APPFONT( 6 , 130 ) ;
- Size = MAP_APPFONT( 50 , 14 ) ;
- Delta = 92 ;
- MapUnit = MAP_APPFONT ;
- State = FALSE ;
- };
-
- OKButton BTN_OK
- {
- Pos = MAP_APPFONT( 62, 130 );
- Size = MAP_APPFONT( 50, 14 );
- DefButton = TRUE ;
- };
-
- CancelButton BTN_CANCEL
- {
- Pos = MAP_APPFONT( 115, 130 );
- Size = MAP_APPFONT( 50, 14 );
- };
-
- FixedLine FL_FILE_SHARING_OPTIONS
- {
- Pos = MAP_APPFONT( 3, 154 );
- Size = MAP_APPFONT( 165, 8 );
- Text [ en-US ] = "File sharing password";
- };
-
- CheckBox CB_OPEN_READONLY
- {
- HelpId = HID_DLG_PASSWORD_TO_OPEN_MODIFY_FILE_READONLY;
- Pos = MAP_APPFONT( 6, 170 );
- Size = MAP_APPFONT( 159, 8 );
-
- Text [ en-US ] = "Open file read-only";
- };
-
- FixedText FT_PASSWD_TO_MODIFY
- {
- Pos = MAP_APPFONT( 6, 186 );
- Size = MAP_APPFONT( 159, 8 );
- Text [ en-US ] = "Enter password to allow editing";
- WordBreak = TRUE;
- };
-
- Edit ED_PASSWD_TO_MODIFY
- {
- HelpId = HID_DLG_PASSWORD_TO_OPEN_MODIFY_PASSWORD_TO_MODIFY;
- Pos = MAP_APPFONT( 6, 196 );
- Size = MAP_APPFONT( 159, 12 );
- Border = TRUE ;
- PassWord = TRUE ;
- };
-
- FixedText FT_REENTER_PASSWD_TO_MODIFY
- {
- Pos = MAP_APPFONT( 6, 214 );
- Size = MAP_APPFONT( 159, 8 );
- Text [ en-US ] = "Confirm password";
- WordBreak = TRUE;
- };
-
- Edit ED_REENTER_PASSWD_TO_MODIFY
- {
- HelpId = HID_DLG_PASSWORD_TO_OPEN_MODIFY_CONFIRM_PASSWORD_TO_MODIFY;
- Pos = MAP_APPFONT( 6, 224 );
- Size = MAP_APPFONT( 159, 12 );
- Border = TRUE ;
- PassWord = TRUE ;
- };
-
- String STR_PASSWD_MUST_BE_CONFIRMED
- {
- Text [ en-US ] = "Password must be confirmed" ;
- };
-
- String STR_MORE_OPTIONS
- {
- Text [ en-US ] = "More ~Options" ;
- };
-
- String STR_FEWER_OPTIONS
- {
- Text [ en-US ] = "Fewer ~Options" ;
- };
+ Text [ en-US ] = "Password must be confirmed" ;
+};
- String STR_ONE_PASSWORD_MISMATCH
- {
- Text [ en-US ] = "The confirmation password did not match the password. Set the password again by entering the same password in both boxes." ;
- };
+String RID_SVXSTR_ONE_PASSWORD_MISMATCH
+{
+ Text [ en-US ] = "The confirmation password did not match the password. Set the password again by entering the same password in both boxes." ;
+};
- String STR_TWO_PASSWORDS_MISMATCH
- {
- Text [ en-US ] = "The confirmation passwords did not match the original passwords. Set the passwords again." ;
- };
+String RID_SVXSTR_TWO_PASSWORDS_MISMATCH
+{
+ Text [ en-US ] = "The confirmation passwords did not match the original passwords. Set the passwords again." ;
+};
- String STR_INVALID_STATE_FOR_OK_BUTTON
- {
- Text [ en-US ] = "Please enter a password to open or to modify, or check the open read-only option to continue." ;
- };
+String RID_SVXSTR_INVALID_STATE_FOR_OK_BUTTON
+{
+ Text [ en-US ] = "Please enter a password to open or to modify, or check the open read-only option to continue." ;
+};
- // this missing string was detected late - so for 3.4 we just add an english string
- String STR_INVALID_STATE_FOR_OK_BUTTON_V2
- {
- Text = "Set the password by entering the same password in both boxes." ;
- };
+// this missing string was detected late - so for 3.4 we just add an english string
+String RID_SVXSTR_INVALID_STATE_FOR_OK_BUTTON_V2
+{
+ Text = "Set the password by entering the same password in both boxes." ;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/cuires.hrc b/cui/source/inc/cuires.hrc
index 3d598e2330b4..5397c4fda069 100644
--- a/cui/source/inc/cuires.hrc
+++ b/cui/source/inc/cuires.hrc
@@ -225,9 +225,6 @@
#define RID_SVXSTR_ARCHIVE_HEADLINE (RID_SVX_START + 485)
#define RID_SVXSTR_MULTIFILE_DBL_ERR (RID_SVX_START + 486)
-// password to open/modify dialog
-#define RID_DLG_PASSWORD_TO_OPEN_MODIFY (RID_SVX_START + 500)
-
// multi path dialog
#define RID_SVXDLG_MULTIPATH (RID_SVX_START + 201)
#define RID_MULTIPATH_DBL_ERR (RID_SVX_START + 207)
@@ -441,6 +438,12 @@
#define RID_SVXSTR_THES (RID_SVX_START + 1255)
#define RID_SVXSTR_GRAMMAR (RID_SVX_START + 1256)
+#define RID_SVXSTR_PASSWD_MUST_BE_CONFIRMED (RID_SVX_START + 1257)
+#define RID_SVXSTR_ONE_PASSWORD_MISMATCH (RID_SVX_START + 1258)
+#define RID_SVXSTR_TWO_PASSWORDS_MISMATCH (RID_SVX_START + 1259)
+#define RID_SVXSTR_INVALID_STATE_FOR_OK_BUTTON (RID_SVX_START + 1260)
+#define RID_SVXSTR_INVALID_STATE_FOR_OK_BUTTON_V2 (RID_SVX_START + 1261)
+
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc
index 0180f138625f..ac0ff862adab 100644
--- a/cui/source/inc/helpid.hrc
+++ b/cui/source/inc/helpid.hrc
@@ -224,13 +224,6 @@
#define HID_LINKDLG_TABLB "CUI_HID_LINKDLG_TABLB"
#define HID_MACRO_HEADERTABLISTBOX "CUI_HID_MACRO_HEADERTABLISTBOX"
-#define HID_DLG_PASSWORD_TO_OPEN_MODIFY "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY"
-#define HID_DLG_PASSWORD_TO_OPEN_MODIFY_PASSWORD_TO_OPEN "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY_PASSWORD_TO_OPEN"
-#define HID_DLG_PASSWORD_TO_OPEN_MODIFY_CONFIRM_PASSWORD_TO_OPEN "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY_CONFIRM_PASSWORD_TO_OPEN"
-#define HID_DLG_PASSWORD_TO_OPEN_MODIFY_MORE "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY_MORE"
-#define HID_DLG_PASSWORD_TO_OPEN_MODIFY_FILE_READONLY "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY_FILE_READONLY"
-#define HID_DLG_PASSWORD_TO_OPEN_MODIFY_PASSWORD_TO_MODIFY "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY_PASSWORD_TO_MODIFY"
-#define HID_DLG_PASSWORD_TO_OPEN_MODIFY_CONFIRM_PASSWORD_TO_MODIFY "CUI_HID_DLG_PASSWORD_TO_OPEN_MODIFY_CONFIRM_PASSWORD_TO_MODIFY"
#define HID_HYPERLINK_DIALOG "CUI_HID_HYPERLINK_DIALOG"
#define HID_DLG_CERTPATH "CUI_HID_DLG_CERTPATH"
diff --git a/cui/uiconfig/ui/password.ui b/cui/uiconfig/ui/password.ui
new file mode 100644
index 000000000000..e59220cdebcf
--- /dev/null
+++ b/cui/uiconfig/ui/password.ui
@@ -0,0 +1,329 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+ <requires lib="gtk+" version="3.0"/>
+ <object class="GtkDialog" id="PasswordDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Set Password</property>
+ <property name="type_hint">normal</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label">gtk-ok</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="cancel">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child>
+ <object class="GtkFrame" id="frame2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">12</property>
+ <child>
+ <object class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Confirm password</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">confirmpassEntry</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">_Enter password to open</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">newpassEntry</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="newpassEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="visibility">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="confirmpassEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="visibility">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Note: After a password has been set, the document will only open with the password. Should you lose the password, there will be no way to recover the document. Please also note that this password is case-sensitive.</property>
+ <property name="wrap">True</property>
+ <property name="max_width_chars">60</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkExpander" id="expander">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <child>
+ <object class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_top">12</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">none</property>
+ <child>
+ <object class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="top_padding">6</property>
+ <property name="left_padding">12</property>
+ <child>
+ <object class="GtkGrid" id="grid3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <object class="GtkCheckButton" id="readonly">
+ <property name="label" translatable="yes">Open file read-only</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Enter password to allow editing</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">newpassroEntry</property>
+ <property name="ellipsize">middle</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="newpassroEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="visibility">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Confirm password</property>
+ <property name="use_underline">True</property>
+ <property name="mnemonic_widget">confirmropassEntry</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">3</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEntry" id="confirmropassEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="visibility">False</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">4</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label6">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">File sharing password</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">_Options</property>
+ <property name="use_underline">True</property>
+ <property name="ellipsize">middle</property>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">5</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </object>
+ </child>
+ <child type="label">
+ <object class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">File encryption password</property>
+ <attributes>
+ <attribute name="weight" value="bold"/>
+ </attributes>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">ok</action-widget>
+ <action-widget response="0">cancel</action-widget>
+ </action-widgets>
+ </object>
+ <object class="GtkSizeGroup" id="sizegroup1"/>
+</interface>