diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-09 10:41:46 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-02-10 06:05:54 +0000 |
commit | a4d0ec84dae49a6c47c38bfc6ee5bba988349721 (patch) | |
tree | df5b201ba05a8845f6a2e2b1b0750c9580375e46 /unotools/source/config/securityoptions.cxx | |
parent | 29eb1ceeae4a3108ce134b45e77a37ade7d7a4f8 (diff) |
convert SvtSecurityOptions::EOption to scoped enum
and drop unused E_MACRO_DISABLE enumerator
Change-Id: I0bd706d4d4e1d8b9004e68c9e77c11410c62a64a
Reviewed-on: https://gerrit.libreoffice.org/34067
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'unotools/source/config/securityoptions.cxx')
-rw-r--r-- | unotools/source/config/securityoptions.cxx | 51 |
1 files changed, 24 insertions, 27 deletions
diff --git a/unotools/source/config/securityoptions.cxx b/unotools/source/config/securityoptions.cxx index 43cbebedee44..f2b57ed701dd 100644 --- a/unotools/source/config/securityoptions.cxx +++ b/unotools/source/config/securityoptions.cxx @@ -506,35 +506,35 @@ bool SvtSecurityOptions_Impl::GetOption( SvtSecurityOptions::EOption eOption, bo { switch( eOption ) { - case SvtSecurityOptions::E_DOCWARN_SAVEORSEND: + case SvtSecurityOptions::EOption::DocWarnSaveOrSend: rpValue = &m_bSaveOrSend; rpRO = &m_bROSaveOrSend; break; - case SvtSecurityOptions::E_DOCWARN_SIGNING: + case SvtSecurityOptions::EOption::DocWarnSigning: rpValue = &m_bSigning; rpRO = &m_bROSigning; break; - case SvtSecurityOptions::E_DOCWARN_PRINT: + case SvtSecurityOptions::EOption::DocWarnPrint: rpValue = &m_bPrint; rpRO = &m_bROPrint; break; - case SvtSecurityOptions::E_DOCWARN_CREATEPDF: + case SvtSecurityOptions::EOption::DocWarnCreatePdf: rpValue = &m_bCreatePDF; rpRO = &m_bROCreatePDF; break; - case SvtSecurityOptions::E_DOCWARN_REMOVEPERSONALINFO: + case SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo: rpValue = &m_bRemoveInfo; rpRO = &m_bRORemoveInfo; break; - case SvtSecurityOptions::E_DOCWARN_RECOMMENDPASSWORD: + case SvtSecurityOptions::EOption::DocWarnRecommendPassword: rpValue = &m_bRecommendPwd; rpRO = &m_bRORecommendPwd; break; - case SvtSecurityOptions::E_CTRLCLICK_HYPERLINK: + case SvtSecurityOptions::EOption::CtrlClickHyperlink: rpValue = &m_bCtrlClickHyperlink; rpRO = &m_bROCtrlClickHyperlink; break; - case SvtSecurityOptions::E_BLOCKUNTRUSTEDREFERERLINKS: + case SvtSecurityOptions::EOption::BlockUntrustedRefererLinks: rpValue = &m_bBlockUntrustedRefererLinks; rpRO = &m_bROBlockUntrustedRefererLinks; break; @@ -760,54 +760,51 @@ bool SvtSecurityOptions_Impl::IsReadOnly( SvtSecurityOptions::EOption eOption ) bool bReadonly; switch(eOption) { - case SvtSecurityOptions::E_SECUREURLS : + case SvtSecurityOptions::EOption::SecureUrls : bReadonly = m_bROSecureURLs; break; - case SvtSecurityOptions::E_DOCWARN_SAVEORSEND: + case SvtSecurityOptions::EOption::DocWarnSaveOrSend: bReadonly = m_bROSaveOrSend; break; - case SvtSecurityOptions::E_DOCWARN_SIGNING: + case SvtSecurityOptions::EOption::DocWarnSigning: bReadonly = m_bROSigning; break; - case SvtSecurityOptions::E_DOCWARN_PRINT: + case SvtSecurityOptions::EOption::DocWarnPrint: bReadonly = m_bROPrint; break; - case SvtSecurityOptions::E_DOCWARN_CREATEPDF: + case SvtSecurityOptions::EOption::DocWarnCreatePdf: bReadonly = m_bROCreatePDF; break; - case SvtSecurityOptions::E_DOCWARN_REMOVEPERSONALINFO: + case SvtSecurityOptions::EOption::DocWarnRemovePersonalInfo: bReadonly = m_bRORemoveInfo; break; - case SvtSecurityOptions::E_DOCWARN_RECOMMENDPASSWORD: + case SvtSecurityOptions::EOption::DocWarnRecommendPassword: bReadonly = m_bRORecommendPwd; break; - case SvtSecurityOptions::E_MACRO_SECLEVEL: + case SvtSecurityOptions::EOption::MacroSecLevel: bReadonly = m_bROSecLevel; break; - case SvtSecurityOptions::E_MACRO_TRUSTEDAUTHORS: + case SvtSecurityOptions::EOption::MacroTrustedAuthors: bReadonly = m_bROTrustedAuthors; break; - case SvtSecurityOptions::E_MACRO_DISABLE: - bReadonly = m_bRODisableMacros; - break; - case SvtSecurityOptions::E_CTRLCLICK_HYPERLINK: + case SvtSecurityOptions::EOption::CtrlClickHyperlink: bReadonly = m_bROCtrlClickHyperlink; break; - case SvtSecurityOptions::E_BLOCKUNTRUSTEDREFERERLINKS: + case SvtSecurityOptions::EOption::BlockUntrustedRefererLinks: bReadonly = m_bROBlockUntrustedRefererLinks; break; // xmlsec05 deprecated - case SvtSecurityOptions::E_BASICMODE: + case SvtSecurityOptions::EOption::BasicMode: bReadonly = m_bROBasicMode; break; - case SvtSecurityOptions::E_EXECUTEPLUGINS: + case SvtSecurityOptions::EOption::ExecutePlugins: bReadonly = m_bROExecutePlugins; break; - case SvtSecurityOptions::E_WARNING: + case SvtSecurityOptions::EOption::Warning: bReadonly = m_bROWarning; break; - case SvtSecurityOptions::E_CONFIRMATION: + case SvtSecurityOptions::EOption::Confirmation: bReadonly = m_bROConfirmation; break; // xmlsec05 deprecated @@ -998,7 +995,7 @@ bool SvtSecurityOptions::isSecureMacroUri( bool SvtSecurityOptions::isUntrustedReferer(OUString const & referer) const { MutexGuard g(GetInitMutex()); - return m_pImpl->IsOptionSet(E_BLOCKUNTRUSTEDREFERERLINKS) + return m_pImpl->IsOptionSet(EOption::BlockUntrustedRefererLinks) && !(referer.isEmpty() || referer.startsWithIgnoreAsciiCase("private:") || isTrustedLocationUri(referer)); } |