[]
Represents the set of document protection restrictions applied to a document.
public class DocumentProtection
These restrictions should be enforced by applications editing this document
when the IsActive property is turned on, and ignored (but persisted) otherwise.
Document protection is a set of restrictions used to prevent unintentional changes
to all or part of a document.
This protection does not encrypt the document, and malicious applications
might circumvent its use. This protection is not intended as a security feature.
Gets or sets a value indicating whether the replacement of the complete set of the document's styles should be blocked.
public bool BlockQuickStylesetSwitching { get; set; }
Specifies whether applications shall prevent the replacement of the complete set of styles stored in the Styles part when editing this document. This setting should not preclude the editing or removal of individual styles, instead, it should only prevent the removal and replacement of the entire styles part in a single operation (either through a user interface or a programmatic operation).
Gets or sets a value indicating whether modification of the document's theme information should be blocked.
public bool BlockThemeOrSchemeSwitching { get; set; }
Specifies whether applications shall prevent the modification of the document's theme information stored in the Theme part when editing this document. This setting should not preclude the use of the theme information, instead, it should only prevent the modification of the theme part in a single operation (either through a user interface or a programmatic operation).
Specifies the type of editing restrictions which shall be enforced on the document.
public EditProtection EditProtection { get; }
These restrictions should be enforced by applications editing this document
when the IsActive property is turned on, and ignored (but persisted) otherwise.
Document protection is a set of restrictions used to prevent unintentional changes
to all or part of a document.
This protection does not encrypt the document, and malicious applications
might circumvent its use. This protection is not intended as a security feature.
Gets or sets a value indicating whether the document is marked as final (read-only).
public bool MarkAsFinal { get; set; }
Use this property to make your file read-only. When you mark as final, typing, editing commands, proofing marks are disabled or turned off, and the file becomes read-only, and the Status property of the document is set to Final.
Gets or sets a value indicating whether read-only mode is recommended when opening the document.
public bool ReadOnlyRecommended { get; set; }
Specifies that applications should provide user interface recommending that the user open this document in write protected state. If the user chooses to do so, the document shall be write protected, otherwise, it shall be opened fully editable. If this property is omitted, then user interface recommending that the user open this document in write protected state should not be provided. If the password property is also specified, then this setting shall be ignored.
Gets or sets the write password.
public Password WritePassword { get; set; }
When present, the write protection shall result in one of two write
protection behaviors:
If the Password property is present, or both (WritePassword and ReadOnlyRecommended
properties) are omitted, then the application shall prompt for a password to
exit write protection.
If the supplied password does not match the hash value in this property,
then write protection shall be enabled.
If only the ReadOnlyRecommended property is present, the application should provide
user interface recommending that the user open this document in write
protected state.If the user chooses to do so, the document shall be write
protected, otherwise, it shall be opened fully editable.