Hello Georg, Just returned from a vacation and will need to take a deeper look into it. >From the internal view of some office applications, lists are just paragraphs with some additional properties. You pick a paragraph and assign some list styles to it. I started to work on lists using odf changes, let me see if I am able to finish it within the next month.
Cheers, Svante ᐧ 2018-03-15 17:51 GMT+01:00 DevNews <[email protected]>: > Hallo, > > I try once more to ask my question: > I have to create different listings in a dynamic odf document: > Like: > 1. Xx > 2. Xx > 3. Xx > > i. Xx > ii. Xx > iii. Xx > > a) xxx > b) xxx > c) xxx > > At the moment I only get created ordered Lists like: 1. 2. 3. and > unordered Lists like ● ● ● > > > So there is my question: > > I would like to write new Decorators that implement ListDecorator > So I would write a NumberedDecoratorBase. This class should implement a > „custom“ numbered ListDecorator that has to be supplied with all > configurations. (that is: prefix, suffix, number-symbol, indentation, etc.) > > Then I would inherit the existing NumberDecorator from this > NumberedDecoratorBase. > Then I would write additional Decorators that all inherit from this > NumberedDecoratorBase like: > NumberedAlphaLowerDecorator, > NumberedAlphaUpperDecorator, > NumberedRomanLowerDecorator, > NumberedRomanUpperDecorator, > NumberedGreekLowerDecorator, > > All this decorators would implement the function: > public ListType getListType() { > return ListType.NUMBER; > } > > > The same I would do for BulletDecorator: I would write a > SymbolDeoratorBase, inherit BulletDecorator from this SymbolDeoratorBase > and then write following new Decorators inheriting from SymbolDeoratorBase: > DotDecorator > SquareDecorator > > All this decorators would implement the function: > public ListType getListType() { > return ListType. BULLET; > } > > > > - If I would do so, do I have to consider more? > - Is it right to have the same ListType.NUMBER and > ListType.BULLET for all my new decorators? > - I saw that ListType.NUMBER is used in > org.odftoolkit.simple.text.list.List.toString(). I suppose that this > function is not used for production but for debugging and I don't have to > consider this…. > > > Can somebody advice me, if this will be a good way of doing? > > Thanks Georg > > > > > > > > > > > > > ________________________________ > > safir Wirtschaftsinformationsdienst GmbH > Möllendorffstr. 49 > 10367 Berlin > Tel.:++49 30 577981 - 0 > Fax: ++49 30 577981 - 18 > E-Mail: [email protected]<mailto:[email protected]> > Internet: www.safir-wid.de<http://www.safir-wid.de> > Handelsregister: > Amtsgericht Charlottenburg HRB 66681 > USt-ID: DE 193584747 > Geschäftsführer: Thilo Kind > > > > > Von: Georg Füchsle <[email protected]> > Gesendet: Freitag, 9. März 2018 14:43 > An: [email protected] > Betreff: custom designed ordered and unordered lists > > Hallo, > > as far as I see, in odfdom I can use only a standard BulletList and a > standard NumberedList, that will produce following output. > 1. Xx > 2. Xx > 3. Xx > > or > ● ddd > ● hjdh > ● hhj > > Is there the possibility to set the ordering symbol dynamically? > > Thanks Georg > > > > ________________________________ > > safir Wirtschaftsinformationsdienst GmbH > Möllendorffstr. 49 > 10367 Berlin > Tel.:++49 30 577981 - 0 > Fax: ++49 30 577981 - 18 > E-Mail: [email protected]<mailto:[email protected]> > Internet: www.safir-wid.de<http://www.safir-wid.de> > Handelsregister: > Amtsgericht Charlottenburg HRB 66681 > USt-ID: DE 193584747 > Geschäftsführer: Thilo Kind > > > > > > > > -- > > This email was Malware checked by UTM 9. http://www.sophos.com > > > > -- > > This email was Malware checked by UTM 9. http://www.sophos.com > > -- > This email was Malware checked by UTM 9. http://www.sophos.com >
