incubator-odf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Rau <>
Subject Introducing a new PropertiesBase class in Simple API
Date Tue, 15 Nov 2011 20:03:10 GMT
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?



View raw message