You've already forked lazarus-ccr
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:
@ -49,6 +49,10 @@ type
|
|||||||
|
|
||||||
const
|
const
|
||||||
DefLineSpacing = 1.2;
|
DefLineSpacing = 1.2;
|
||||||
|
SingleLineSpacing = DefLineSpacing;
|
||||||
|
OneHalfLineSpacing = DefLineSpacing * 1.5;
|
||||||
|
DoubleLineSpacing = DefLineSpacing * 2.0;
|
||||||
|
|
||||||
|
|
||||||
type
|
type
|
||||||
TParaNumStyle = (pnNone, pnBullet, pnNumber, pnLowLetter
|
TParaNumStyle = (pnNone, pnBullet, pnNumber, pnLowLetter
|
||||||
|
@ -363,7 +363,9 @@ begin
|
|||||||
rtfRightIndent: prm.pm.TailIndent := aparam / 20;
|
rtfRightIndent: prm.pm.TailIndent := aparam / 20;
|
||||||
rtfSpaceBefore: prm.pm.SpaceBefore := aparam / 20;
|
rtfSpaceBefore: prm.pm.SpaceBefore := aparam / 20;
|
||||||
rtfSpaceAfter: prm.pm.SpaceAfter := 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
|
rtfLanguage: begin
|
||||||
lang:=rtfParam;
|
lang:=rtfParam;
|
||||||
langproc:=nil;
|
langproc:=nil;
|
||||||
@ -547,7 +549,6 @@ function SaveStream(ARich: TcustomRichMemo; Dst: TStream): Boolean;
|
|||||||
var
|
var
|
||||||
p : TSaveParams;
|
p : TSaveParams;
|
||||||
begin
|
begin
|
||||||
writeln('saving stream!');
|
|
||||||
FillChar(p, sizeof(p), 0);
|
FillChar(p, sizeof(p), 0);
|
||||||
p.start:=-1;
|
p.start:=-1;
|
||||||
p.len:=-1;
|
p.len:=-1;
|
||||||
@ -802,6 +803,7 @@ begin
|
|||||||
if pm.TailIndent<>0 then RtfOut('\ri'+IntToStr(round(pm.TailIndent*20)));
|
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.SpaceAfter<>0 then RtfOut('\sa'+IntToStr(round(pm.SpaceAfter*20)));
|
||||||
if pm.SpaceBefore<>0 then RtfOut('\sb'+IntToStr(round(pm.SpaceBefore*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(' ');
|
RtfOut(' ');
|
||||||
end;
|
end;
|
||||||
s:=GetRTFWriteText(u, i, isnewpara);
|
s:=GetRTFWriteText(u, i, isnewpara);
|
||||||
|
Reference in New Issue
Block a user