diff --git a/components/fpspreadsheet/tests/spreadtestgui.lpi b/components/fpspreadsheet/tests/spreadtestgui.lpi
index 8b11c02d0..4dfdcacc7 100644
--- a/components/fpspreadsheet/tests/spreadtestgui.lpi
+++ b/components/fpspreadsheet/tests/spreadtestgui.lpi
@@ -109,6 +109,7 @@
+
diff --git a/components/fpspreadsheet/uvirtuallayer_ole.pas b/components/fpspreadsheet/uvirtuallayer_ole.pas
index 07351a162..bbaf6162f 100644
--- a/components/fpspreadsheet/uvirtuallayer_ole.pas
+++ b/components/fpspreadsheet/uvirtuallayer_ole.pas
@@ -228,21 +228,28 @@ var
Splitted: TStringList;
j: integer;
SIDChild: SID;
+
function FindSiblingWithName(const AName: WideString; const AStartSibling: integer): SID;
+ var
+ n, ab: WideString;
begin
- if (FDirectory[AStartSibling]._ab=AName) and (FDirectory[AStartSibling]._mse<>BYTE(STGTY_INVALID)) then begin
+ n := UpperCase(AName);
+ ab := UpperCase(FDirectory[AStartSibling]._ab);
+ if (n = ab) and (FDirectory[AStartSibling]._mse <> BYTE(STGTY_INVALID)) then
+ begin
Result:=FDirectory[AStartSibling]._sidChild;
- end else begin
+ end else
+ begin
Result:=WINCOMPOUND_NOSID;
- if FDirectory[AStartSibling]._sidLeftSib<>WINCOMPOUND_NOSID then begin
+ if FDirectory[AStartSibling]._sidLeftSib<>WINCOMPOUND_NOSID then
Result:=FindSiblingWithName(AName,FDirectory[AStartSibling]._sidLeftSib);
- end;
- if Result<>WINCOMPOUND_NOSID then exit;
- if FDirectory[AStartSibling]._sidRightSib<>WINCOMPOUND_NOSID then begin
+ if Result<>WINCOMPOUND_NOSID then
+ exit;
+ if FDirectory[AStartSibling]._sidRightSib<>WINCOMPOUND_NOSID then
Result:=FindSiblingWithName(AName,FDirectory[AStartSibling]._sidRightSib);
- end;
end;
end;
+
begin
Splitted:=TStringList.Create;
SplitPath(APath,Splitted);
@@ -265,21 +272,26 @@ var
Splitted: TStringList;
j: integer;
SIDChild: SID;
+
function FindSiblingWithName(const AName: WideString; const AStartSibling: integer): SID;
+ var
+ n, ab: WideString;
begin
- if (FDirectory[AStartSibling]._ab=AName) and (FDirectory[AStartSibling]._mse<>BYTE(STGTY_INVALID)) then begin
- Result:=AStartSibling;
- end else begin
+ n := UpperCase(AName);
+ ab := UpperCase(FDirectory[AStartSibling]._ab);
+ if (n = ab) and (FDirectory[AStartSibling]._mse <> BYTE(STGTY_INVALID)) then
+ Result := AStartSibling
+ else begin
Result:=WINCOMPOUND_NOSID;
- if FDirectory[AStartSibling]._sidLeftSib<>WINCOMPOUND_NOSID then begin
+ if FDirectory[AStartSibling]._sidLeftSib<>WINCOMPOUND_NOSID then
Result:=FindSiblingWithName(AName,FDirectory[AStartSibling]._sidLeftSib);
- end;
- if Result<>WINCOMPOUND_NOSID then exit;
- if FDirectory[AStartSibling]._sidRightSib<>WINCOMPOUND_NOSID then begin
+ if Result<>WINCOMPOUND_NOSID then
+ exit;
+ if FDirectory[AStartSibling]._sidRightSib<>WINCOMPOUND_NOSID then
Result:=FindSiblingWithName(AName,FDirectory[AStartSibling]._sidRightSib);
- end;
end;
end;
+
begin
Splitted:=TStringList.Create;
SplitPath(APath,Splitted);
diff --git a/components/fpspreadsheet/xlsbiff5.pas b/components/fpspreadsheet/xlsbiff5.pas
index f5bd3deb6..5d549da23 100755
--- a/components/fpspreadsheet/xlsbiff5.pas
+++ b/components/fpspreadsheet/xlsbiff5.pas
@@ -785,7 +785,7 @@ begin
// Rather than lose data when reading it, let the application programmer deal
// with the problem or purposefully ignore it.
AnsiValue := Copy(AnsiValue, 1, MAXBYTES);
- Workbook.AddErrorMsg(rsInvalidCharacterInCell, [
+ Workbook.AddErrorMsg(rsTruncateTooLongCellText, [
MAXBYTES, GetCellString(ARow, ACol)
]);
end;