How to insert extra and hidden information for each element of document via LibreOffice API?

Michael Stahl mst at
Fri Jul 27 11:21:50 UTC 2018

On 24.07.2018 13:20, MUNOZ JULHO Yupanqui wrote:
> Hi everyone,
> I am working with the Eclipse Papyrus team on a UML to odt generator. 
> Besides one way generating, it should be able to handle bidirectional 
> synchronization between these two "worlds".
> For reaching this goal, I need to map each model element with its 
> respective doc element. For example, a package name will be transformed 
> to a section in a document or a comment in a paragraph. I am looking for 
> a way to reference the UML element from the odt document, for example 
> adding the ID of the UML element to an odt "paragraph".
> In the users mailing list, Regina Henschel, suggested me to use 
> bookmarks. It is a good idea, but, if is possible, I want to hide this 
> information.
> Does anyone have another suggestion?

it would be possible to use RDF metadata, but please note that the 
implementation in Writer is a bit incomplete - e.g. copy/paste of 
content with metadata will typically paste something without metadata.

this page is still an up-to-date description of the status:

see also ODF 1.2 part 1, "4.2 RDF Metadata" and ODF 1.2 part 3, "3.6 

More information about the LibreOffice mailing list