require only as much remaining data as is necessary

Change-Id: If26562a7d5bede1dea414cbe24871b1dd75bfe23
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113943
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara 2021-04-11 11:08:40 +01:00
parent e5a4149fb9
commit 7c2e605843

View file

@ -861,7 +861,7 @@ void ImportExcel::Mulrk()
XclAddress aXclPos;
aIn >> aXclPos;
for( XclAddress aCurrXclPos( aXclPos ); (aXclPos.mnCol <= aCurrXclPos.mnCol) && (aIn.GetRecLeft() > 6); ++aCurrXclPos.mnCol )
for( XclAddress aCurrXclPos( aXclPos ); (aXclPos.mnCol <= aCurrXclPos.mnCol) && (aIn.GetRecLeft() >= 6); ++aCurrXclPos.mnCol )
{
sal_uInt16 nXF = aIn.ReaduInt16();
sal_Int32 nRkNum = aIn.ReadInt32();
@ -880,7 +880,7 @@ void ImportExcel::Mulblank()
XclAddress aXclPos;
aIn >> aXclPos;
for( XclAddress aCurrXclPos( aXclPos ); (aXclPos.mnCol <= aCurrXclPos.mnCol) && (aIn.GetRecLeft() > 2); ++aCurrXclPos.mnCol )
for( XclAddress aCurrXclPos( aXclPos ); (aXclPos.mnCol <= aCurrXclPos.mnCol) && (aIn.GetRecLeft() >= 2); ++aCurrXclPos.mnCol )
{
sal_uInt16 nXF = aIn.ReaduInt16();