From e8694bcc58f061856d4be2151199edd0a8611676 Mon Sep 17 00:00:00 2001 From: wp_xxyyzz Date: Fri, 3 Oct 2014 19:34:08 +0000 Subject: [PATCH] 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 --- components/fpspreadsheet/fpspreadsheetgrid.pas | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/fpspreadsheet/fpspreadsheetgrid.pas b/components/fpspreadsheet/fpspreadsheetgrid.pas index b99109269..f43799ae6 100644 --- a/components/fpspreadsheet/fpspreadsheetgrid.pas +++ b/components/fpspreadsheet/fpspreadsheetgrid.pas @@ -2638,12 +2638,12 @@ begin if FWorksheet = nil then exit; - Convert_sFont_to_Font(FWorkbook.GetFont(0), Canvas.Font); + Convert_sFont_to_Font(FWorkbook.GetDefaultFont, Canvas.Font); if IsColumn then begin // The grid's column width is in "pixels", the worksheet's column width is // in "characters". w0 := Canvas.TextWidth('0'); - FWorksheet.WriteColWidth(GetWorksheetCol(AIndex), ColWidths[AIndex] div w0); + FWorksheet.WriteColWidth(GetWorksheetCol(AIndex), ColWidths[AIndex] / w0); end else begin // The grid's row heights are in "pixels", the worksheet's row heights are // in "lines"