private CTDocProtect safeGetDocumentProtection() { CTDocProtect documentProtection = ctSettings.getDocumentProtection(); if (documentProtection == null) { documentProtection = CTDocProtect.Factory.newInstance(); ctSettings.setDocumentProtection(documentProtection); } return ctSettings.getDocumentProtection(); }
/** * 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 boolean isEnforcedWith() { CTDocProtect ctDocProtect = ctSettings.getDocumentProtection(); if (ctDocProtect == null) { return false; } return ctDocProtect.getEnforcement().equals(STOnOff.X_1); }
/** * 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> * <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 readOnly */ public boolean isEnforcedWith(STDocProtect.Enum editValue) { CTDocProtect ctDocProtect = ctSettings.getDocumentProtection(); if (ctDocProtect == null) { return false; } return ctDocProtect.getEnforcement().equals(STOnOff.X_1) && ctDocProtect.getEdit().equals(editValue); }
private CTDocProtect safeGetDocumentProtection() { CTDocProtect documentProtection = ctSettings.getDocumentProtection(); if (documentProtection == null) { documentProtection = CTDocProtect.Factory.newInstance(); ctSettings.setDocumentProtection(documentProtection); } return ctSettings.getDocumentProtection(); }
private CTDocProtect safeGetDocumentProtection() { CTDocProtect documentProtection = ctSettings.getDocumentProtection(); if (documentProtection == null) { documentProtection = CTDocProtect.Factory.newInstance(); ctSettings.setDocumentProtection(documentProtection); } return ctSettings.getDocumentProtection(); }
/** * 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 boolean isEnforcedWith() { CTDocProtect ctDocProtect = ctSettings.getDocumentProtection(); if (ctDocProtect == null) { return false; } return ctDocProtect.getEnforcement().equals(STOnOff.X_1); }
/** * 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> * <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 readOnly */ public boolean isEnforcedWith(STDocProtect.Enum editValue) { CTDocProtect ctDocProtect = ctSettings.getDocumentProtection(); if (ctDocProtect == null) { return false; } return ctDocProtect.getEnforcement().equals(STOnOff.X_1) && ctDocProtect.getEdit().equals(editValue); }
/** * 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 boolean isEnforcedWith(STDocProtect.Enum editValue) { CTDocProtect ctDocProtect = ctSettings.getDocumentProtection(); if (ctDocProtect == null) { return false; } return ctDocProtect.getEnforcement().equals(STOnOff.X_1) && ctDocProtect.getEdit().equals(editValue); }