summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2021-01-18 15:24:48 +0100
committerAndras Timar <andras.timar@collabora.com>2021-05-06 12:48:58 +0200
commit0e547c2d071ffd3803137010d0e322de9ff033ed (patch)
tree162a6a36ea3aaf5a525a9c467afd5df9de2d96fb /include
parent6f9fb448abae05b2008885a3f40faa1ff9869123 (diff)
Improve macro checks
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109552 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> (cherry picked from commit 1dc71daf7fa7204a98c75dac680af664ab9c8edb) Change-Id: Ie40801df8866b52c1458e020ffa9cba120720af7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110281 Tested-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Diffstat (limited to 'include')
-rw-r--r--include/sfx2/docmacromode.hxx7
-rw-r--r--include/svtools/sfxecode.hxx1
2 files changed, 6 insertions, 2 deletions
diff --git a/include/sfx2/docmacromode.hxx b/include/sfx2/docmacromode.hxx
index a15bbbe9ba56..bd4f13fb016c 100644
--- a/include/sfx2/docmacromode.hxx
+++ b/include/sfx2/docmacromode.hxx
@@ -220,7 +220,8 @@ namespace sfx2
<TRUE/> if and only if macro execution in this document is allowed.
*/
bool adjustMacroMode(
- const css::uno::Reference< css::task::XInteractionHandler >& _rxInteraction
+ const css::uno::Reference< css::task::XInteractionHandler >& _rxInteraction,
+ bool bHasValidContentSignature = false
);
/** determines whether macro execution is disallowed
@@ -286,11 +287,13 @@ namespace sfx2
*/
bool
checkMacrosOnLoading(
- const css::uno::Reference< css::task::XInteractionHandler >& _rxInteraction
+ const css::uno::Reference< css::task::XInteractionHandler >& _rxInteraction,
+ bool bHasValidContentSignature = false
);
private:
std::shared_ptr< DocumentMacroMode_Data > m_xData;
+ bool m_bNeedsContentSigned;
};
diff --git a/include/svtools/sfxecode.hxx b/include/svtools/sfxecode.hxx
index 3cdad87f4cd9..ccdccae9014b 100644
--- a/include/svtools/sfxecode.hxx
+++ b/include/svtools/sfxecode.hxx
@@ -37,6 +37,7 @@ class ErrCode;
#define ERRCODE_SFX_CANTCREATEBACKUP ErrCode(ErrCodeArea::Sfx, ErrCodeClass::Create, 50)
#define ERRCODE_SFX_MACROS_SUPPORT_DISABLED ErrCode(WarningFlag::Yes, ErrCodeArea::Sfx, ErrCodeClass::NONE, 51)
#define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED ErrCode(WarningFlag::Yes, ErrCodeArea::Sfx, ErrCodeClass::NONE, 52)
+#define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_CONTENT_UNSIGNED ErrCode(WarningFlag::Yes, ErrCodeArea::Sfx, ErrCodeClass::NONE, 53)
#define ERRCODE_SFX_SHARED_NOPASSWORDCHANGE ErrCode(WarningFlag::Yes, ErrCodeArea::Sfx, ErrCodeClass::NONE, 54)
#define ERRCODE_SFX_INCOMPLETE_ENCRYPTION ErrCode(WarningFlag::Yes, ErrCodeArea::Sfx, ErrCodeClass::NONE, 55)
#define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED_MAC \