Skip to content

List operations

adityab edited this page Sep 23, 2014 · 3 revisions

To get an idea what atomic operations are needed around list manipulations, typical UI actions need to be collected. A lot of the UI actions are moving data around, so there will be many operations besides AddXXX and RemoveXXX to optimize the number of operations needed to express an UI action and to avoid some data removal and then insertion again.

(Next to operations needed to express UI actions there surely are also more specific operations one would like to use from scripts, which should be supported as well)

Not sure if the current addressing system will be sufficient to support all operations needed, let's see. Possible workaround can be the xml:ids, but xml:id addresses alone will not be sufficient in OT with position-only ops.

The design of the operations should possibly also include thinking about the possibility to create reverse operations, for the planned Undo/Redo-Mechanism.

Possible elements of a list:

<text:list text:continue-list="" text:continue-numbering="" text:style-name="" xml:id="">
<text:list-header xml:id="">
  <text:h/>
  <text:list/>
  <text:number/>
  <text:p/>
  <text:soft-page-break/>
</text:list-header>
<text:list-item  text:start-value="" text:style-override="" xml:id="">
  <text:h/>
  <text:list/>
  <text:number/>
  <text:p/>
  <text:soft-page-break/>
</text:list-item>
</text:list>

Possible elements of a list style:

<text:list-style  style:display-name="" style:name="" text:consecutive-numbering="">
  <text:list-level-style-bullet/>
  <text:list-level-style-image/>
  <text:list-level-style-number/>
</text:list-style> 

UI actions

Listing of actions related to lists. Please add your actions.

Turn one or multiple paragraphs into a list

List style to use can e.g. be hardcoded into UI element (buttons). If done for paragraphs behind an existing list, the new items are appended to that list.

Turn one or multiple list-items into non-list text

If done for items in middle of list, in LO results that original list gets split, but second list continues counting of the first one.

Switch list type between numbered and bulleted

When the selection contains a list's items, clicking either one of the list buttons should change those list items to be either numbered or bulleted depending on what was chosen.

Merge two list items of the same list into one

Merge two list items of different lists into one

Move one or multiple list items to another level

Usually one level up or down. Means also creation of a new list if needed or merging an existing one into another.

Toggling between list-item and list-header

Never used or needed that myself, but is supported e.g. in LO when pressing Backspace (or Shift-Backspace) at begin of list-item

?

?

?

Operations

yet to be thought about when there are lots of UI actions collected

Links to list-related operations of other projects

?