private CTDocProtect safeGetDocumentProtection() { if (this.getJaxbElement()==null) { this.jaxbElement=new CTSettings(); } CTDocProtect documentProtection = this.jaxbElement.getDocumentProtection(); if (documentProtection == null) { documentProtection = Context.getWmlObjectFactory().createCTDocProtect(); this.jaxbElement.setDocumentProtection(documentProtection); } return this.jaxbElement.getDocumentProtection(); }
/** * Verifies the documentProtection tag inside settings.xml file * if the protection is enforced (w:enforcement="1") * and if the kind of protection equals to passed (STDocProtect.Enum editValue) * * @return true if documentProtection is enforced with option readOnly * @since 3.3.0 */ public boolean isRestrictEditingWith(STDocProtect editValue) { CTDocProtect ctDocProtect = this.jaxbElement.getDocumentProtection(); if (ctDocProtect == null) { return false; } return ctDocProtect.isEnforcement() && ctDocProtect.getEdit().equals(editValue); }
private CTDocProtect safeGetDocumentProtection() { if (this.getJaxbElement()==null) { this.jaxbElement=new CTSettings(); } CTDocProtect documentProtection = this.jaxbElement.getDocumentProtection(); if (documentProtection == null) { documentProtection = Context.getWmlObjectFactory().createCTDocProtect(); this.jaxbElement.setDocumentProtection(documentProtection); } return this.jaxbElement.getDocumentProtection(); }
/** * Verifies the documentProtection tag inside settings.xml file * if the protection is enforced (w:enforcement="1") * and if the kind of protection equals to passed (STDocProtect.Enum editValue) * * @return true if documentProtection is enforced with option readOnly * @since 3.3.0 */ public boolean isRestrictEditingWith(STDocProtect editValue) { CTDocProtect ctDocProtect = this.jaxbElement.getDocumentProtection(); if (ctDocProtect == null) { return false; } return ctDocProtect.isEnforcement() && ctDocProtect.getEdit().equals(editValue); }