summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/docmacromode.cxx
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2023-01-27 10:34:29 +0100
committerSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2023-01-30 08:15:09 +0000
commitf41627ab60372345be646c53d967b65be43b562f (patch)
treeff966cdafa630cb7129a282610b951b2226292be /sfx2/source/doc/docmacromode.cxx
parent43737fd5ddfad4c5e52f5244aef7a468d7aa8d15 (diff)
Show infobar instead of blocking dialog when macros are not allowed
Change-Id: I45f898aaf15cb3540abff32954881186015cc6e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146250 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Diffstat (limited to 'sfx2/source/doc/docmacromode.cxx')
-rw-r--r--sfx2/source/doc/docmacromode.cxx25
1 files changed, 0 insertions, 25 deletions
diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index ae70c6a8c056..bf17a0497a5d 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -101,22 +101,6 @@ namespace sfx2
rbAlreadyShown = true;
}
-
- void lcl_showMacrosDisabledError( const Reference< XInteractionHandler >& rxHandler, bool& rbAlreadyShown )
- {
- lcl_showGeneralSfxErrorOnce( rxHandler, ERRCODE_SFX_MACROS_SUPPORT_DISABLED, rbAlreadyShown );
- }
-
-
- void lcl_showDocumentMacrosDisabledError( const Reference< XInteractionHandler >& rxHandler, bool& rbAlreadyShown )
- {
-#ifdef MACOSX
- lcl_showGeneralSfxErrorOnce( rxHandler, ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_MAC, rbAlreadyShown );
-#else
- lcl_showGeneralSfxErrorOnce( rxHandler, ERRCODE_SFX_DOCUMENT_MACRO_DISABLED, rbAlreadyShown );
-#endif
- }
-
void lcl_showMacrosDisabledUnsignedContentError( const Reference< XInteractionHandler >& rxHandler, bool& rbAlreadyShown )
{
lcl_showGeneralSfxErrorOnce( rxHandler, ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_CONTENT_UNSIGNED, rbAlreadyShown );
@@ -156,7 +140,6 @@ namespace sfx2
if ( SvtSecurityOptions::IsMacroDisabled() )
{
// no macro should be executed at all
- lcl_showMacrosDisabledError( rxInteraction, m_xData->m_bMacroDisabledMessageShown );
return disallowMacroExecution();
}
@@ -226,7 +209,6 @@ namespace sfx2
// at this point it is clear that the document is not in the secure location
if ( nMacroExecutionMode == MacroExecMode::FROM_LIST_NO_WARN )
{
- lcl_showDocumentMacrosDisabledError( rxInteraction, m_xData->m_bDocMacroDisabledMessageShown );
return disallowMacroExecution();
}
@@ -242,8 +224,6 @@ namespace sfx2
SignatureState nSignatureState = m_xData->m_rDocumentAccess.getScriptingSignatureState();
if ( nSignatureState == SignatureState::BROKEN )
{
- if (!bAllowUIToAddAuthor)
- lcl_showDocumentMacrosDisabledError(rxInteraction, m_xData->m_bDocMacroDisabledMessageShown);
return disallowMacroExecution();
}
else if ( m_xData->m_rDocumentAccess.macroCallsSeenWhileLoading() &&
@@ -263,8 +243,6 @@ namespace sfx2
|| nSignatureState == SignatureState::NOTVALIDATED )
{
// there is valid signature, but it is not from the trusted author
- if (!bAllowUIToAddAuthor)
- lcl_showDocumentMacrosDisabledError(rxInteraction, m_xData->m_bDocMacroDisabledMessageShown);
return disallowMacroExecution();
}
}
@@ -274,9 +252,6 @@ namespace sfx2
|| ( nMacroExecutionMode == MacroExecMode::FROM_LIST_AND_SIGNED_WARN )
)
{
- if ( nMacroExecutionMode == MacroExecMode::FROM_LIST_AND_SIGNED_WARN )
- lcl_showDocumentMacrosDisabledError( rxInteraction, m_xData->m_bDocMacroDisabledMessageShown );
-
return disallowMacroExecution();
}
}