On 10/12/07, Robert Vojta <[EMAIL PROTECTED]> wrote:
>
> Is there a generic way how to store custom data within a document and
> within an object (like table) inside document?
>
You can store metadata at document level :
for this you need to use the DocumentInfo service....you can set and
get any key value pair using the XPropertySet interface of this
service...
In starbasic you could do :
to set a custom property :
ThisComponent.DocumentInfo.SetPropertyValue("aCustomProperty", "a Custom Value")
to get a custom property:
ThisComponent.DocumentInfo.GetPropertyValue("aCustomProperty")
For individual tables:
the tables expose a "UserDefinedAttributes" property via an
UserDefinedAttributesSupplier service....
This allows you to set attribute metadata at table level...
Dim uda
uda = thisComponent.getTextTables().getbyname("table1")
uda is a NameContainer type and lets you set individual attribtues in
a com.sun.star.xml.AttributeData structure...
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]