You've already forked lazarus-ccr
RxFPC:fix export to pdf cell background color (tnx. Graeme Geldenhuys)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5091 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -3,13 +3,13 @@
|
|||||||
<ProjectSession>
|
<ProjectSession>
|
||||||
<Version Value="9"/>
|
<Version Value="9"/>
|
||||||
<BuildModes Active="Default"/>
|
<BuildModes Active="Default"/>
|
||||||
<Units Count="61">
|
<Units Count="63">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="project1.lpr"/>
|
<Filename Value="project1.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="-1"/>
|
||||||
<CursorPos X="81" Y="12"/>
|
<CursorPos X="81" Y="12"/>
|
||||||
<UsageCount Value="59"/>
|
<UsageCount Value="61"/>
|
||||||
</Unit0>
|
</Unit0>
|
||||||
<Unit1>
|
<Unit1>
|
||||||
<Filename Value="unit1.pas"/>
|
<Filename Value="unit1.pas"/>
|
||||||
@ -18,10 +18,9 @@
|
|||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<UnitName Value="Unit1"/>
|
<UnitName Value="Unit1"/>
|
||||||
<IsVisibleTab Value="True"/>
|
|
||||||
<TopLine Value="59"/>
|
<TopLine Value="59"/>
|
||||||
<CursorPos X="34" Y="61"/>
|
<CursorPos X="106" Y="59"/>
|
||||||
<UsageCount Value="59"/>
|
<UsageCount Value="61"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
@ -87,12 +86,13 @@
|
|||||||
<Unit10>
|
<Unit10>
|
||||||
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<UnitName Value="RxDBGridExportPdf"/>
|
<UnitName Value="RxDBGridExportPdf"/>
|
||||||
|
<IsVisibleTab Value="True"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="548"/>
|
<TopLine Value="277"/>
|
||||||
<CursorPos X="19" Y="515"/>
|
<CursorPos X="9" Y="303"/>
|
||||||
<UsageCount Value="27"/>
|
<UsageCount Value="28"/>
|
||||||
<Bookmarks Count="1">
|
<Bookmarks Count="1">
|
||||||
<Item0 X="3" Y="361" ID="1"/>
|
<Item0 X="3" Y="382" ID="1"/>
|
||||||
</Bookmarks>
|
</Bookmarks>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit10>
|
</Unit10>
|
||||||
@ -455,10 +455,10 @@
|
|||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<UnitName Value="RxDBGridExportPdfSetupUnit"/>
|
<UnitName Value="RxDBGridExportPdfSetupUnit"/>
|
||||||
<EditorIndex Value="2"/>
|
<EditorIndex Value="4"/>
|
||||||
<TopLine Value="56"/>
|
<TopLine Value="56"/>
|
||||||
<CursorPos X="5" Y="83"/>
|
<CursorPos X="5" Y="83"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="21"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
</Unit58>
|
</Unit58>
|
||||||
@ -481,8 +481,25 @@
|
|||||||
<CursorPos X="14" Y="19"/>
|
<CursorPos X="14" Y="19"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
</Unit60>
|
</Unit60>
|
||||||
|
<Unit61>
|
||||||
|
<Filename Value="/home/OPTORG/alexs/1/1/testfppdf.lpr"/>
|
||||||
|
<EditorIndex Value="3"/>
|
||||||
|
<TopLine Value="297"/>
|
||||||
|
<CursorPos Y="302"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit61>
|
||||||
|
<Unit62>
|
||||||
|
<Filename Value="/home/install/source/fpcsrc/packages/fcl-pdf/src/fppdf.pp"/>
|
||||||
|
<UnitName Value="fpPDF"/>
|
||||||
|
<EditorIndex Value="2"/>
|
||||||
|
<TopLine Value="22"/>
|
||||||
|
<CursorPos X="3" Y="43"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit62>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="27" HistoryIndex="26">
|
<JumpHistory Count="30" HistoryIndex="29">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="277" Column="53" TopLine="252"/>
|
<Caret Line="277" Column="53" TopLine="252"/>
|
||||||
@ -564,32 +581,44 @@
|
|||||||
</Position20>
|
</Position20>
|
||||||
<Position21>
|
<Position21>
|
||||||
<Filename Value="unit1.pas"/>
|
<Filename Value="unit1.pas"/>
|
||||||
<Caret Line="10" Column="22" TopLine="166"/>
|
<Caret Line="188" TopLine="164"/>
|
||||||
</Position21>
|
</Position21>
|
||||||
<Position22>
|
<Position22>
|
||||||
<Filename Value="unit1.pas"/>
|
<Filename Value="unit1.pas"/>
|
||||||
<Caret Line="150" TopLine="161"/>
|
<Caret Line="155" TopLine="139"/>
|
||||||
</Position22>
|
</Position22>
|
||||||
<Position23>
|
<Position23>
|
||||||
<Filename Value="unit1.pas"/>
|
<Filename Value="unit1.pas"/>
|
||||||
<Caret Line="188" TopLine="164"/>
|
<Caret Line="156" TopLine="139"/>
|
||||||
</Position23>
|
</Position23>
|
||||||
<Position24>
|
<Position24>
|
||||||
<Filename Value="unit1.pas"/>
|
<Filename Value="unit1.pas"/>
|
||||||
<Caret Line="155" TopLine="139"/>
|
<Caret Line="157" TopLine="139"/>
|
||||||
</Position24>
|
</Position24>
|
||||||
<Position25>
|
<Position25>
|
||||||
<Filename Value="unit1.pas"/>
|
<Filename Value="unit1.pas"/>
|
||||||
<Caret Line="156" TopLine="139"/>
|
<Caret Line="164" Column="42" TopLine="153"/>
|
||||||
</Position25>
|
</Position25>
|
||||||
<Position26>
|
<Position26>
|
||||||
<Filename Value="unit1.pas"/>
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
<Caret Line="157" TopLine="139"/>
|
<Caret Line="276" Column="5" TopLine="260"/>
|
||||||
</Position26>
|
</Position26>
|
||||||
<Position27>
|
<Position27>
|
||||||
<Filename Value="unit1.pas"/>
|
<Filename Value="/home/OPTORG/alexs/1/1/testfppdf.lpr"/>
|
||||||
<Caret Line="164" Column="42" TopLine="153"/>
|
<Caret Line="331" TopLine="307"/>
|
||||||
</Position27>
|
</Position27>
|
||||||
|
<Position28>
|
||||||
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
|
<Caret Line="288" TopLine="277"/>
|
||||||
|
</Position28>
|
||||||
|
<Position29>
|
||||||
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
|
<Caret Line="143" Column="13" TopLine="134"/>
|
||||||
|
</Position29>
|
||||||
|
<Position30>
|
||||||
|
<Filename Value="../../rxdbgridexportpdf.pas"/>
|
||||||
|
<Caret Line="53" Column="3" TopLine="38"/>
|
||||||
|
</Position30>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
</ProjectSession>
|
</ProjectSession>
|
||||||
<Debugging>
|
<Debugging>
|
||||||
|
@ -139,6 +139,9 @@ function ColorToDdfColor(C:TColor):TARGBColor;
|
|||||||
var
|
var
|
||||||
A:array [1..4] of byte absolute C;
|
A:array [1..4] of byte absolute C;
|
||||||
begin
|
begin
|
||||||
|
if C = clWindow then
|
||||||
|
Result:=clWhite
|
||||||
|
else
|
||||||
Result:={A[1] shl 24 +} A[1] shl 16 + A[2] shl 8 + A[3];
|
Result:={A[1] shl 24 +} A[1] shl 16 + A[2] shl 8 + A[3];
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -262,6 +265,7 @@ begin
|
|||||||
CP:=-1;
|
CP:=-1;
|
||||||
FCurPage:=nil;
|
FCurPage:=nil;
|
||||||
|
|
||||||
|
|
||||||
for i:=0 to FRxDBGrid.Columns.Count - 1 do
|
for i:=0 to FRxDBGrid.Columns.Count - 1 do
|
||||||
begin
|
begin
|
||||||
C:=FRxDBGrid.Columns[i];
|
C:=FRxDBGrid.Columns[i];
|
||||||
@ -273,8 +277,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
FCurPage.SetColor(ColorToDdfColor(FRxDBGrid.BorderColor), true); //Border
|
FCurPage.SetColor(ColorToDdfColor(FRxDBGrid.BorderColor), true); //Border
|
||||||
//FCurPage.SetColor(ColorToDdfColor(C.Color), false); // Fill color
|
FCurPage.SetColor(ColorToDdfColor(C.Color), false); // Fill color
|
||||||
FCurPage.DrawRect(X, FPosY, C.Width, FRxDBGrid.DefaultRowHeight, 1, false, true);
|
FCurPage.DrawRect(X, FPosY, C.Width, FRxDBGrid.DefaultRowHeight, 1, true, true);
|
||||||
|
|
||||||
if Assigned(C.Field) then
|
if Assigned(C.Field) then
|
||||||
begin
|
begin
|
||||||
@ -284,7 +288,6 @@ begin
|
|||||||
WriteTextRect(FExportFontBody, X, FPosY, C.Width, FRxDBGrid.DefaultRowHeight, C.Field.DisplayText, C.Alignment);
|
WriteTextRect(FExportFontBody, X, FPosY, C.Width, FRxDBGrid.DefaultRowHeight, C.Field.DisplayText, C.Alignment);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
X:=X + C.Width;
|
X:=X + C.Width;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Reference in New Issue
Block a user