diff options
Diffstat (limited to 'cui/source/dialogs/passwdomdlg.cxx')
-rw-r--r-- | cui/source/dialogs/passwdomdlg.cxx | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/cui/source/dialogs/passwdomdlg.cxx b/cui/source/dialogs/passwdomdlg.cxx index 163f3961f22e..579af0edc9aa 100644 --- a/cui/source/dialogs/passwdomdlg.cxx +++ b/cui/source/dialogs/passwdomdlg.cxx @@ -24,7 +24,7 @@ IMPL_LINK_NOARG(PasswordToOpenModifyDialog, OkBtnClickHdl, weld::Button&, void) { - bool bInvalidState = !m_xOpenReadonlyCB->get_active() && + bool bInvalidState = !m_xOpenReadonlyCB->get_active() && !m_bAllowEmpty && m_xPasswdToOpenED->get_text().isEmpty() && m_xPasswdToModifyED->get_text().isEmpty(); if (bInvalidState) @@ -107,6 +107,7 @@ PasswordToOpenModifyDialog::PasswordToOpenModifyDialog(weld::Window * pParent, s , m_aInvalidStateForOkButton_v2( CuiResId( RID_CUISTR_INVALID_STATE_FOR_OK_BUTTON_V2 ) ) , m_nMaxPasswdLen(nMaxPasswdLen) , m_bIsPasswordToModify( bIsPasswordToModify ) + , m_bAllowEmpty( false ) { m_xOk->connect_clicked(LINK(this, PasswordToOpenModifyDialog, OkBtnClickHdl)); @@ -145,6 +146,11 @@ PasswordToOpenModifyDialog::~PasswordToOpenModifyDialog() } } +void PasswordToOpenModifyDialog::AllowEmpty() +{ + m_bAllowEmpty = true; +} + OUString PasswordToOpenModifyDialog::GetPasswordToOpen() const { const bool bPasswdOk = |