fpspreadsheet: Fix Excel XML writing of percent numberformat.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7571 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
d8ab6b738e
commit
f3543bdda8
@ -3068,6 +3068,7 @@ var
|
|||||||
deffnt, fnt: TsFont;
|
deffnt, fnt: TsFont;
|
||||||
s, fmtVert, fmtHor, fmtWrap, fmtRot: String;
|
s, fmtVert, fmtHor, fmtWrap, fmtRot: String;
|
||||||
nfp: TsNumFormatParams;
|
nfp: TsNumFormatParams;
|
||||||
|
nfs: String;
|
||||||
fill: TsFillPattern;
|
fill: TsFillPattern;
|
||||||
cb: TsCellBorder;
|
cb: TsCellBorder;
|
||||||
cbs: TsCellBorderStyle;
|
cbs: TsCellBorderStyle;
|
||||||
@ -3168,8 +3169,9 @@ begin
|
|||||||
begin
|
begin
|
||||||
nfp := book.GetNumberFormat(fmt^.NumberFormatIndex);
|
nfp := book.GetNumberFormat(fmt^.NumberFormatIndex);
|
||||||
nfp.AllowLocalizedAMPM := false; // Replace "AMPM" by "AM/PM"
|
nfp.AllowLocalizedAMPM := false; // Replace "AMPM" by "AM/PM"
|
||||||
|
nfs := nfp.NumFormatStr;
|
||||||
AppendToStream(AStream, Format(INDENT3 +
|
AppendToStream(AStream, Format(INDENT3 +
|
||||||
'<NumberFormat ss:Format="%s"/>' + LF, [UTF8TextToXMLText(nfp.NumFormatStr)]));
|
'<NumberFormat ss:Format="%s"/>' + LF, [nfs])); // Do not UTF8TextToXMLText(nfs) because of '%'
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// Background
|
// Background
|
||||||
|
Loading…
Reference in New Issue
Block a user