fpspreadsheet: Fix biff2 writing incorrect xf record index if > 63.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3076 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2014-05-22 09:38:28 +00:00
parent fb92d5a906
commit 169dbe7b4f
2 changed files with 3 additions and 3 deletions

View File

@ -43,7 +43,7 @@ begin
MyWorksheet.LeftPaneWidth := 1;
MyWorksheet.TopPaneHeight := 3;
}
(*
// Write some number cells
MyWorksheet.WriteNumber(0, 0, 1.0);
MyWorksheet.WriteUsedFormatting(0, 0, [uffBold, uffNumberFormat]);
@ -82,7 +82,7 @@ begin
MyWorksheet.WriteUTF8Text(1, 1, 'Second');
MyWorksheet.WriteUTF8Text(1, 2, 'Third');
MyWorksheet.WriteUTF8Text(1, 3, 'Fourth');
*)
// Write current date/time
MyWorksheet.WriteDateTime(2, 0, now);

View File

@ -876,7 +876,7 @@ begin
// Mask $3F: Index to XF record
// Mask $40: 1 = Cell is locked
// Mask $80: 1 = Formula is hidden
AStream.WriteByte(XFIndex and $3F);
AStream.WriteByte(Min(XFIndex, $3F) and $3F);
// 2nd byte:
// Mask $3F: Index to FORMAT record