I need to run rv.Format but I get a parent error. The reason I need to run format is I am having trouble with some links not being the same. Either that or I am missing something else.
It is a tricky bug in my code to trace down and I would like to at least rv.Format as the solution. I would rather not use it if I can. I think rv.format maybe joins some bad links together which is fine some text has multiple links of the same link.
Gen. 1:1 has a link for example on Gen then same again on . then again on 1 then again on :1 just for example. (we can blame the original data conversion.) Is there a function in rv.format that merges these links together like a concat function or group function. Maybe that is all I need.
[/b]
Code: Select all
rv := TRichViewEditEx{TRichView}.Create(nil);
//rv := TCustomRichViewEdit.Create(nil);
rvs := TRVStyle.Create(nil);
ms := TMemoryStream.Create;
RefErrorList := TSTringList.Create;
RefErrorBool := _confBool('referror_files');
try
RVSwitchOffUniscribeIfUnderWine(rvs);
rvs.TextStyles[0].Unicode := True;
rv.Style := rvs;
ShowMsgs := True;
//rv.Options := rv.Options + [rvoTagsArePChars];
rv.Options := rv.Options
+ [rvoAllowSelection,rvoShowCheckpoints,rvoShowPageBreaks,rvoShowHiddenText,
rvoTagsArePChars,rvoAutoCopyText,rvoAutoCopyUnicodeText,rvoAutoCopyRVF,
rvoAutoCopyImage,rvoAutoCopyRTF,rvoFormatInvalidate,rvoFastFormatting];
rv.RTFOptions := [rvrtfSaveEMFAsWMF,rvrtfSaveJpegAsJpeg,rvrtfSavePngAsPng,rvrtfSavePicturesBinary];
rv.RTFReadProperties.ParaStyleMode := rvrsAddIfNeeded;
rv.RTFReadProperties.SkipHiddenText := True;
rv.RTFReadProperties.TextStyleMode := rvrsAddIfNeeded;
rv.RVFOptions := [rvfoSavePicturesBody,rvfoSaveControlsBody,rvfoSaveBinary,
rvfoSaveTextStyles,rvfoSaveParaStyles,rvfoSaveLayout,rvfoLoadLayout,
rvfoSaveDocProperties,rvfoLoadDocProperties];
rv.RVFParaStylesReadMode := rvf_sInsertMerge;
rv.RVFTextStylesReadMode := rvf_sInsertMerge;