InsertRVFFromStream extra line at end
Posted: Wed Sep 13, 2023 2:24 pm
Hi Sergey,
When I use rve.InsertRVFFromStream, I always seem to get an extra line at the end of the doc. Here's the code:
I had to add the following to compensate for this:
Is there another way to call InsertRVFFromStream or some other or better way to handle that extra line or item or whatever it is that always seems to be added?
Thanks Sergey
Stan
When I use rve.InsertRVFFromStream, I always seem to get an extra line at the end of the doc. Here's the code:
Code: Select all
ActiveRVE.SaveRVFToStream(Stream,false);
Stream.Position := 0;
ActiveRVE.Clear;
RVStyle1.ResetParaStyles;
RVStyle1.ListStyles.Clear;
ActiveRVE.DeleteUnusedStyles(true,true,true);
//ActiveRVE.Format; //call this *after* deleting unused styles
ActiveRVE.InsertRVFFromStream(Stream,0);
ActiveRVE.DeleteUnusedStyles(true,true,true);
//ActiveRVE.Format; //call this *after* deleting unused styles
Code: Select all
if ActiveRVE.ItemCount-1 > 0 then
ActiveRVE.DeleteItems(ActiveRVE.ItemCount-1,1);
ActiveRVE.Format;
Thanks Sergey
Stan