You've already forked lazarus-ccr
fpspreadsheet: Fix the xxxxIF formulas (COUNTIF, SUMIF, ...) to be case-insensitive (https://forum.lazarus.freepascal.org/index.php/topic,63474.msg480757.html)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8822 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@@ -1306,7 +1306,7 @@ var
|
|||||||
coGreater : if ANumber > compareNumber then ok := true;
|
coGreater : if ANumber > compareNumber then ok := true;
|
||||||
coLessEqual : if ANumber <= compareNumber then ok := true;
|
coLessEqual : if ANumber <= compareNumber then ok := true;
|
||||||
coGreaterEqual : if ANumber >= compareNumber then ok := true;
|
coGreaterEqual : if ANumber >= compareNumber then ok := true;
|
||||||
coNotEqual : if ANumber >= compareNumber then ok := true;
|
coNotEqual : if ANumber <> compareNumber then ok := true;
|
||||||
end;
|
end;
|
||||||
if ok then
|
if ok then
|
||||||
case AFlag of
|
case AFlag of
|
||||||
@@ -1321,13 +1321,14 @@ var
|
|||||||
ok: Boolean;
|
ok: Boolean;
|
||||||
begin
|
begin
|
||||||
ok := false;
|
ok := false;
|
||||||
|
AStr := UTF8Lowercase(AStr);
|
||||||
case compareOp of
|
case compareOp of
|
||||||
coEqual : if AStr = compareStr then ok := true;
|
coEqual : if AStr = compareStr then ok := true;
|
||||||
coLess : if AStr < compareStr then ok := true;
|
coLess : if AStr < compareStr then ok := true;
|
||||||
coGreater : if AStr > compareStr then ok := true;
|
coGreater : if AStr > compareStr then ok := true;
|
||||||
coLessEqual : if AStr <= compareStr then ok := true;
|
coLessEqual : if AStr <= compareStr then ok := true;
|
||||||
coGreaterEqual : if AStr >= compareStr then ok := true;
|
coGreaterEqual : if AStr >= compareStr then ok := true;
|
||||||
coNotEqual : if AStr >= compareStr then ok := true;
|
coNotEqual : if AStr <> compareStr then ok := true;
|
||||||
end;
|
end;
|
||||||
if ok then
|
if ok then
|
||||||
case AFlag of
|
case AFlag of
|
||||||
@@ -1398,7 +1399,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
cctUTF8String:
|
cctUTF8String:
|
||||||
begin
|
begin
|
||||||
compareStr := cell^.UTF8StringValue;
|
compareStr := UTF8Lowercase(cell^.UTF8StringValue);
|
||||||
compareType := ctString;
|
compareType := ctString;
|
||||||
end;
|
end;
|
||||||
cctEmpty:
|
cctEmpty:
|
||||||
@@ -1433,7 +1434,7 @@ begin
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
compareStr := s;
|
compareStr := UTF8Lowercase(s);
|
||||||
compareType := ctString;
|
compareType := ctString;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Reference in New Issue
Block a user