diff --git a/components/fpspreadsheet/fpsopendocument.pas b/components/fpspreadsheet/fpsopendocument.pas index db1c847ca..bd440621d 100755 --- a/components/fpspreadsheet/fpsopendocument.pas +++ b/components/fpspreadsheet/fpsopendocument.pas @@ -619,6 +619,12 @@ begin } end; +{ + Writes a cell with text content + + The UTF8 Text needs to be converted, because some chars are invalid in XML + See bug with patch 19422 +} procedure TsSpreadOpenDocWriter.WriteLabel(AStream: TStream; const ARow, ACol: Word; const AValue: string; ACell: PCell); var diff --git a/components/fpspreadsheet/xlsbiff5.pas b/components/fpspreadsheet/xlsbiff5.pas index 738e944c3..04aea0b75 100755 --- a/components/fpspreadsheet/xlsbiff5.pas +++ b/components/fpspreadsheet/xlsbiff5.pas @@ -552,14 +552,16 @@ begin AStream.WriteWord(WordToLE(lCodepage)); end; -{******************************************************************* -* TsSpreadBIFF5Writer.WriteIndex () -* -* DESCRIPTION: Writes an Excel 5 DIMENSIONS record -* -* nm = (rl - rf - 1) / 32 + 1 (using integer division) -* -*******************************************************************} +{ + Writes an Excel 5 DIMENSIONS record + + nm = (rl - rf - 1) / 32 + 1 (using integer division) + + Excel, OpenOffice and FPSpreadsheet ignore the dimensions written in this record, + but some other applications really use them, so they need to be correct. + + See bug 18886: excel5 files are truncated when imported +} procedure TsSpreadBIFF5Writer.WriteDimensions(AStream: TStream; AWorksheet: TsWorksheet); var lLastCol, lLastRow: Word; diff --git a/components/fpspreadsheet/xlsbiff8.pas b/components/fpspreadsheet/xlsbiff8.pas index cb707b8eb..7631b0172 100755 --- a/components/fpspreadsheet/xlsbiff8.pas +++ b/components/fpspreadsheet/xlsbiff8.pas @@ -610,14 +610,16 @@ begin AStream.WriteBuffer(WideStringToLE(WideSheetName)[1], Len * Sizeof(WideChar)); end; -{******************************************************************* -* TsSpreadBIFF8Writer.WriteIndex () -* -* DESCRIPTION: Writes an Excel 8 DIMENSIONS record -* -* nm = (rl - rf - 1) / 32 + 1 (using integer division) -* -*******************************************************************} +{ + Writes an Excel 8 DIMENSIONS record + + nm = (rl - rf - 1) / 32 + 1 (using integer division) + + Excel, OpenOffice and FPSpreadsheet ignore the dimensions written in this record, + but some other applications really use them, so they need to be correct. + + See bug 18886: excel5 files are truncated when imported +} procedure TsSpreadBIFF8Writer.WriteDimensions(AStream: TStream; AWorksheet: TsWorksheet); var lLastCol: Word;