From 4dc019a41fb1f02461412c6cf0e7e38b501fcc2a Mon Sep 17 00:00:00 2001 From: Erich Hoover Date: Sun, 7 Feb 2010 10:08:18 -0700 Subject: [PATCH] hhctrl.ocx: Support HTML Help having indented Index tab items. --- dlls/hhctrl.ocx/hhctrl.h | 1 + dlls/hhctrl.ocx/index.c | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/dlls/hhctrl.ocx/hhctrl.h b/dlls/hhctrl.ocx/hhctrl.h index d0c15457929..adff42df231 100644 --- a/dlls/hhctrl.ocx/hhctrl.h +++ b/dlls/hhctrl.ocx/hhctrl.h @@ -79,6 +79,7 @@ typedef struct IndexItem { int nItems; int itemFlags; + int indentLevel; IndexSubItem *items; } IndexItem; diff --git a/dlls/hhctrl.ocx/index.c b/dlls/hhctrl.ocx/index.c index 52a414e4ea1..e9385c35429 100644 --- a/dlls/hhctrl.ocx/index.c +++ b/dlls/hhctrl.ocx/index.c @@ -44,7 +44,8 @@ static void fill_index_tree(HWND hwnd, IndexItem *item) } memset(&lvi, 0, sizeof(lvi)); lvi.iItem = index++; - lvi.mask = LVIF_TEXT|LVIF_PARAM; + lvi.mask = LVIF_TEXT|LVIF_PARAM|LVIF_INDENT; + lvi.iIndent = item->indentLevel; lvi.cchTextMax = strlenW(item->keyword)+1; lvi.pszText = item->keyword; lvi.lParam = (LPARAM)item; @@ -205,11 +206,17 @@ static IndexItem *parse_li(HHInfo *info, stream_t *stream) * At this high-level stage we locate out each HTML list item tag. * Since there is no end-tag for the
  • item, we must hope that * the
  • entry is parsed correctly or tags might get lost. + * + * Within each entry it is also possible to encounter an additional + *