From 6313e83a6f03540c1256e1e433cdf81b0913ff82 Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Tue, 7 Nov 2023 10:55:48 +0300 Subject: Rename variable: The UI is not only to "add" author (i.e., modify config) It is mainly to allow macro execution for this unknown certificate once. The UI will even disable the option to add, when the config is read-only. Change-Id: Iebc526c23572dc7c0e94fac79fafc8b402d451c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159051 Tested-by: Jenkins Reviewed-by: Mike Kaganski --- sfx2/source/doc/docmacromode.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx index 77c3e4ca22f9..ec56e3f529e7 100644 --- a/sfx2/source/doc/docmacromode.cxx +++ b/sfx2/source/doc/docmacromode.cxx @@ -190,10 +190,10 @@ namespace sfx2 if ( nMacroExecutionMode != MacroExecMode::FROM_LIST ) { // the trusted macro check will also retrieve the signature state ( small optimization ) - const bool bAllowUIToAddAuthor = nMacroExecutionMode != MacroExecMode::FROM_LIST_AND_SIGNED_NO_WARN + const bool bAllowUI = nMacroExecutionMode != MacroExecMode::FROM_LIST_AND_SIGNED_NO_WARN && (nMacroExecutionMode == MacroExecMode::ALWAYS_EXECUTE || !SvtSecurityOptions::IsReadOnly(SvtSecurityOptions::EOption::MacroTrustedAuthors)); - const bool bHasTrustedMacroSignature = m_xData->m_rDocumentAccess.hasTrustedScriptingSignature(bAllowUIToAddAuthor); + const bool bHasTrustedMacroSignature = m_xData->m_rDocumentAccess.hasTrustedScriptingSignature(bAllowUI); SignatureState nSignatureState = m_xData->m_rDocumentAccess.getScriptingSignatureState(); if ( nSignatureState == SignatureState::BROKEN ) -- cgit office-6-3 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff