1*cdf0e10cSrcweir/************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir 28*cdf0e10cSrcweir#ifndef __com_sun_star_document_MacroExecMode_idl__ 29*cdf0e10cSrcweir#define __com_sun_star_document_MacroExecMode_idl__ 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir//============================================================================= 32*cdf0e10cSrcweir 33*cdf0e10cSrcweirmodule com { module sun { module star { module document { 34*cdf0e10cSrcweir 35*cdf0e10cSrcweir//============================================================================= 36*cdf0e10cSrcweir/** Specify whether a macro can be executed. 37*cdf0e10cSrcweir 38*cdf0e10cSrcweir @since OOo 1.1.2 39*cdf0e10cSrcweir*/ 40*cdf0e10cSrcweirpublished constants MacroExecMode 41*cdf0e10cSrcweir{ 42*cdf0e10cSrcweir //------------------------------------------------------------------------- 43*cdf0e10cSrcweir /** A macro should not be executed at all. 44*cdf0e10cSrcweir */ 45*cdf0e10cSrcweir 46*cdf0e10cSrcweir const short NEVER_EXECUTE = 0; 47*cdf0e10cSrcweir 48*cdf0e10cSrcweir //------------------------------------------------------------------------- 49*cdf0e10cSrcweir /** Execute macros from secure list quietly. 50*cdf0e10cSrcweir 51*cdf0e10cSrcweir <p> 52*cdf0e10cSrcweir If a macro is not in the list a conformation for it executing will 53*cdf0e10cSrcweir appear. 54*cdf0e10cSrcweir </p> 55*cdf0e10cSrcweir */ 56*cdf0e10cSrcweir 57*cdf0e10cSrcweir const short FROM_LIST = 1; 58*cdf0e10cSrcweir 59*cdf0e10cSrcweir //------------------------------------------------------------------------- 60*cdf0e10cSrcweir /** Execute any macro, macros signed with trusted sertificates and macros 61*cdf0e10cSrcweir from secure list are executed quietly. 62*cdf0e10cSrcweir 63*cdf0e10cSrcweir <p> 64*cdf0e10cSrcweir If the macro is neither in secure list nor signed a conformation 65*cdf0e10cSrcweir will be requested. 66*cdf0e10cSrcweir </p> 67*cdf0e10cSrcweir */ 68*cdf0e10cSrcweir 69*cdf0e10cSrcweir const short ALWAYS_EXECUTE = 2; 70*cdf0e10cSrcweir 71*cdf0e10cSrcweir //------------------------------------------------------------------------- 72*cdf0e10cSrcweir /** Use configuration to retrieve macro settings. In case a user 73*cdf0e10cSrcweir confirmation is required a dialog is output. 74*cdf0e10cSrcweir */ 75*cdf0e10cSrcweir 76*cdf0e10cSrcweir const short USE_CONFIG = 3; 77*cdf0e10cSrcweir 78*cdf0e10cSrcweir 79*cdf0e10cSrcweir //------------------------------------------------------------------------- 80*cdf0e10cSrcweir /** A macro should be executed always no conformation should be provided. 81*cdf0e10cSrcweir */ 82*cdf0e10cSrcweir 83*cdf0e10cSrcweir const short ALWAYS_EXECUTE_NO_WARN = 4; 84*cdf0e10cSrcweir 85*cdf0e10cSrcweir //------------------------------------------------------------------------- 86*cdf0e10cSrcweir /** Use configuration to retrieve macro settings. Treat cases when user 87*cdf0e10cSrcweir confirmation required as rejected. 88*cdf0e10cSrcweir */ 89*cdf0e10cSrcweir 90*cdf0e10cSrcweir const short USE_CONFIG_REJECT_CONFIRMATION = 5; 91*cdf0e10cSrcweir 92*cdf0e10cSrcweir //------------------------------------------------------------------------- 93*cdf0e10cSrcweir /** Use configuration to retrieve macro settings. Treat cases when user 94*cdf0e10cSrcweir confirmation required as approved. 95*cdf0e10cSrcweir */ 96*cdf0e10cSrcweir 97*cdf0e10cSrcweir const short USE_CONFIG_APPROVE_CONFIRMATION = 6; 98*cdf0e10cSrcweir 99*cdf0e10cSrcweir //------------------------------------------------------------------------- 100*cdf0e10cSrcweir /** Execute only macros from secure list. Macros that are not from the list 101*cdf0e10cSrcweir are not executed. 102*cdf0e10cSrcweir */ 103*cdf0e10cSrcweir const short FROM_LIST_NO_WARN = 7; 104*cdf0e10cSrcweir 105*cdf0e10cSrcweir //------------------------------------------------------------------------- 106*cdf0e10cSrcweir /** Execute only macros from secure list or macros that are signed by 107*cdf0e10cSrcweir trusted certificates. 108*cdf0e10cSrcweir 109*cdf0e10cSrcweir <p> If the macro is neither in secure list nor signed it will not be 110*cdf0e10cSrcweir executed. 111*cdf0e10cSrcweir </p> 112*cdf0e10cSrcweir 113*cdf0e10cSrcweir <p> If the macro is signed with unknown certificate a warning will 114*cdf0e10cSrcweir appear. The macro either will not be executed or if the warning 115*cdf0e10cSrcweir allows conformation, it will be executed after user agrees. 116*cdf0e10cSrcweir </p> 117*cdf0e10cSrcweir */ 118*cdf0e10cSrcweir const short FROM_LIST_AND_SIGNED_WARN = 8; 119*cdf0e10cSrcweir 120*cdf0e10cSrcweir //------------------------------------------------------------------------- 121*cdf0e10cSrcweir /** Execute only macros from secure list or macros that are signed by 122*cdf0e10cSrcweir trusted certificates. No warning/conformation should be shown. 123*cdf0e10cSrcweir */ 124*cdf0e10cSrcweir const short FROM_LIST_AND_SIGNED_NO_WARN = 9; 125*cdf0e10cSrcweir 126*cdf0e10cSrcweir}; 127*cdf0e10cSrcweir 128*cdf0e10cSrcweir//============================================================================= 129*cdf0e10cSrcweir 130*cdf0e10cSrcweir}; }; }; }; 131*cdf0e10cSrcweir 132*cdf0e10cSrcweir#endif 133