Joerg Barfurth wrote:
I just want to second the position that there are things that have been done using old-style services, which can't be done using new-style services.
[...]
No. One of the things you don't get is optional interfaces.
You _can_ inherit an interface optionally from another interface. (At runtime, you need to use queryInterface to check for the presence of the optional interface and to access its members if it is present.)
Another case is where a service name is used not to request instatiation of a single object - as an instance of the (or a) registered implementation, but to enumerate all registered implementation and to instantiate all of them (possibly after some additional filtering). This enumeration feature appears to be gone completely from the new-style service concept.
That is true, the old feature of enumerating all implementations of an (old-style) service does not fit into the new picture too well. Possible replacements can be using the configuration (e.g., UCB), a name-base scheme (e.g., com.sun.star.uri.UriReferenceFactory), or multiple implementations of a constructorless service together with the old enumeration feature (e.g., com.sun.star.smarttags.SmartTagRecognizer).
> IIRC there is a case where an old-style service
intended for this use can optionally implement one of several interfaces (might be "services" that here correspond to MI interfaces) with so little overlap, that the corresponding MII interface would be empty. [Admittedly the constraint that at least one of these interfaces must be implemented can't be expressed in IDL - not even in the old style service construct, so it is documentation only.]
Not a problem: Introduce an interface that non-optionally inherits from XInterface and optionally inherits from an arbitrary number of other interfaces.
-Stephan --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
