/** * Looks for the List object on the Stack, * and adds the ListItem to the List. * @throws DocumentException * @since 5.0.6 */ public void ProcessListItem() { if (stack.Count == 0) { return; } IElement obj = stack.Pop(); if (!(obj is ListItem)) { stack.Push(obj); return; } if (stack.Count == 0) { document.Add(obj); return; } ListItem item = (ListItem)obj; IElement list = stack.Pop(); if (!(list is List)) { stack.Push(list); return; } ((List)list).Add(item); item.AdjustListSymbolFont(); stack.Push(list); }