Hi Julian,
I'm iterating through the text in a wpRichText component and picking out the various bits of info, including all the font properties on a par by par and char by char basis as follows:
par := WP.BodyText.FirstPar;
while par<>nil do
begin
for i:=0 to par.CharCount-1 do
begin
wp.AttrHelper.CharAttr := par.CharAttr[i];
if wp.AttrHelper.GetFontNr( fontnr ) then ....
end;
par := par.next;
end;
Alles anzeigen
This works fine if you call the conversion routine for text you've just typed into the editor. If you save it to stream without specifying a format and then load it from that stream there is a problem which I describe below. If you save the stream as wptools format there is no problem.
The problem is with the par.charattr[i]. If you query this it return the size of the font as 0. LoadToStream without format doesn't seem to be formatting the text properly or refreshing the richtext properly. I've tried refresh and reformatall but these don't help.
It's not an immediate problem for me, but I thought you might want to know so you can have a look at this.
Cheers,
Mark