Hi,
I tried to use TWPCustomRtfEdit.CreateTableOfContents but I didn't got anything in the TOC.
When i debugged thru the code I saw this on the line 10950 in WpCtrMemo.pas, local method Process
if (wptocUseParIsOutline in Mode) and ((par.AGetInherited(WPAT_ParIsOutline, outl)) and (outl > 0))
My thought is that it should be
if (wptocUseParIsOutline in Mode) and
((par.AGetInherited(WPAT_OUTLINELEVEL, outl)) and (outl > 0))
I used the built in Paragraph dialog to set the outline-levels on my paragraphs, didn't use styles.
Please let me know if my thought is correct or if I should mark the OutlineLevel in some other way.
You can change the code of course, or you can inherit Your own version from this.
But it was not intended to use the Outline level flag.
I decided that it should use the special property.
Of course a flag with operation mode can be added.
if ((wptocUseParIsOutline in Mode) and
((par.AGetInherited(WPAT_ParIsOutline, outl)) and (outl > 0)))
or
((wptocUseOUTLINELEVEL in Mode) and
((par.AGetInherited(WPAT_OUTLINELEVEL, outl)) and (outl > 0)))
then
begin