Revision 860012

Go back to digest for 14th September 2008

Other in Office

Girish Ramakrishnan committed changes in /trunk/koffice:

Use the new KoList instead of KoListStyle.

Load every text:list as a separate KoList.

After discussing with Thomas, we decided that its best to maintain a separate list (KoList) for every text:list instead of a separate KoList for every list style.

This has the following advantages:
1. Clear demarcation of ODF lists. When writing the ODF with lists spanning each other it is hard to make out when a ODF list starts and ends. For example,
* L1
- L2
- L3
*L4

In the case above, are L1 and L2 in the same ODF list with different levels? Or are they two ODF lists?
We can generate the requried ODF only if we have something that ties all the QTextLists together.
Note that KoListStyle did tie QTextLists together but it did it at a style level.

2. We can have true list properties. For example, continue numbering can now be attached to the KoList instead of a block.

3. Changing the list style of one list, does not change the list style of some other arbitrary list that is using the same automatic style!

Changing the style of one should not change the other's style (This happens in OOo which in our opinion is bad). Prior to this we had a hacky, ListStartsHere propertyon the block.

File Changes

Modified 13 files
  • /trunk/koffice
  •   /libs/kotext/KoList.cpp
  •   /libs/kotext/KoTextShapeData.cpp
  •   /plugins/textshape/ListItemsHelper.cpp
  •   /libs/kotext/opendocument/KoTextLoader.cpp
  •   /libs/kotext/styles/KoListStyle.cpp
  •   /libs/kotext/styles/KoListStyle.h
  •   /libs/kotext/styles/KoParagraphStyle.cpp
  •   /libs/kotext/styles/KoParagraphStyle.h
  •   /plugins/textshape/commands/ChangeListCommand.cpp
  •   /plugins/textshape/commands/ChangeListCommand.h
  •   /libs/kotext/opendocument/tests/data/common.qs
  •   /libs/kotext/opendocument/tests/data/TextContents/Lists/embeddedBulletedList.qs
  •   /libs/kotext/opendocument/tests/data/TextContents/Lists/startValue.qs
13 files changed in total