incubator-odf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Weir <>
Subject Re: Introducing a new PropertiesBase class in Simple API
Date Wed, 16 Nov 2011 17:28:47 GMT
On Tue, Nov 15, 2011 at 3:03 PM, Oliver Rau <> wrote:
> Hi Everybody,
> while writing a couple of enhancements for to the Simple API, some of
> them were in the area around the various properties types, e.g.
> GraphicProperties, ParagraphProperties etc..
> Now as Simple should be what it is called, simple, it is unlikely that
> we will ever reach the point were every property can be accessed. The
> usual way to go then is to OdfDom, however the problem is that there
> is a lot of magic involved in order to get to the actual properties
> element (getting styles, getting automatic styles, etc) and being able
> to set attributes on it.
> What I'm thinking about would be to introduce an base class that each
> Properties implementation would either inherit from. This base class
> would provide bridges to the OdfDom world, e.g. something similar like
> a method called getPropertiesElement. This would return the low level
> OdfDom Properties Element, e.g. StyleGraphicPropertiesElement in case
> of the GraphicProperties.
> The user of the API would now be able to set any property he wants.
> An additional method (or alternative variant to the above) could be a
> method that allows getting / setting properties by name, e.g.
> getProperty(name) and setProperty(name, value).
> What do you guys think?

Since the API is supporting the ODF standard, and the standard changes
very slowly (next version is not expected until 2014), I think the
base class approach is better.  get/setProperty() would be more
interesting if the values were rapidly evolving or open-ended.

But I think we want to "freeze" the trunk right now, as we prepare for
our release.  Just bug fixes now, no new features.


> Regards
> Oliver

View raw message