You've already forked lazarus-ccr
fpspreadsheet: More conservative handling of conditional font formatting by the ODS writer.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7563 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -8064,8 +8064,10 @@ begin
|
|||||||
defFnt := (Workbook as TsWorkbook).GetDefaultFont;
|
defFnt := (Workbook as TsWorkbook).GetDefaultFont;
|
||||||
if AFont = nil then AFont := defFnt;
|
if AFont = nil then AFont := defFnt;
|
||||||
|
|
||||||
|
if AFont.FontName <> '' then
|
||||||
Result := Result + Format('style:font-name="%s" ', [AFont.FontName]);
|
Result := Result + Format('style:font-name="%s" ', [AFont.FontName]);
|
||||||
|
|
||||||
|
if AFont.Size > 0 then
|
||||||
Result := Result + Format('fo:font-size="%.1fpt" style:font-size-asian="%.1fpt" style:font-size-complex="%.1fpt" ',
|
Result := Result + Format('fo:font-size="%.1fpt" style:font-size-asian="%.1fpt" style:font-size-complex="%.1fpt" ',
|
||||||
[AFont.Size, AFont.Size, AFont.Size], FPointSeparatorSettings);
|
[AFont.Size, AFont.Size, AFont.Size], FPointSeparatorSettings);
|
||||||
|
|
||||||
@ -8087,7 +8089,7 @@ begin
|
|||||||
if AFont.Position = fpSuperscript then
|
if AFont.Position = fpSuperscript then
|
||||||
Result := Result + 'style:text-position="super 58%" ';
|
Result := Result + 'style:text-position="super 58%" ';
|
||||||
|
|
||||||
if AFont.Color <> defFnt.Color then
|
if (AFont.Color <> defFnt.Color) and (AFont.Color <> scNotDefined) then
|
||||||
Result := Result + Format('fo:color="%s" ', [ColorToHTMLColorStr(AFont.Color)]);
|
Result := Result + Format('fo:color="%s" ', [ColorToHTMLColorStr(AFont.Color)]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user