From 929d46bbf42aefc1f6cf046c2b9cf3d7c4e1efc5 Mon Sep 17 00:00:00 2001 From: Jan-Marek Glogowski Date: Thu, 12 Mar 2020 18:07:48 +0100 Subject: tdf#42316 always evaluate macro signatures on load As already stated in the comments of the signing unit tests, disabling macro security will not only ignore the signatures, but actually drop the macro signature, as these are never evaluated and as a result can't be restored for the new document. Change-Id: Ie41a9e72d3367c2eed58a52387bb67d8c41abff3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90435 Tested-by: Jenkins Reviewed-by: Thorsten Behrens --- sfx2/source/doc/objmisc.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sfx2') diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 0f155cc7e4f9..43a5f5b10800 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -928,6 +928,9 @@ void SfxObjectShell::BreakMacroSign_Impl( bool bBreakMacroSign ) void SfxObjectShell::CheckSecurityOnLoading_Impl() { + // make sure LO evaluates the macro signatures, so it can be preserved + GetScriptingSignatureState(); + uno::Reference< task::XInteractionHandler > xInteraction; if ( GetMedium() ) xInteraction = GetMedium()->GetInteractionHandler(); -- cgit