richmemo: added constant for linespacing. corrected loading/saving of linespacing information
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3812 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
2e8c900170
commit
3764b37587
@ -48,7 +48,11 @@ type
|
||||
end;
|
||||
|
||||
const
|
||||
DefLineSpacing = 1.2;
|
||||
DefLineSpacing = 1.2;
|
||||
SingleLineSpacing = DefLineSpacing;
|
||||
OneHalfLineSpacing = DefLineSpacing * 1.5;
|
||||
DoubleLineSpacing = DefLineSpacing * 2.0;
|
||||
|
||||
|
||||
type
|
||||
TParaNumStyle = (pnNone, pnBullet, pnNumber, pnLowLetter
|
||||
|
@ -363,7 +363,9 @@ begin
|
||||
rtfRightIndent: prm.pm.TailIndent := aparam / 20;
|
||||
rtfSpaceBefore: prm.pm.SpaceBefore := aparam / 20;
|
||||
rtfSpaceAfter: prm.pm.SpaceAfter := aparam / 20;
|
||||
rtfSpaceBetween: prm.pm.LineSpacing := aparam / 240;
|
||||
rtfSpaceBetween: prm.pm.LineSpacing := aparam / 200;
|
||||
// \slN - surprise! the "line spacing" is actually a multiplier based on the FONT size, not linesize
|
||||
// where linesize = fontsize * 1.2
|
||||
rtfLanguage: begin
|
||||
lang:=rtfParam;
|
||||
langproc:=nil;
|
||||
@ -547,7 +549,6 @@ function SaveStream(ARich: TcustomRichMemo; Dst: TStream): Boolean;
|
||||
var
|
||||
p : TSaveParams;
|
||||
begin
|
||||
writeln('saving stream!');
|
||||
FillChar(p, sizeof(p), 0);
|
||||
p.start:=-1;
|
||||
p.len:=-1;
|
||||
@ -802,6 +803,7 @@ begin
|
||||
if pm.TailIndent<>0 then RtfOut('\ri'+IntToStr(round(pm.TailIndent*20)));
|
||||
if pm.SpaceAfter<>0 then RtfOut('\sa'+IntToStr(round(pm.SpaceAfter*20)));
|
||||
if pm.SpaceBefore<>0 then RtfOut('\sb'+IntToStr(round(pm.SpaceBefore*20)));
|
||||
if pm.LineSpacing<>0 then RtfOut('\sl'+IntToStr(round(pm.LineSpacing*200))+'\slmult1');
|
||||
RtfOut(' ');
|
||||
end;
|
||||
s:=GetRTFWriteText(u, i, isnewpara);
|
||||
|
Loading…
Reference in New Issue
Block a user