fpspreadsheet: Fix font identification issue of OOXML reader for files written by fpspreadsheet.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3467 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
68aed47788
commit
61ae361d37
@ -978,6 +978,7 @@ var
|
||||
fntColor: TsColor;
|
||||
nodename: String;
|
||||
s: String;
|
||||
isNilFont: Boolean;
|
||||
begin
|
||||
fnt := Workbook.GetDefaultFont;
|
||||
if fnt <> nil then begin
|
||||
@ -993,6 +994,7 @@ begin
|
||||
end;
|
||||
|
||||
node := ANode.FirstChild;
|
||||
isNilFont := node = nil;
|
||||
while node <> nil do begin
|
||||
nodename := node.NodeName;
|
||||
if nodename = 'name' then begin
|
||||
@ -1032,7 +1034,8 @@ begin
|
||||
|
||||
{ We must not check for duplicate fonts here because then we cannot reconstruct
|
||||
the correct font id later }
|
||||
FWorkbook.AddFont(fntName, fntSize, fntStyles, fntColor);
|
||||
if not isNilFont then // the font #4 (nil) is added automatically --> skip it here
|
||||
FWorkbook.AddFont(fntName, fntSize, fntStyles, fntColor);
|
||||
end;
|
||||
|
||||
procedure TsSpreadOOXMLReader.ReadFonts(ANode: TDOMNode);
|
||||
|
Loading…
Reference in New Issue
Block a user