Since i upgraded from 2.5.0 to 2.6.0 , i can't find the document protection, for example the next code dosen't work anymore :
- Code: Select all
List<DefaultElement> elementList = documentSettings.getDocument().getRootElement().elements();
for(DefaultElement e:elementList){
if(e.getName().equals("documentProtection")) {
List<DefaultAttribute> attributeList = e.attributes();
for(DefaultAttribute a:attributeList) {
if(a.getName().equals("edit")) {
if(a.getValue().equals("comments")) protectType = STDocProtect.COMMENTS;
if(a.getValue().equals("forms")) protectType = STDocProtect.FORMS;
if(a.getValue().equals("none")) protectType = STDocProtect.NONE;
if(a.getValue().equals("readOnly")) protectType = STDocProtect.READ_ONLY;
if(a.getValue().equals("trackedChanges")) protectType = STDocProtect.TRACKED_CHANGES;
}
}
}
}
Where can i find information on document protection in 2.6.0 version ?
Thanks a lot.
Best regards