Robert Vojta wrote:

> On 10/15/07, Mathias Bauer <[EMAIL PROTECTED]> wrote:
> 
> Hallo,
> 
>> You have to add the property before you can assign it a value:
> 
> So, when I call setPropertyValue in Java and property wasn't added
> previously, it should raise UnknownPropertyException exception. If
> yes, this exception isn't raised here on my computer and I assume it's
> a bug.

Yes.

>> > ThisComponent.DocumentInfo.AddProperty("aCustomProperty", 
>> > com.sun.star.beans.PropertyAttribute_REMOVABLE, "defaultval")
>> > ThisComponent.DocumentInfo.SetPropertyValue("aCustomProperty", "a Custom 
>> > Value")
>>
>> It's important to use the "REMOVABLE" attribute so that it is
>> immediately discernible that this property is not a "built-in" one.
> 
> It works in StarBasic, thanks. But where I can found addProperty in
> Java? I can't find similiar method in XDocumentInfo, XPropertySet, ... 

It's com.sun.star.beans.XPropertyContainer.

Ciao,
Mathias

-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS
Please don't reply to "[EMAIL PROTECTED]".
I use it for the OOo lists and only rarely read other mails sent to it.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to