Angus Leeming wrote:
> Now, that has to be better than 115 spurious dependencies. I have committed
> the patch. I assume the ParagraphList_fwd.h would be equally useful.

A similar story. 8 header files #include "ParagraphList.h":
CutAndPaste.h, buffer.h, iterators.h, lyxcursor.h, paragraph_funcs.h, undo.h, 
undo_funcs.h, insets/insettext.h
All except buffer.h and paragraph_funcs.h are equally happy with 
ParagraphList_fwd.h. (Paragraph::depth_type is the thing that gets in the way 
here; move it to supprt/types.h?)

Currently 113 files depend on ParagraphList.h and 117 on the offensive 
paragraph.h. Introducing ParagraphList_fwd.h reduces this to 92 files that 
depend on paragraph.h. This (rather dissappointing result) is due to the 78 
files that depend on buffer.h, in turn dragging in paragraph.h.

Nonetheless, as this is all a step in the right direction, I have committed 
the change (patch attached). The patch gets rid also of ParagraphList.h and 
RowList.h entirely. They had become no more than:

#include "ParagraphList_fwd.h"
#include "paragraph.h"

#include "RowList_fwd.h"
#include "lyxrow.h"

Next step: move Paragraph::depth_type into support/types.h. I'll make the 
changes but will post the patch with analysis to the list rather than commit 
it and then tell you all.

-- 
Angus

Attachment: paragraphlist.diff.gz
Description: GNU Zip compressed data

Reply via email to