void RenderLevelStyles (StyleBlock block, int num, IList levelStyles, string name, string unitName = null, double indent = 0)
{
int stylesCount = levelStyles != null ? levelStyles.Count : 0;
bool haveStyles = stylesCount > 0;
if (!haveStyles || block == null)
return;
NamedCssStyleCollection css;
Style style;
bool haveIndent = !String.IsNullOrEmpty (unitName) && indent != 0;
for (int i = 0; i < stylesCount; i++) {
if ((i == 0 && !haveStyles))
continue;
css = block.RegisterStyle (name + (i + 1));
if (haveStyles && stylesCount > i) {
style = levelStyles [i] as Style;
if (style != null) {
style.AlwaysRenderTextDecoration = true;
css.CopyFrom (style.GetStyleAttributes (null));
}
}
if (haveIndent && i > 0 && i < num) {
css.Add (HtmlTextWriterStyle.PaddingLeft, indent.ToString (CultureInfo.InvariantCulture) + unitName);
indent += indent;
}
}
}
}