You've already forked lazarus-ccr
fpspreadsheet: Fix string-to-integer conversion bug introduced by last commit
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3460 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -16,7 +16,7 @@ uses
|
||||
|
||||
var
|
||||
// Norm to test against - list of strings that show the layout of empty and occupied cells
|
||||
SollLayoutStrings: array[0..6] of string;
|
||||
SollLayoutStrings: array[0..7] of string;
|
||||
|
||||
procedure InitSollLayouts;
|
||||
|
||||
@ -150,9 +150,15 @@ begin
|
||||
' |';
|
||||
|
||||
SollLayoutStrings[6] := ' |'+
|
||||
' |'+
|
||||
' xx |'+
|
||||
' xx |';
|
||||
|
||||
SollLayoutStrings[7] := ' |'+
|
||||
' |'+
|
||||
' x x |'+
|
||||
' x x |';
|
||||
|
||||
end;
|
||||
|
||||
|
||||
|
@ -725,22 +725,22 @@ begin
|
||||
// to check against "<>0" instead of "=1"
|
||||
s1 := GetAttrValue(node, 'numFmtId');
|
||||
s2 := GetAttrValue(node, 'applyNumberFormat');
|
||||
if s2 <> '0' then xf.NumFmtIndex := StrToInt(s1);
|
||||
if (s2 <> '') and (s2 <> '0') then xf.NumFmtIndex := StrToInt(s1);
|
||||
|
||||
s1 := GetAttrValue(node, 'fontId');
|
||||
s2 := GetAttrValue(node, 'applyFont');
|
||||
if s2 <> '0' then xf.FontIndex := StrToInt(s1);
|
||||
if (s2 <> '') and (s2 <> '0') then xf.FontIndex := StrToInt(s1);
|
||||
|
||||
s1 := GetAttrValue(node, 'fillId');
|
||||
s2 := GetAttrValue(node, 'applyFill');
|
||||
if s2 <> '0' then xf.FillIndex := StrToInt(s1);
|
||||
if (s2 <> '') and (s2 <> '0') then xf.FillIndex := StrToInt(s1);
|
||||
|
||||
s1 := GetAttrValue(node, 'borderId');
|
||||
s2 := GetAttrValue(node, 'applyBorder');
|
||||
if s2 <> '0' then xf.BorderIndex := StrToInt(s1);
|
||||
if (s2 <> '') and (s2 <> '0') then xf.BorderIndex := StrToInt(s1);
|
||||
|
||||
s2 := GetAttrValue(node, 'applyAlignment');
|
||||
if s2 <> '0' then begin
|
||||
if (s2 <> '0') then begin
|
||||
childNode := node.FirstChild;
|
||||
while Assigned(childNode) do begin
|
||||
nodeName := childNode.NodeName;
|
||||
@ -766,7 +766,7 @@ begin
|
||||
xf.VertAlignment := vaBottom;
|
||||
|
||||
s1 := GetAttrValue(childNode, 'wrapText');
|
||||
if s1 <> '0' then
|
||||
if (s2 <> '0') then
|
||||
xf.WordWrap := true;
|
||||
|
||||
s1 := GetAttrValue(childNode, 'textRotation');
|
||||
|
Reference in New Issue
Block a user