diff options
author | Noel <noelgrandin@gmail.com> | 2020-12-02 10:27:42 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-12-07 12:27:34 +0100 |
commit | fbc909364c9c3964c1354169527e68446905c39b (patch) | |
tree | d7d9f700289223534056fa4e81d73a582c9ca195 /unotools/source/config/securityoptions.cxx | |
parent | 02e7718d25290b702721fa15b03ee538c0506f21 (diff) |
remove SID_BASIC_ENABLED and BasicEnabled option
which has never been used since creation in
commit fd069bee7e57ad529c3c0974559fd2d84ec3151a
Author: Jens-Heiner Rechtien <hr@openoffice.org>
Date: Mon Sep 18 16:07:07 2000 +0000
initial import
Change-Id: I018b1f734c8263167dab3d5c6f98a400666f01d6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107047
Tested-by: Jenkins
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 | 86 |
1 files changed, 15 insertions, 71 deletions
diff --git a/unotools/source/config/securityoptions.cxx b/unotools/source/config/securityoptions.cxx index 5062653413b9..354907dd7864 100644 --- a/unotools/source/config/securityoptions.cxx +++ b/unotools/source/config/securityoptions.cxx @@ -43,9 +43,6 @@ using namespace ::com::sun::star::uno; #define DEFAULT_SECUREURL Sequence< OUString >() #define DEFAULT_TRUSTEDAUTHORS Sequence< SvtSecurityOptions::Certificate >() -// xmlsec05 deprecated -#define DEFAULT_STAROFFICEBASIC eALWAYS_EXECUTE - #define PROPERTYNAME_SECUREURL u"SecureURL" #define PROPERTYNAME_DOCWARN_SAVEORSEND u"WarnSaveOrSendDoc" #define PROPERTYNAME_DOCWARN_SIGNING u"WarnSignDoc" @@ -63,7 +60,6 @@ using namespace ::com::sun::star::uno; #define PROPERTYNAME_TRUSTEDAUTHOR_RAWDATA u"RawData" // xmlsec05 deprecated -#define PROPERTYNAME_STAROFFICEBASIC u"OfficeBasic" #define PROPERTYNAME_EXECUTEPLUGINS u"ExecutePlugins" #define PROPERTYNAME_WARNINGENABLED u"Warning" #define PROPERTYNAME_CONFIRMATIONENABLED u"Confirmation" @@ -72,23 +68,22 @@ using namespace ::com::sun::star::uno; #define PROPERTYHANDLE_SECUREURL 0 // xmlsec05 deprecated -#define PROPERTYHANDLE_STAROFFICEBASIC 1 -#define PROPERTYHANDLE_EXECUTEPLUGINS 2 -#define PROPERTYHANDLE_WARNINGENABLED 3 -#define PROPERTYHANDLE_CONFIRMATIONENABLED 4 +#define PROPERTYHANDLE_EXECUTEPLUGINS 1 +#define PROPERTYHANDLE_WARNINGENABLED 2 +#define PROPERTYHANDLE_CONFIRMATIONENABLED 3 // xmlsec05 deprecated -#define PROPERTYHANDLE_DOCWARN_SAVEORSEND 5 -#define PROPERTYHANDLE_DOCWARN_SIGNING 6 -#define PROPERTYHANDLE_DOCWARN_PRINT 7 -#define PROPERTYHANDLE_DOCWARN_CREATEPDF 8 -#define PROPERTYHANDLE_DOCWARN_REMOVEPERSONALINFO 9 -#define PROPERTYHANDLE_DOCWARN_RECOMMENDPASSWORD 10 -#define PROPERTYHANDLE_CTRLCLICK_HYPERLINK 11 -#define PROPERTYHANDLE_BLOCKUNTRUSTEDREFERERLINKS 12 -#define PROPERTYHANDLE_MACRO_SECLEVEL 13 -#define PROPERTYHANDLE_MACRO_TRUSTEDAUTHORS 14 -#define PROPERTYHANDLE_MACRO_DISABLE 15 +#define PROPERTYHANDLE_DOCWARN_SAVEORSEND 4 +#define PROPERTYHANDLE_DOCWARN_SIGNING 5 +#define PROPERTYHANDLE_DOCWARN_PRINT 6 +#define PROPERTYHANDLE_DOCWARN_CREATEPDF 7 +#define PROPERTYHANDLE_DOCWARN_REMOVEPERSONALINFO 8 +#define PROPERTYHANDLE_DOCWARN_RECOMMENDPASSWORD 9 +#define PROPERTYHANDLE_CTRLCLICK_HYPERLINK 10 +#define PROPERTYHANDLE_BLOCKUNTRUSTEDREFERERLINKS 11 +#define PROPERTYHANDLE_MACRO_SECLEVEL 12 +#define PROPERTYHANDLE_MACRO_TRUSTEDAUTHORS 13 +#define PROPERTYHANDLE_MACRO_DISABLE 14 #define PROPERTYHANDLE_INVALID -1 @@ -185,7 +180,6 @@ class SvtSecurityOptions_Impl : public ConfigItem bool m_bRODisableMacros; // xmlsec05 deprecated - EBasicSecurityMode m_eBasicMode; bool m_bExecutePlugins; bool m_bWarning; bool m_bConfirmation; @@ -193,7 +187,6 @@ class SvtSecurityOptions_Impl : public ConfigItem bool m_bROConfirmation; bool m_bROWarning; bool m_bROExecutePlugins; - bool m_bROBasicMode; public: bool IsWarningEnabled() const { return m_bWarning;} void SetWarningEnabled( bool bSet ); @@ -201,9 +194,6 @@ class SvtSecurityOptions_Impl : public ConfigItem void SetConfirmationEnabled( bool bSet ); bool IsExecutePlugins() const { return m_bExecutePlugins;} void SetExecutePlugins( bool bSet ); - // xmlsec05 deprecated - EBasicSecurityMode GetBasicMode ( ) const { return m_eBasicMode;} - void SetBasicMode ( EBasicSecurityMode eMode ); }; // constructor @@ -236,14 +226,12 @@ SvtSecurityOptions_Impl::SvtSecurityOptions_Impl() ,m_bRODisableMacros ( true ) // currently is not intended to be changed // xmlsec05 deprecated - , m_eBasicMode ( DEFAULT_STAROFFICEBASIC ) , m_bExecutePlugins ( true ) , m_bWarning ( true ) , m_bConfirmation ( true ) , m_bROConfirmation ( CFG_READONLY_DEFAULT ) , m_bROWarning ( CFG_READONLY_DEFAULT ) , m_bROExecutePlugins ( CFG_READONLY_DEFAULT ) - , m_bROBasicMode ( CFG_READONLY_DEFAULT ) // xmlsec05 deprecated { @@ -254,7 +242,7 @@ SvtSecurityOptions_Impl::SvtSecurityOptions_Impl() // Safe impossible cases. // We need values from ALL configuration keys. // Follow assignment use order of values in relation to our list of key names! - DBG_ASSERT( !(seqNames.getLength()!=seqValues.getLength()), "SvtSecurityOptions_Impl::SvtSecurityOptions_Impl()\nI miss some values of configuration keys!\n" ); + assert( seqNames.getLength() == seqValues.getLength() && "I miss some values of configuration keys!" ); // Copy values from list in right order to our internal member. sal_Int32 nPropertyCount = seqValues.getLength(); @@ -372,14 +360,6 @@ void SvtSecurityOptions_Impl::SetProperty( sal_Int32 nProperty, const Any& rValu break; // xmlsec05 deprecated - case PROPERTYHANDLE_STAROFFICEBASIC: - { - sal_Int32 nMode = 0; - rValue >>= nMode; - m_eBasicMode = static_cast<EBasicSecurityMode>(nMode); - m_bROBasicMode = bRO; - } - break; case PROPERTYHANDLE_EXECUTEPLUGINS: { rValue >>= m_bExecutePlugins; @@ -487,8 +467,6 @@ sal_Int32 SvtSecurityOptions_Impl::GetHandle( std::u16string_view rName ) nHandle = PROPERTYHANDLE_MACRO_DISABLE; // xmlsec05 deprecated - else if( rName == PROPERTYNAME_STAROFFICEBASIC ) - nHandle = PROPERTYHANDLE_STAROFFICEBASIC; else if( rName == PROPERTYNAME_EXECUTEPLUGINS ) nHandle = PROPERTYHANDLE_EXECUTEPLUGINS; else if( rName == PROPERTYNAME_WARNINGENABLED ) @@ -709,13 +687,6 @@ void SvtSecurityOptions_Impl::ImplCommit() break; // xmlsec05 deprecated - case PROPERTYHANDLE_STAROFFICEBASIC: - { - bDone = !m_bROBasicMode; - if( bDone ) - lValues[ nRealCount ] <<= static_cast<sal_Int32>(m_eBasicMode); - } - break; case PROPERTYHANDLE_EXECUTEPLUGINS: { bDone = !m_bROExecutePlugins; @@ -795,9 +766,6 @@ bool SvtSecurityOptions_Impl::IsReadOnly( SvtSecurityOptions::EOption eOption ) break; // xmlsec05 deprecated - case SvtSecurityOptions::EOption::BasicMode: - bReadonly = m_bROBasicMode; - break; case SvtSecurityOptions::EOption::ExecutePlugins: bReadonly = m_bROExecutePlugins; break; @@ -904,7 +872,6 @@ Sequence< OUString > SvtSecurityOptions_Impl::GetPropertyNames() return Sequence< OUString > { PROPERTYNAME_SECUREURL, - PROPERTYNAME_STAROFFICEBASIC, PROPERTYNAME_EXECUTEPLUGINS, PROPERTYNAME_WARNINGENABLED, PROPERTYNAME_CONFIRMATIONENABLED, @@ -1073,17 +1040,6 @@ Mutex& SvtSecurityOptions::GetInitMutex() return theSecurityOptionsMutex::get(); } -void SvtSecurityOptions_Impl::SetBasicMode( EBasicSecurityMode eMode ) -{ - DBG_ASSERT(!m_bROBasicMode, "SvtSecurityOptions_Impl::SetBasicMode()\nYou tried to write on a readonly value!\n"); - if (!m_bROBasicMode && m_eBasicMode!=eMode) - { - m_eBasicMode = eMode; - SetModified(); - } -} - - void SvtSecurityOptions_Impl::SetExecutePlugins( bool bSet ) { DBG_ASSERT(!m_bROExecutePlugins, "SvtSecurityOptions_Impl::SetExecutePlugins()\nYou tried to write on a readonly value!\n"); @@ -1152,16 +1108,4 @@ void SvtSecurityOptions::SetConfirmationEnabled( bool bSet ) m_pImpl->SetConfirmationEnabled( bSet ); } -void SvtSecurityOptions::SetBasicMode( EBasicSecurityMode eMode ) -{ - MutexGuard aGuard( GetInitMutex() ); - m_pImpl->SetBasicMode( eMode ); -} - -EBasicSecurityMode SvtSecurityOptions::GetBasicMode() const -{ - MutexGuard aGuard( GetInitMutex() ); - return m_pImpl->GetBasicMode(); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |