Changeset View
Changeset View
Standalone View
Standalone View
plugins/flake/textshape/kotext/KoList.cpp
Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Line(s) | 59 | { | |||
---|---|---|---|---|---|
66 | } | 66 | } | ||
67 | 67 | | |||
68 | //the block was already another list but with a different style - remove block from list | 68 | //the block was already another list but with a different style - remove block from list | ||
69 | if (list) | 69 | if (list) | ||
70 | list->remove(block); | 70 | list->remove(block); | ||
71 | 71 | | |||
72 | // Ok, so we are now ready to add the block to another list, but which other list? | 72 | // Ok, so we are now ready to add the block to another list, but which other list? | ||
73 | // For headers we always want to continue from any previous header | 73 | // For headers we always want to continue from any previous header | ||
74 | // For normal lists we either want to continue an adjecent list or create a new one | 74 | // For normal lists we either want to continue an adjacent list or create a new one | ||
75 | if (block.blockFormat().hasProperty(KoParagraphStyle::OutlineLevel)) { | 75 | if (block.blockFormat().hasProperty(KoParagraphStyle::OutlineLevel)) { | ||
76 | for (QTextBlock b = block.previous();b.isValid(); b = b.previous()) { | 76 | for (QTextBlock b = block.previous();b.isValid(); b = b.previous()) { | ||
77 | list = document.list(b); | 77 | list = document.list(b); | ||
78 | if (list && *list->style() == *style) { | 78 | if (list && *list->style() == *style) { | ||
79 | break; | 79 | break; | ||
80 | } | 80 | } | ||
81 | } | 81 | } | ||
82 | if (!list || *list->style() != *style) { | 82 | if (!list || *list->style() != *style) { | ||
▲ Show 20 Lines • Show All 167 Lines • Show Last 20 Lines |