Overview | Module | Use | Devguide | Index

Methods' Summary | Attributes' Summary | Methods' Details | Attributes' Details

:: com :: sun :: star :: document ::
interface XDocumentProperties
Description provides document-specific information such as the author, creation date, and user-defined fields. This interface manages access to document meta-data properties. Such properties may be set from the outside via the setter methods (e.g. when importing arbitrary document formats that support document properties), or imported from an ODF package via the methods loadFromStorage and loadFromMedium. The properties may also be stored via the methods storeToStorage and storeToMedium. Since OOo 3.0 See also XDocumentPropertiesSupplier for getting access to an instance from a loaded document See also DocumentProperties for a service that implements this interface

Methods' Summary
resetUserData | resets all attributes that could identify the user.
getUserDefinedProperties | provides access to a container for user-defined properties.
loadFromStorage | loads document properties from an ODF package.
loadFromMedium | loads document properties from an ODF package or an OLE container.
storeToStorage | stores document properties to an ODF package.
storeToMedium | stores document properties to an ODF package or an OLE container.

Attributes' Summary
Author | contains the initial author of the document.
Generator | identifies which application was used to create or last modify the document.
CreationDate | contains the date and time when the document was created.
Title | contains the title of the document.
Subject | contains the subject of the document.
Description | contains a multi-line comment describing the document.
Keywords | contains a list of keywords for the document.
Language | contains the default language of the document.
ModifiedBy | contains the name of the person who most recently stored the document.
ModificationDate | contains the date and time of the last time the document was stored.
PrintedBy | contains the name of the person who most recently printed the document.
PrintDate | contains the date and time when the document was last printed.
TemplateName | contains the name of the template from which the document was created.
TemplateURL | contains the URL of the template from which the document was created.
TemplateDate | contains the date and time of when the document was created or updated from the template.
AutoloadURL | contains the URL to load automatically at a specified time after the document is loaded into a desktop frame.
AutoloadSecs | contains the number of seconds after which a specified URL is to be loaded after the document is loaded into a desktop frame.
DefaultTarget | contains the name of the default frame into which links should be loaded if no target is specified.
DocumentStatistics | contains some statistics about the document.
EditingCycles | describes how often the document was edited and saved.
EditingDuration | contains the net time of editing the document (in seconds).

Methods' Details
resetUserData
void
resetUserData( | [in] string | Author );
Description resets all attributes that could identify the user. Clears the document properties, such that it appears the document has just been created. This is a convenience method which resets several attributes at once, as follows: Author is set to the given parameter. CreationDate is set to the current date and time. ModifiedBy is cleared. ModificationDate is cleared. PrintedBy is cleared. PrintDate is cleared. EditingDuration is cleared. EditingCycles is set to 1. Parameter Author the new value of the Author attribute.
getUserDefinedProperties
::com::sun::star::beans::XPropertyContainer
getUserDefinedProperties();
Description provides access to a container for user-defined properties. The returned object also implements the interface com::sun::star::beans::XPropertySet. Returns a container that provides access to user-defined properties
loadFromStorage
void
loadFromStorage( | [in] ::com::sun::star::embed::XStorage | Storage,
| [in] sequence< ::com::sun::star::beans::PropertyValue > | Medium )
raises( | ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::io::WrongFormatException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::io::IOException );
Description loads document properties from an ODF package. This method is used for accessing an ODF package that is owned by someone else, e.g., a document. Parameter Storage the com::sun::star::embed::Storage representing the ODF package Parameter Medium the com::sun::star::document::MediaDescriptor representing the source This is unfortunately necessary in order to properly resolve relative URLs in the meta-data. Throws com::sun::star::lang::IllegalArgumentException if argument is NULL Throws com::sun::star::io::WrongFormatException if parsing the XML document fails Throws com::sun::star::lang::WrappedTargetException if thrown when trying to open a stream in the given storage Throws com::sun::star::io::IOException if thrown when trying to open a stream in the given storage
loadFromMedium
void
loadFromMedium( | [in] string | URL,
| [in] sequence< ::com::sun::star::beans::PropertyValue > | Medium )
raises( | ::com::sun::star::io::WrongFormatException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::io::IOException );
Description loads document properties from an ODF package or an OLE container. Parameter URL the URL of the source document The URL could be part of the Medium parameter, but because often no other parameters except the URL are needed, providing it separately was added for convenience. Parameter Medium the com::sun::star::document::MediaDescriptor representing the source Throws com::sun::star::io::WrongFormatException if parsing the XML document fails Throws com::sun::star::lang::WrappedTargetException if thrown when trying to open a stream in the given storage Throws com::sun::star::io::IOException if thrown when trying to open a stream in the given storage
storeToStorage
void
storeToStorage( | [in] ::com::sun::star::embed::XStorage | Storage,
| [in] sequence< ::com::sun::star::beans::PropertyValue > | Medium )
raises( | ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::io::IOException );
Description stores document properties to an ODF package. This method is used for accessing an ODF package that is owned by someone else, e.g., a document. Note that the implementation may choose to store the meta-data in either OOo or ODF format, depending on the MediaType property of the given ::Storage argument. Parameter Storage the com::sun::star::embed::Storage representing the ODF package Parameter Medium the com::sun::star::document::MediaDescriptor representing the source This is unfortunately necessary in order to properly resolve relative URLs in the meta-data. Throws com::sun::star::lang::IllegalArgumentException if argument is NULL Throws com::sun::star::lang::WrappedTargetException if thrown when trying to open a stream in the given storage Throws com::sun::star::io::IOException if thrown when writing to the storage
storeToMedium
void
storeToMedium( | [in] string | URL,
| [in] sequence< ::com::sun::star::beans::PropertyValue > | Medium )
raises( | ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::io::IOException );
Description stores document properties to an ODF package or an OLE container. Parameter URL the URL of the target document The URL could be part of the Medium parameter, but because often no other parameters except the URL are needed, providing it separately was added for convenience. Parameter Medium the com::sun::star::document::MediaDescriptor representing the target Throws com::sun::star::lang::WrappedTargetException if thrown when trying to open a stream in the given storage Throws com::sun::star::io::IOException if thrown when writing to the storage

