You've already forked lazarus-ccr
fpspreadsheet: Improved auto-format detection (check extension first, check file header when extension test fails). Fix ods reader crashing when extension has been renamed.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6760 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -1370,7 +1370,7 @@ var
|
||||
fileformats: TsSpreadFormatIDArray;
|
||||
begin
|
||||
fileFormats := GetSpreadFormatsFromFileName(faRead, AFileName, ord(sfExcel8));
|
||||
Result := (Length(fileFormats) > 0) and (fileFormats[0] <= sfidUnknown);
|
||||
Result := (Length(fileFormats) > 0); // and (fileFormats[0] <= sfidUnknown); // wp - removed for new format detection
|
||||
if Result then AFormatID := fileFormats[0];
|
||||
end;
|
||||
|
||||
|
Reference in New Issue
Block a user