fpspreadsheet: Fix diagonal border lines in merged cells.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4471 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2016-01-25 22:39:37 +00:00
parent 9e0db3722b
commit 16e6614574

View File

@ -1896,6 +1896,7 @@ const
var var
bs: TsCellBorderStyle; bs: TsCellBorderStyle;
fmt: PsCellFormat; fmt: PsCellFormat;
r1, c1, r2, c2: Cardinal;
begin begin
if Assigned(Worksheet) then begin if Assigned(Worksheet) then begin
// Left border // Left border
@ -1913,6 +1914,11 @@ begin
if ACell <> nil then begin if ACell <> nil then begin
fmt := Workbook.GetPointerToCellFormat(ACell^.FormatIndex); fmt := Workbook.GetPointerToCellFormat(ACell^.FormatIndex);
if Worksheet.IsMergeBase(ACell) then
begin
Worksheet.FindMergedRange(ACell, r1, c1, r2, c2);
ARect := CellRect(GetGridCol(c1), GetGridRow(r1), GetGridCol(c2), GetGridRow(r2));
end;
// Diagonal up // Diagonal up
if cbDiagUp in fmt^.Border then begin if cbDiagUp in fmt^.Border then begin
bs := fmt^.Borderstyles[cbDiagUp]; bs := fmt^.Borderstyles[cbDiagUp];