When the RTF contains \caps, eg.
\wpparflg32\plain\f1\fs24\b\caps1 section 1\f1\b0 : \f1\caps0 \par
It paints the paragraph in CAPS. However when I save as 'ANSI' it saves it in its original case 'section 1'.
I wanted to know if there was a way to load RTF and save RTF with the caps transform applied. Or apply the caps when saving to ANSI.
I am currently working around it like this:
procedure TRTFDoc.ReplaceCaseAttributes;
begin
ReadOnly := False;
BeginUpdate;
try
CPPosition := 0;
repeat
if CPAttr.HasStyle(afsUppercaseStyle) then
begin
CPAttr.ExcludeStyle(afsUppercaseStyle);
CPChar := upcase(CPChar);
end;
until not CPMoveNext;
finally
EndUpdate;
Refresh;
end;
end;
#3♥ 0
This category is archived. No new posts are possible.