Attributes' Details
Author
string Author; Description contains the initial author of the document.
Generator
string Generator; Description identifies which application was used to create or last modify the document. The generating application will set this attribute when it creates a new document or it saves a document. When a document is loaded that itself contains such an attribute it will be preserved until the document is saved again.
CreationDate
::com::sun::star::util::DateTime CreationDate; Description contains the date and time when the document was created.
Title
string Title; Description contains the title of the document.
Subject
string Subject; Description contains the subject of the document.
Description
string Description; Description contains a multi-line comment describing the document. Line delimiters can be UNIX, Macintosh or DOS style.
Keywords
sequence< string > Keywords; Description contains a list of keywords for the document.
Language
::com::sun::star::lang::Locale Language; Description contains the default language of the document.
ModifiedBy
string ModifiedBy; Description contains the name of the person who most recently stored the document.
ModificationDate
::com::sun::star::util::DateTime ModificationDate; Description contains the date and time of the last time the document was stored. If the document has never been stored, contains a default value.
PrintedBy
string PrintedBy; Description contains the name of the person who most recently printed the document.
PrintDate
::com::sun::star::util::DateTime PrintDate; Description contains the date and time when the document was last printed. If the document has never been printed, contains a default value.
TemplateName
string TemplateName; Description contains the name of the template from which the document was created. The value is an empty `string` if the document was not created from a template or if it was detached from the template.
TemplateURL
string TemplateURL; Description contains the URL of the template from which the document was created. The value is an empty `string` if the document was not created from a template or if it was detached from the template.
TemplateDate
::com::sun::star::util::DateTime TemplateDate; Description contains the date and time of when the document was created or updated from the template.
AutoloadURL
string AutoloadURL; Description contains the URL to load automatically at a specified time after the document is loaded into a desktop frame. An empty URL is valid and describes a case where the document shall be reloaded from its original location after some time described by the attribute AutoloadSecs. An empty `string` together with an AutoloadSecs value of 0 describes a case where no autoload is specified. See also AutoloadSecs
AutoloadSecs
long AutoloadSecs set raises (::com::sun::star::lang::IllegalArgumentException); Description contains the number of seconds after which a specified URL is to be loaded after the document is loaded into a desktop frame. A value of 0 is valid and describes a redirection. A value of 0 together with an empty `string` as AutoloadURL describes a case where no autoload is specified. Throws com::sun::star::lang::IllegalArgumentException if argument is negative See also AutoloadURL
DefaultTarget
string DefaultTarget; Description contains the name of the default frame into which links should be loaded if no target is specified. This applies to the autoload feature too, but to others as well.
DocumentStatistics
sequence< ::com::sun::star::beans::NamedValue > DocumentStatistics; Description contains some statistics about the document. The contained statistics may be specific to the type of the document.
EditingCycles
short EditingCycles set raises (::com::sun::star::lang::IllegalArgumentException); Description describes how often the document was edited and saved. Throws com::sun::star::lang::IllegalArgumentException if argument is negative
EditingDuration
long EditingDuration set raises (::com::sun::star::lang::IllegalArgumentException); Description contains the net time of editing the document (in seconds). Throws com::sun::star::lang::IllegalArgumentException if argument is negative

Top of Page

Copyright © 2000, 2013 LibreOffice contributors and/or their affiliates. All rights reserved.

LibreOffice was created by The Document Foundation, based on OpenOffice.org, which is Copyright 2000, 2010 Oracle and/or its affiliates.

The Document Foundation acknowledges all community members, please find more info at our website.

Privacy Policy | Impressum (Legal Info) | Copyright information: The source code of LibreOffice is licensed under the GNU Lesser General Public License (LGPLv3). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.