public bool IsEnforcedWith(ST_DocProtect editValue) { CT_DocProtect documentProtection = this.ctSettings.documentProtection; if (documentProtection == null || !documentProtection.enforcement.Equals((object)ST_OnOff.Value1)) { return(false); } return(documentProtection.edit.Equals((object)editValue)); }
private CT_DocProtect safeGetDocumentProtection() { CT_DocProtect documentProtection = ctSettings.documentProtection; if (documentProtection == null) { documentProtection = new CT_DocProtect(); ctSettings.documentProtection = (documentProtection); } return(ctSettings.documentProtection); }
/** * Verifies the documentProtection tag inside Settings.xml file <br/> * if the protection is enforced (w:enforcement="1") <br/> * and if the kind of protection Equals to passed (STDocProtect.Enum editValue) <br/> * * <br/> * sample snippet from Settings.xml * <pre> * <w:settings ... > * <w:documentProtection w:edit="readOnly" w:enforcement="1"/> * </pre> * * @return true if documentProtection is enforced with option ReadOnly */ public bool IsEnforcedWith(ST_DocProtect editValue) { CT_DocProtect ctDocProtect = ctSettings.documentProtection; if (ctDocProtect == null) { return(false); } return(ctDocProtect.enforcement.Equals(ST_OnOff.Value1) && ctDocProtect.edit.Equals(editValue)); }
/** * Verifies the documentProtection tag inside settings.xml file <br/> * if the protection is enforced (w:enforcement="1") <br/> * <p/> * <br/> * sample snippet from settings.xml * <pre> * <w:settings ... > * <w:documentProtection w:edit="readOnly" w:enforcement="1"/> * </pre> * * @return true if documentProtection is enforced with option any */ public bool IsEnforcedWith() { CT_DocProtect ctDocProtect = ctSettings.documentProtection; if (ctDocProtect == null) { return(false); } return(ctDocProtect.enforcement.Equals(ST_OnOff.on)); }
internal bool IsEnforcedWith() { CT_DocProtect ctDocProtect = ctSettings.documentProtection; if (ctDocProtect == null) { return(false); } return(ctDocProtect.enforcement.Equals(ST_OnOff.on) && (ctDocProtect.edit == ST_DocProtect.comments || ctDocProtect.edit == ST_DocProtect.forms || ctDocProtect.edit == ST_DocProtect.readOnly || ctDocProtect.edit == ST_DocProtect.trackedChanges)); }