/** * Removes protection enforcement.<br> * In the documentProtection tag inside settings.xml file <br> * it sets the value of enforcement to "0" (w:enforcement="0") <br> */ public void removeEnforcement() { safeGetDocumentProtection().setEnforcement(STOnOff.X_0); }
/** * Enforces the protection with the option specified by passed editValue.<br> * <br> * In the documentProtection tag inside settings.xml file <br> * it sets the value of enforcement to "1" (w:enforcement="1") <br> * and the value of edit to the passed editValue (w:edit="[passed editValue]")<br> * <br> * sample snippet from settings.xml * <pre> * <w:settings ... > * <w:documentProtection w:edit="[passed editValue]" w:enforcement="1"/> * </pre> */ public void setEnforcementEditValue(org.openxmlformats.schemas.wordprocessingml.x2006.main.STDocProtect.Enum editValue) { safeGetDocumentProtection().setEnforcement(STOnOff.X_1); safeGetDocumentProtection().setEdit(editValue); }
BigInteger sid = safeGetDocumentProtection().getCryptAlgorithmSid(); byte hash[] = safeGetDocumentProtection().getHash(); byte salt[] = safeGetDocumentProtection().getSalt(); BigInteger spinCount = safeGetDocumentProtection().getCryptSpinCount();
safeGetDocumentProtection().setEnforcement(STOnOff.X_1); safeGetDocumentProtection().setEdit(editValue); if (safeGetDocumentProtection().isSetCryptProviderType()) { safeGetDocumentProtection().unsetCryptProviderType(); if (safeGetDocumentProtection().isSetCryptAlgorithmClass()) { safeGetDocumentProtection().unsetCryptAlgorithmClass(); if (safeGetDocumentProtection().isSetCryptAlgorithmType()) { safeGetDocumentProtection().unsetCryptAlgorithmType(); if (safeGetDocumentProtection().isSetCryptAlgorithmSid()) { safeGetDocumentProtection().unsetCryptAlgorithmSid(); if (safeGetDocumentProtection().isSetSalt()) { safeGetDocumentProtection().unsetSalt(); if (safeGetDocumentProtection().isSetCryptSpinCount()) { safeGetDocumentProtection().unsetCryptSpinCount(); if (safeGetDocumentProtection().isSetHash()) { safeGetDocumentProtection().unsetHash(); safeGetDocumentProtection().setSalt(salt); safeGetDocumentProtection().setHash(hash); safeGetDocumentProtection().setCryptSpinCount(BigInteger.valueOf(spinCount)); safeGetDocumentProtection().setCryptAlgorithmType(STAlgType.TYPE_ANY); safeGetDocumentProtection().setCryptAlgorithmClass(STAlgClass.HASH);
/** * Removes protection enforcement.<br> * In the documentProtection tag inside settings.xml file <br> * it sets the value of enforcement to "0" (w:enforcement="0") <br> */ public void removeEnforcement() { safeGetDocumentProtection().setEnforcement(STOnOff.X_0); }
/** * Removes protection enforcement.<br/> * In the documentProtection tag inside settings.xml file <br/> * it sets the value of enforcement to "0" (w:enforcement="0") <br/> */ public void removeEnforcement() { safeGetDocumentProtection().setEnforcement(STOnOff.X_0); }
/** * Enforces the protection with the option specified by passed editValue.<br> * <br> * In the documentProtection tag inside settings.xml file <br> * it sets the value of enforcement to "1" (w:enforcement="1") <br> * and the value of edit to the passed editValue (w:edit="[passed editValue]")<br> * <br> * sample snippet from settings.xml * <pre> * <w:settings ... > * <w:documentProtection w:edit="[passed editValue]" w:enforcement="1"/> * </pre> */ public void setEnforcementEditValue(org.openxmlformats.schemas.wordprocessingml.x2006.main.STDocProtect.Enum editValue) { safeGetDocumentProtection().setEnforcement(STOnOff.X_1); safeGetDocumentProtection().setEdit(editValue); }
/** * Enforces the protection with the option specified by passed editValue.<br/> * <br/> * In the documentProtection tag inside settings.xml file <br/> * it sets the value of enforcement to "1" (w:enforcement="1") <br/> * and the value of edit to the passed editValue (w:edit="[passed editValue]")<br/> * <br/> * sample snippet from settings.xml * <pre> * <w:settings ... > * <w:documentProtection w:edit="[passed editValue]" w:enforcement="1"/> * </pre> */ public void setEnforcementEditValue(org.openxmlformats.schemas.wordprocessingml.x2006.main.STDocProtect.Enum editValue) { safeGetDocumentProtection().setEnforcement(STOnOff.X_1); safeGetDocumentProtection().setEdit(editValue); }
BigInteger sid = safeGetDocumentProtection().getCryptAlgorithmSid(); byte hash[] = safeGetDocumentProtection().getHash(); byte salt[] = safeGetDocumentProtection().getSalt(); BigInteger spinCount = safeGetDocumentProtection().getCryptSpinCount();
safeGetDocumentProtection().setEnforcement(STOnOff.X_1); safeGetDocumentProtection().setEdit(editValue); if (safeGetDocumentProtection().isSetCryptProviderType()) { safeGetDocumentProtection().unsetCryptProviderType(); if (safeGetDocumentProtection().isSetCryptAlgorithmClass()) { safeGetDocumentProtection().unsetCryptAlgorithmClass(); if (safeGetDocumentProtection().isSetCryptAlgorithmType()) { safeGetDocumentProtection().unsetCryptAlgorithmType(); if (safeGetDocumentProtection().isSetCryptAlgorithmSid()) { safeGetDocumentProtection().unsetCryptAlgorithmSid(); if (safeGetDocumentProtection().isSetSalt()) { safeGetDocumentProtection().unsetSalt(); if (safeGetDocumentProtection().isSetCryptSpinCount()) { safeGetDocumentProtection().unsetCryptSpinCount(); if (safeGetDocumentProtection().isSetHash()) { safeGetDocumentProtection().unsetHash(); safeGetDocumentProtection().setSalt(salt); safeGetDocumentProtection().setHash(hash); safeGetDocumentProtection().setCryptSpinCount(BigInteger.valueOf(spinCount)); safeGetDocumentProtection().setCryptAlgorithmType(STAlgType.TYPE_ANY); safeGetDocumentProtection().setCryptAlgorithmClass(STAlgClass.HASH);