Re: Setting document metadata

From: Tanya Guza <tanya.guza_at_gmail.com>
Date: Mon Mar 26 2012 - 15:13:51 CEST

Martin, thanks for the explanation. But also I wanted to find out
correct algorithm of settings two particular properties :
PD_META_KEY_DATE and PD_META_KEY_DATE_LAST_CHANGED. Currently it is
set in every plugin that needs it. In case of bug report i mentioned
in my first letter, these
values are not written to output file because odf plugin assumes they
are already set. E.g. fragment of source code:

    // ATTENTION: I'm assuming that dc.date is used by AbiWord as
    // the document creation date & time.
    WRITE_METADATA_ELEMENT(PD_META_KEY_DATE, "meta:creation-date"); //
<--- Here we make assumption that it is already set

    // Note that, for the OpenDocument standard, dc.date
    // is the last modification date & time.
   WRITE_METADATA_ELEMENT(PD_META_KEY_DATE_LAST_CHANGED, "dc:date");
<--- Same thing here

WRITE_METADATA_ELEMENT is a macro that contains check: if metadata
property is not set, then it's skipped.

Also, if you'll search for PD_METADATA_KEY_DATE* in the sources, then
you'll see that it's set in Abiword export plugin and import plugins.
So it seems that there is such situation now: when document is being
exported each plugin should set these two properties(of course if
plugin needs it). Am I correct?

In this case my proposal to solve this issue is to add code that will
set PD_METADATA_KEY_DATE* properties before export plugin is
called(e.g. after user confirmed that he/she wants to save file(for
creation date) or when user saves existing document(for last change
date) . After it we can remove setting of this properties in export
plugins so they will be only in one place. What do you think about it
?

--
Tanya
Received on Mon Mar 26 15:14:03 2012

This archive was generated by hypermail 2.1.8 : Mon Mar 26 2012 - 15:14:03 CEST