fpspreadsheet: Fix failed unit tests, all passed now again.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4370 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2015-10-04 20:11:10 +00:00
parent f66540336e
commit cb68f38703
2 changed files with 11 additions and 11 deletions

View File

@ -1624,8 +1624,12 @@ begin
'"': Result := Result + '"'; '"': Result := Result + '"';
'''':Result := Result + '''; '''':Result := Result + ''';
'%': Result := Result + '%'; '%': Result := Result + '%';
#10: if ProcessLineEndings then Result := Result + '
'; #10: if ProcessLineEndings then
#13: if ProcessLineEndings then Result := Result + '
'; Result := Result + '
' else
Result := Result + #10;
#13: if ProcessLineEndings then
Result := Result + '
' else
Result := Result + #13;
{ this breaks multi-line labels in xlsx { this breaks multi-line labels in xlsx
#10: begin #10: begin
Result := Result + '<br />'; Result := Result + '<br />';
@ -1636,10 +1640,6 @@ begin
if (idx < Length(AText)) and (AText[idx+1] = #10) then inc(idx); if (idx < Length(AText)) and (AText[idx+1] = #10) then inc(idx);
end; end;
} }
{
#10: WrkStr := WrkStr + '&#10;';
#13: WrkStr := WrkStr + '&#13;';
}
else else
Result := Result + AText[Idx]; Result := Result + AText[Idx];
end; end;

View File

@ -50,11 +50,11 @@ end;
procedure TSpreadErrorTests.TestWriteErrorMessages(AFormat: TsSpreadsheetFormat); procedure TSpreadErrorTests.TestWriteErrorMessages(AFormat: TsSpreadsheetFormat);
type type
TTestFormat = (sfExcel2, sfExcel5, sfExcel8, sfOOXML, sfOpenDocument); TTestFormat = (sfExcel2, sfExcel5, sfExcel8, sfExcelXML, sfOOXML, sfOpenDocument);
const const // XLS2 XLS5 XLS8 XLSXML OOXML ODS
MAX_ROW_COUNT: array[TTestFormat] of Cardinal = (65536, 65536, 65536, 1048576, 1048576); MAX_ROW_COUNT: array[TTestFormat] of Cardinal = (65536, 65536, 65536, 65536, 1048576, 1048576);
MAX_COL_COUNT: array[TTestFormat] of Cardinal = (256, 256, 256, 16384, 1024); MAX_COL_COUNT: array[TTestFormat] of Cardinal = ( 256, 256, 256, 256, 16384, 1024);
MAX_CELL_LEN: array[TTestFormat] of Cardinal = (255, 255, 32767, cardinal(-1), Cardinal(-1)); MAX_CELL_LEN : array[TTestFormat] of Cardinal = ( 255, 255, 32767, 32767,$FFFFFFFF,$FFFFFFFF);
var var
MyWorkbook: TsWorkbook; MyWorkbook: TsWorkbook;
MyWorksheet: TsWorksheet; MyWorksheet: TsWorksheet;