You've already forked lazarus-ccr
fpspreadsheet: Fix missing of some cell border lines in TsWorksheetGrid
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3439 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -2047,21 +2047,28 @@ begin
|
|||||||
else
|
else
|
||||||
neighborcell := FWorksheet.FindCell(r+ADeltaRow, c+ADeltaCol);
|
neighborcell := FWorksheet.FindCell(r+ADeltaRow, c+ADeltaCol);
|
||||||
// Only cell has border, but neighbor has not
|
// Only cell has border, but neighbor has not
|
||||||
if ((cell <> nil) and (border in cell^.Border)) and
|
if HasBorder(cell, border) and not HasBorder(neighborCell, neighborBorder) then
|
||||||
|
{ if ((cell <> nil) and (border in cell^.Border)) and
|
||||||
((neighborcell = nil) or (neighborborder in neighborcell^.Border))
|
((neighborcell = nil) or (neighborborder in neighborcell^.Border))
|
||||||
then
|
then }
|
||||||
ABorderStyle := cell^.BorderStyles[border]
|
ABorderStyle := cell^.BorderStyles[border]
|
||||||
else
|
else
|
||||||
// Only neighbor has border, cell has not
|
// Only neighbor has border, cell has not
|
||||||
if ((cell = nil) or not (border in cell^.Border)) and
|
if not HasBorder(cell, border) and HasBorder(neighborCell, neighborBorder) then
|
||||||
|
{
|
||||||
|
if ((cell = nil) or not (border in cell^.Border)) and
|
||||||
(neighborcell <> nil) and (neighborborder in neighborcell^.Border)
|
(neighborcell <> nil) and (neighborborder in neighborcell^.Border)
|
||||||
then
|
then
|
||||||
|
}
|
||||||
ABorderStyle := neighborcell^.BorderStyles[neighborborder]
|
ABorderStyle := neighborcell^.BorderStyles[neighborborder]
|
||||||
else
|
else
|
||||||
// Both cells have shared border -> use top or left border
|
// Both cells have shared border -> use top or left border
|
||||||
|
if HasBorder(cell, border) and HasBorder(neighborCell, neighborBorder) then begin
|
||||||
|
{
|
||||||
if (cell <> nil) and (border in cell^.Border) and
|
if (cell <> nil) and (border in cell^.Border) and
|
||||||
(neighborcell <> nil) and (neighborborder in neighborcell^.Border)
|
(neighborcell <> nil) and (neighborborder in neighborcell^.Border)
|
||||||
then begin
|
then begin
|
||||||
|
}
|
||||||
if (border in [cbNorth, cbWest]) then
|
if (border in [cbNorth, cbWest]) then
|
||||||
ABorderStyle := neighborcell^.BorderStyles[neighborborder]
|
ABorderStyle := neighborcell^.BorderStyles[neighborborder]
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user