Re: API to retrieve document metadata
Ariel Constenla-Haile <[email protected]>
| Newsgroups | gmane.comp.openoffice.questions |
|---|---|
| Message-ID | <20111025142012.GA9416@localhost> |
Hi Alona,
On Mon, Oct 24, 2011 at 04:41:50PM -0400, Alona Rossen wrote:
> Please suggest OOo API to retrieve document metadata. For example,
> metadata listed under File->Properties->Statistics in OpenOffice (number
> of pages, paragraph count, word count, etc).
every document implements com.sun.star.document.XDocumentPropertiesSupplier
http://api.openoffice.org/docs/common/ref/com/sun/star/document/XDocumentPropertiesSupplier.html
getDocumentProperties() returns an css.document.XDocumentProperties
http://api.openoffice.org/docs/common/ref/com/sun/star/document/XDocumentProperties.html
In OOo Basic:
Sub Main
Dim oDoc as Object
oDoc = ThisComponent
Dim oDocProps as Object
oDocProps = oDoc.getDocumentProperties()
End Sub
Inspect oDocProps in the OOo Basic IDE.
Regards
--
Ariel Constenla-Haile
La Plata, Argentina
signature.asc
(application/pgp-signature, 836 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBCAAGBQJOpsWcAAoJEMjP1bm45QNWrTkP/jrRMO8aJ1LhOXnZAQ+xMyuP h4YusDDh31+vVgK5AiB/okZ8beNjQVTxBpWL6xoiKNkg73mwgzRIr2Ji3J57y5Ww lE2DNyiQAY2DVs6VsJQBPRrvKBFXeS1RVfcP62p0ffsezqVemwF0KZwavhNDb+OG CDVnS5HJWQXxSmwvtliYqAyQw8MWuecUYOqHs2jE20//n8pZr8vHLzPViig8RzE/ bAJswh3c5OIBjfSs3TPKEyMKxJWuIBel+pjDkfxtH9BMrc6bwL7H8ottBHqNp03I WQjfzSUnM0Ht760tX+puj9pPGaE90E06QLAqE4MAMjwG8E5yjyw3sX0T+0EYKXwr bttPztVNRw4EQAJMhzZBCXzgUo6c1CKtqaHj7068rRgchqFLiQw/jKDVXvxnl+/z jzF6pwUxI8lBNeP2hbRXkIkTv0wd0urNOaXf2hFX6+SPy3ebXGgSt93APbYh+IOQ JfgcYAlHCEY6rWfa5SYIVfcScw8IKbVa1xJUoaQHcuEHKh/nmvdiNimTtOaXpALn 2eaQIFolceGhyCLLkubPuCmEfmc0K1WvahXx65tCLCEHrVd2KLb30kkoSWy2GKY9 YLRYfgfbMDJpyZKj/23tJpEgERCSUIkenuqBAXVvuRp1V1aoTvYkiRGhDtWDgcWz dQoh0Vbpk9xJ95eRfJpv =gjdI -----END PGP SIGNATURE-----