Issue 100121 - Replacement for Words "Document variables" needed
Summary: Replacement for Words "Document variables" needed
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: OOo 1.0.0
Hardware: Unknown All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-11 12:31 UTC by Mathias_Bauer
Modified: 2017-05-20 11:15 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Mathias_Bauer 2009-03-11 12:31:21 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
Comment 1 mst.ooo 2009-04-01 15:43:54 UTC
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.
Comment 2 sos 2009-11-27 11:45:19 UTC
May i suggest to gives us a tool in the API to make a property non-editable for 
cummon users ?
see also (100150)
Comment 3 Mathias_Bauer 2009-11-27 12:31:23 UTC
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.
Comment 4 Marcus 2017-05-20 11:15:31 UTC
Reset assigne to the default "issues@openoffice.apache.org".