Kent Gibson wrote:
Hi-ya
I am rendering 500 page documents with loads of
XTextFrames (about 20 per page) and most of the
parameters I set are always the same.
Unfortunately com.sun.star.text.TextFrame does not
support XMultiPropertySet or XFastPropertySet. If I
create my own Component as described in the guide "4.5
Simple Component in Java", will I be able to basically
subclass TextFrame and implement my own support for
XMultiPropertySet, or at least in some way set these
standard parameters quicker? My aim is to speed things
up for objects that I use a lot.
com.sun.star.text.TextFrame is a description of what functionality some
software artifact must have in order to count as an instance of
com.sun.star.text.TextFrame in the UNO world. That artifact could be
pretty much anything, and UNO does not offer any way to "subclass" it.
Of course, you could create your own artifact that adheres to the
com.sun.star.text.TextFrame description, and which could (in principle)
be used as a replacement of some other com.sun.star.text.TextFrame
aritfact. However, the notion of what exactly an (old-style) UNO
services is are left a bit fuzzy ("how do I obtain instances of that
service?", corrected now with the introduction of new-style services),
so that you might or might not have a chance of successfully injecting
your replacement into the OOo system. At any rate, you probably do not
want to create a complete replacement for com.sun.star.text.TextFrame,
anyway.
If you only want to have XMultiPropertySet as a convenience for your own
client (and not to improve execution performance), you could create a
wrapper around an existing TextFrame instance, implement
XMultiPropertySet at the wrapper, and forward a single call to your
XMultiPropertySet as N calls to the wrapped TextFrame.
If, however, you think that instances of TextFrame should generally
support XMultiPropertySet, you could see that the existing
implementations of TextFrame in the OOo source code are extended by this
optional interface, and then your client code could test for the
existence of the optional interface, and use it if available.
-Stephan
thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]