incubator-odf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Svante Schubert <>
Subject Re: how can I style a list using OdfTextListStyle?
Date Mon, 09 Apr 2012 16:41:09 GMT
On 03.04.2012 18:29, Grzegorz Kaczor wrote:
> 2012/3/31 Devin Han <>
>> Please reference this demo:
>> and this description in cookbook:
>> Now, List API support 3 types of lists, ListType.BULLET, ListType.NUMBER
>> and ListType.IMAGE. The default created list is ListType.BULLET, bullet
>> list. How to create a number list or a image list then? ListDecorator has
>> powerful functions that can help you. ListDecorator is an interface which
>> decides how to decorate a list and its list items. We supply 4
>> implementations of this interface, BulletDecorator, NumberDecorator,
>> ImageDecorator and OutlineDecorator.
>>     // create a number list.
>>        ListDecorator numberDecorator = new NumberDecorator(document1);
>>        List numberList1 = document1.addList(numberDecorator);
>>        List numberList2 = new List(document1, numberDecorator);
>> You can implement your own ListDecorator as need, or extend the default
>> four implementations.
>>  You can remove a list from the document, the following two methods are
>> same.
> Thank you for your response. From this I deduce that I cannot use a list
> style from the document and just assign it to a paragraph or item... it
> would be useful.
I agree that it would be useful and in the end is what all user expects.
For instance there might be a default decorator behind the scenes
dependent of the list type (bullet, number or image) or heading
(outline) the style is using.
Guess there was just time to implement it.
I personally will not invest time atm, as I think it is more important
to improvement the lower levels (DOM - as source code generation) - to
ease problem solution in the higher level (e.g. simple API), like the
following feature -

Happy Easter,

View raw message