fpspreadsheet: Fix crash when only unit xlsxooxml is in uses clause for reading an xlsx file.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7009 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2019-06-15 14:18:09 +00:00
parent 07318de5e6
commit d0b98b3435

View File

@ -1168,9 +1168,11 @@ begin
for i := High(APriorityFormats) downto Low(APriorityFormats) do
begin
idx := IndexOf(APriorityFormats[i]);
data := TsSpreadFormatData(FList[idx]);
FList.Delete(idx);
FList.Insert(0, data);
if idx > -1 then begin
data := TsSpreadFormatData(FList[idx]);
FList.Delete(idx);
FList.Insert(0, data);
end;
end;
SetLength(Result, FList.Count);