configure.ac                     |    2 +-
 include/sfx2/docmacromode.hxx    |    7 ++-----
 sfx2/source/doc/docmacromode.cxx |   23 ++++-------------------
 sfx2/source/doc/objmisc.cxx      |    3 +--
 4 files changed, 8 insertions(+), 27 deletions(-)

New commits:
commit 40b1ed9c0fe8ddf97a8bd42e1278860060ea0740
Author:     Thorsten Behrens <thorsten.behr...@allotropia.de>
AuthorDate: Thu Feb 4 19:42:41 2021 +0100
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Thu Feb 4 19:42:41 2021 +0100

    Bump version to 6.1.7.24
    
    Change-Id: I8eb044d0bb91d19ccf5b3d3c2e79da8d0fa4829d

diff --git a/configure.ac b/configure.ac
index 236c50527d40..e72c658aad46 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([LibreOffice powered by 
CIB],[6.1.7.23],[],[],[https://libreoffice.cib.eu/])
+AC_INIT([LibreOffice powered by 
CIB],[6.1.7.24],[],[],[https://libreoffice.cib.eu/])
 
 AC_PREREQ([2.59])
 
commit ab495359f6e4eadbf6a14dd44eb05b775fb5f989
Author:     Thorsten Behrens <thorsten.behr...@allotropia.de>
AuthorDate: Thu Feb 4 19:41:47 2021 +0100
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Thu Feb 4 19:41:47 2021 +0100

    Revert "Improve macro checks"
    
    This reverts commit 7df8b437b721b25561995346abfb55dca0d500b5.

diff --git a/include/sfx2/docmacromode.hxx b/include/sfx2/docmacromode.hxx
index 19199f7a410e..7e1511625086 100644
--- a/include/sfx2/docmacromode.hxx
+++ b/include/sfx2/docmacromode.hxx
@@ -218,8 +218,7 @@ namespace sfx2
                 <TRUE/> if and only if macro execution in this document is 
allowed.
         */
         bool    adjustMacroMode(
-                    const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction,
-                    bool bHasValidContentSignature = false
+                    const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction
                 );
 
         /** determines whether macro execution is disallowed
@@ -285,13 +284,11 @@ namespace sfx2
         */
         bool
                 checkMacrosOnLoading(
-                    const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction,
-                    bool bHasValidContentSignature = false
+                    const css::uno::Reference< css::task::XInteractionHandler 
>& _rxInteraction
                 );
 
     private:
         std::shared_ptr< DocumentMacroMode_Data >   m_xData;
-        bool m_bNeedsContentSigned;
     };
 
 
diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index 4c27b767c80d..dc84f4e58598 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -111,10 +111,6 @@ namespace sfx2
 #endif
         }
 
-        void lcl_showMacrosDisabledUnsignedContentError( const Reference< 
XInteractionHandler >& rxHandler, bool& rbAlreadyShown )
-        {
-            lcl_showGeneralSfxErrorOnce( rxHandler, 
ERRCODE_SFX_DOCUMENT_MACRO_DISABLED, rbAlreadyShown );
-        }
 
         bool lcl_showMacroWarning( const Reference< XInteractionHandler >& 
rxHandler,
             const OUString& rDocumentLocation )
@@ -127,8 +123,7 @@ namespace sfx2
 
     //= DocumentMacroMode
     DocumentMacroMode::DocumentMacroMode( IMacroDocumentAccess& 
rDocumentAccess )
-        :m_xData( new DocumentMacroMode_Data( rDocumentAccess ) ),
-        m_bNeedsContentSigned(false)
+        :m_xData( new DocumentMacroMode_Data( rDocumentAccess ) )
     {
     }
 
@@ -144,7 +139,7 @@ namespace sfx2
         return false;
     }
 
-    bool DocumentMacroMode::adjustMacroMode( const Reference< 
XInteractionHandler >& rxInteraction, bool bHasValidContentSignature )
+    bool DocumentMacroMode::adjustMacroMode( const Reference< 
XInteractionHandler >& rxInteraction )
     {
         sal_uInt16 nMacroExecutionMode = 
m_xData->m_rDocumentAccess.getCurrentMacroExecMode();
 
@@ -241,14 +236,6 @@ namespace sfx2
                         lcl_showDocumentMacrosDisabledError(rxInteraction, 
m_xData->m_bDocMacroDisabledMessageShown);
                     return disallowMacroExecution();
                 }
-                else if ( 
m_xData->m_rDocumentAccess.macroCallsSeenWhileLoading() &&
-                          bHasTrustedMacroSignature &&
-                          !bHasValidContentSignature)
-                {
-                    // When macros are signed, and the document has events 
which call macros, the document content needs to be signed too.
-                    lcl_showMacrosDisabledUnsignedContentError(rxInteraction, 
m_xData->m_bDocMacroDisabledMessageShown);
-                    return disallowMacroExecution();
-                }
                 else if ( bHasTrustedMacroSignature )
                 {
                     // there is trusted macro signature, allow macro execution
@@ -408,7 +395,7 @@ namespace sfx2
     }
 
 
-    bool DocumentMacroMode::checkMacrosOnLoading( const Reference< 
XInteractionHandler >& rxInteraction, bool bHasValidContentSignature )
+    bool DocumentMacroMode::checkMacrosOnLoading( const Reference< 
XInteractionHandler >& rxInteraction )
     {
         bool bAllow = false;
         if ( SvtSecurityOptions().IsMacroDisabled() )
@@ -420,9 +407,7 @@ namespace sfx2
         {
             if (m_xData->m_rDocumentAccess.documentStorageHasMacros() || 
hasMacroLibrary() || m_xData->m_rDocumentAccess.macroCallsSeenWhileLoading())
             {
-                if (m_xData->m_rDocumentAccess.macroCallsSeenWhileLoading())
-                    m_bNeedsContentSigned = true;
-                bAllow = adjustMacroMode( rxInteraction, 
bHasValidContentSignature );
+                bAllow = adjustMacroMode( rxInteraction );
             }
             else if ( !isMacroExecutionDisallowed() )
             {
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 91817a637620..7473a23e3783 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -937,8 +937,7 @@ void SfxObjectShell::CheckSecurityOnLoading_Impl()
     CheckEncryption_Impl( xInteraction );
 
     // check macro security
-    const bool bHasValidContentSignature = HasValidSignatures();
-    pImpl->aMacroMode.checkMacrosOnLoading( xInteraction, 
bHasValidContentSignature );
+    pImpl->aMacroMode.checkMacrosOnLoading( xInteraction );
 }
 
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to