Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


On 11/16/2012 04:42 AM, José Guilherme Vanz wrote:
I'm analizing some things new to do and I started to do this bug:
https://bugs.freedesktop.org/show_bug.cgi?id=46808

A warning about that issue first: Noel Grandin already did a lot of work there, transferred many old-style services to new-style. What is left by now is probably mostly delicate corner cases, so what's left of this issue might have become a bit tough by now.

Well, When I was working in some sources I found something like this:
published service PropertySet
{
     interface com::sun::star::beans::XPropertySet;

     [optional] interface com::sun::star::beans::XFastPropertySet;
     [optional] interface com::sun::star::beans::XMultiPropertySet;
     [optional] interface com::sun::star::beans::XPropertyAccess;
     [optional] interface com::sun::star::beans::XPropertyState;

};

This service description is somewhat special. Normally, there is a single implementation for a service, and client code uses the service by instantiating a (the) implementation and calling its methods. See, e.g., com.sun.star.uri.UriReferenceFactory, implemented in stoc/util/stocservices.component (resp. stoc/source/uriproc/UriReferenceFactory.cxx), and used via UriReferenceFactory::create in places like avmedia/source/framework/mediaitem.cxx.

com.sun.star.beans.PropertySet is more like documentation; it states that if a service (or even some arbitrary object) supports the notion of "properties," then it should implement the interfaces listed here. In this case here, that is somewhat self-evident, and the service is of little value and not widely used anyway (I found just two .component files mentioning it, chart2/source/chartcore.copmonent and chart2/source/controller/chartcontroller.component).

The bug's description guides to do something like that:

service Foo { interface XBar; };

Transform for:

service Foo: XBar;

In this case, what I do with [optional] when transform for new style?
Where could I find more documentation of .idl files?

In general, when transferring an old-style service that includes optional interfaces to new style, one needs to decide whether to include those interfaces in the new-style service's (multiple-inheritance) interface as mandatory or optional. For example, <http://cgit.freedesktop.org/libreoffice/core/commit/?id=d2c45d0460cf99aadde1aaec11e032f488fa277b> "fdo#46808, Adapt i18n::Transliteration UNO service to new style" changed com.sun.star.i18n.Transliteration from old-style

  service Transliteration {
    interface XTransliteration;
    [optional] interface XExtendedTransliteration;
  };

to new-style

  service Transliteration: XExtendedTransliteration;

as the implementation of the service implemented that additional XExtendedTransliteration (which inherits from XTransliteration, adding functionality that was found necessary over time) anyway.

For documentation on UNOIDL, see the Developer's Guide at <http://wiki.openoffice.org/wiki/Documentation/DevGuide/OpenOffice.org_Developers_Guide>.

Stephan

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.