[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.DocumentProtection

Class DocumentProtection

Namespace
GrapeCity.Documents.Word
Assembly
GcDocs.Word.dll

Represents the set of document protection restrictions applied to a document.

public class DocumentProtection
Inheritance
object
DocumentProtection
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Remarks

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.

Properties

BlockQuickStylesetSwitching

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; }

Property Value

bool

Remarks

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).

BlockThemeOrSchemeSwitching

Gets or sets a value indicating whether modification of the document's theme information should be blocked.

public bool BlockThemeOrSchemeSwitching { get; set; }

Property Value

bool

Remarks

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).

EditProtection

Specifies the type of editing restrictions which shall be enforced on the document.

public EditProtection EditProtection { get; }

Property Value

EditProtection

Remarks

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.

MarkAsFinal

Gets or sets a value indicating whether the document is marked as final (read-only).

public bool MarkAsFinal { get; set; }

Property Value

bool

Remarks

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.

ReadOnlyRecommended

Gets or sets a value indicating whether read-only mode is recommended when opening the document.

public bool ReadOnlyRecommended { get; set; }

Property Value

bool

Remarks

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.

WritePassword

Gets or sets the write password.

public Password WritePassword { get; set; }

Property Value

Password

Remarks

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.