diff options
Diffstat (limited to 'sfx2/source/doc/docmacromode.cxx')
-rw-r--r-- | sfx2/source/doc/docmacromode.cxx | 23 |
1 files changed, 4 insertions, 19 deletions
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() ) { |