Apache OpenOffice (AOO) Bugzilla – Issue 100121
Replacement for Words "Document variables" needed
Last modified: 2017-05-20 11:15:31 UTC
Word has "document variables" that are not visible to the user directly. They can be seen (and changed) in some VBA code or in text fields using them. OOo has custom document properties, but they are an incomplete replacement for several reasons: - they are visible in the custom properties dialog - mapping both Word custom properties and document variables to OOo custom properties can create name clashes
i've just had a look at this. currently: word document variables are imported as user-defined document properties. word document variable get/set fields are imported as ??? don't know. ODF has fields for getting user-defined document properties: <text:user-defined>, but not for setting them. ODF also has variables: <text:variable-decl> <text:variable-get> <text:variable-input> <text:variable-set> corresponding OOo API: com.sun.star.text.FieldMaster.SetExpression com.sun.star.text.textfield.SetExpression com.sun.star.text.textfield.GetExpression the writer core objects seem to be in encfld.hxx: SwSetExpField SwGetExpField so maybe we could import word document variables as expression fields, which has the advantage that we can store them in ODF as well.
May i suggest to gives us a tool in the API to make a property non-editable for cummon users ? see also (100150)
This is one possible solution, but it wouldn't be less work than inventing something completely new as this also would require an ODF change. *If possible*, we should find something that works without changing ODF.
Reset assigne to the default "issues@openoffice.apache.org".