public EditRestrictions GetProtectionType()
{
if (isProtected)
{
XElement documentProtection = settings.Descendants(XName.Get("documentProtection", w.NamespaceName)).FirstOrDefault();
string edit_type = documentProtection.Attribute(XName.Get("edit", w.NamespaceName)).Value;
return (EditRestrictions)Enum.Parse(typeof(EditRestrictions), edit_type);
}
return EditRestrictions.none;
}