You've already forked lazarus-ccr
fpspreadsheet: Fix rounding error in saving column widths by TsWorksheetGrid.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3629 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -2638,12 +2638,12 @@ begin
|
|||||||
if FWorksheet = nil then
|
if FWorksheet = nil then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
Convert_sFont_to_Font(FWorkbook.GetFont(0), Canvas.Font);
|
Convert_sFont_to_Font(FWorkbook.GetDefaultFont, Canvas.Font);
|
||||||
if IsColumn then begin
|
if IsColumn then begin
|
||||||
// The grid's column width is in "pixels", the worksheet's column width is
|
// The grid's column width is in "pixels", the worksheet's column width is
|
||||||
// in "characters".
|
// in "characters".
|
||||||
w0 := Canvas.TextWidth('0');
|
w0 := Canvas.TextWidth('0');
|
||||||
FWorksheet.WriteColWidth(GetWorksheetCol(AIndex), ColWidths[AIndex] div w0);
|
FWorksheet.WriteColWidth(GetWorksheetCol(AIndex), ColWidths[AIndex] / w0);
|
||||||
end else begin
|
end else begin
|
||||||
// The grid's row heights are in "pixels", the worksheet's row heights are
|
// The grid's row heights are in "pixels", the worksheet's row heights are
|
||||||
// in "lines"
|
// in "lines"
|
||||||
|
Reference in New Issue
Block a user