Resetting metadata after new from template ?

Pierre pinaraf at pinaraf.info
Tue Feb 2 21:21:59 GMT 2016


On Tuesday, February 02, 2016 02:08:53 PM Jaroslaw Staniek wrote:
> On 1 February 2016 at 23:20, Pierre <pinaraf at pinaraf.info> wrote:
> > Hi
> > 
> > Right now, when we create a new empty document (at least for words), like
> > any
> > other office suite, it is created from a template. But we currently lack
> > the
> > reset of some metadata from our templates, leading to funny situations… 
For
> > instance, any document created by calligra using the A4 template is more
> > than
> > 7 years old :)
> > 
> > We have several possible fix :
> > - strip metadata from templates : we would still copy the metadata for 
user
> > templates, including creation date, bad imho
> > - strip all metadata when creating a file from template : bad too, users
> > could
> > have specific metadata they don't want to lose
> > - override specific metadata like the creation date with sane values
> > 
> > Each one is very simple to implement, I just don't know which one is the
> > best.
> > I would go for the third option, but I don't have a list of metadata to
> > erase.
> > (we already override the generator BTW, but elsewhere in the saving code)
> > 
> > Any thoughts on this ?
> 
> ​Very interesting finding​
> ​, Pierre.​
> If you ask me, the 3rd option looks best. Documenting the new behaviour,
> whatever it is, in the API docs, would be useful.

I just went through the ODF 1.2 spec part regarding metadata, I think we 
should reset all the meta data defined in the spec except "meta:user-defined"… 
And remember to fill in the meta:template with the XLink to the source 
template.
If nobody disagrees nor sees anything hazardous in it, I'll implement that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 213 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20160202/ec6f9812/attachment.sig>


More information about the calligra-devel mailing list