diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2017-12-14 13:14:02 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2017-12-19 01:25:48 +0100 |
commit | 5c66c0711286bcfa9d3ab4a87777c2af9e1c25d9 (patch) | |
tree | fa8a93602c18c60984f9e4aee7afb06fc15d4148 /cui/source/options | |
parent | df4fac1dbce087bbd01bbec242b93c72edcef74b (diff) |
Read/write 'encrypt to self' bit
use some template functions to avoid duplicate code
Change-Id: Ia178ea3a0561e34e0431749262f5f8f1f49b4fe7
Reviewed-on: https://gerrit.libreoffice.org/46693
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'cui/source/options')
-rw-r--r-- | cui/source/options/optgenrl.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx index 83a98e60c7b0..c25144f04266 100644 --- a/cui/source/options/optgenrl.cxx +++ b/cui/source/options/optgenrl.cxx @@ -443,11 +443,14 @@ bool SvxGeneralTabPage::GetData_Impl() : m_pSigningKeyLB->GetSelectedEntry(); OUString aEK = m_pEncryptionKeyLB->GetSelectedEntryPos() == 0 ? OUString() : m_pEncryptionKeyLB->GetSelectedEntry(); + aUserOpt.SetToken( UserOptToken::SigningKey, aSK ); aUserOpt.SetToken( UserOptToken::EncryptionKey, aEK ); + aUserOpt.SetBoolValue( UserOptToken::EncryptToSelf, m_pEncryptToSelfCB->IsChecked() ); - bModified |= m_pSigningKeyLB->IsValueChangedFromSaved(); - bModified |= m_pEncryptionKeyLB->IsValueChangedFromSaved(); + bModified |= m_pSigningKeyLB->IsValueChangedFromSaved() || + m_pEncryptionKeyLB->IsValueChangedFromSaved() || + m_pEncryptToSelfCB->IsValueChangedFromSaved(); #endif return bModified; @@ -489,6 +492,8 @@ void SvxGeneralTabPage::SetData_Impl() OUString aEK = aUserOpt.GetToken(UserOptToken::EncryptionKey); aEK.isEmpty() ? m_pEncryptionKeyLB->SelectEntryPos( 0 ) //i.e. 'No Key' : m_pEncryptionKeyLB->SelectEntry( aEK ); + + m_pEncryptToSelfCB->Check( aUserOpt.GetEncryptToSelf() ); #endif } |