AcquireBaseDraft
Document ShellThe
AcquireBaseDraftmethod returns a reference to the base draft of this document with its permissions set as specified.
ODDraft AcquireBaseDraft (in ODDraftPermissions perms);
perms- The target permissions for the draft. Valid values for
permsare dependent on the container suite; the Bento container suite supports two values: read only (kODDPReadOnly) and exclusive read/write (kODDPExclusiveWrite).- return value
- A reference to the base draft of this document.
DISCUSSION
This method returns a reference to the base draft for this document with its permissions set as specified in thepermsparameter. If this document did not already have a base draft, this method creates, initializes, and stores the base draft.The permissions specified by the
permsparameter must be consistent with the ways in which other objects are currently accessing the base draft. The restrictions placed on the permissions depend on the container suite. With the Bento container suite, the permissions may be set to exclusive read/write (kODDPExclusiveWrite) if the base draft is the document's only draft and no other object already has access to the draft (either read only or exclusive read/write). The permissions may be set to read only (kODDPReadOnly) if no object has exclusive read/write access to the draft.This method increments the reference count of the returned draft. When the caller has finished using that draft, it should call the draft's
Releasemethod.EXCEPTIONS
kODErrInvalidPermissions- The base draft is not accessible with the specified permissions.
SEE ALSO
TheODDraftPermissionstype (page 902).
TheODDocument::AcquireDraftmethod (page 136).
"Insert" on page 247 in OpenDoc Programmer's Guide.
"Creating a New Document" on page 291 in OpenDoc Programmer's Guide.
Table 11-1 on page 466 in OpenDoc Programmer's Guide.