summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/filter/excel/impop.cxx18
1 files changed, 16 insertions, 2 deletions
diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx
index 1c107d4ad092..988ec3fbf65e 100644
--- a/sc/source/filter/excel/impop.cxx
+++ b/sc/source/filter/excel/impop.cxx
@@ -878,8 +878,14 @@ void ImportExcel::Mulrk()
XclAddress aXclPos;
aIn >> aXclPos;
- for( XclAddress aCurrXclPos( aXclPos ); (aXclPos.mnCol <= aCurrXclPos.mnCol) && (aIn.GetRecLeft() > 2); ++aCurrXclPos.mnCol )
+ XclAddress aCurrXclPos(aXclPos);
+ while (true)
{
+ if (aXclPos.mnCol > aCurrXclPos.mnCol)
+ break;
+ if (aIn.GetRecLeft() <= 2)
+ break;
+
sal_uInt16 nXF = aIn.ReaduInt16();
sal_Int32 nRkNum = aIn.ReadInt32();
@@ -889,6 +895,7 @@ void ImportExcel::Mulrk()
GetXFRangeBuffer().SetXF( aScPos, nXF );
GetDocImport().setNumericCell(aScPos, XclTools::GetDoubleFromRK(nRkNum));
}
+ ++aCurrXclPos.mnCol;
}
}
@@ -915,13 +922,20 @@ void ImportExcel::Mulblank()
XclAddress aXclPos;
aIn >> aXclPos;
- for( XclAddress aCurrXclPos( aXclPos ); (aXclPos.mnCol <= aCurrXclPos.mnCol) && (aIn.GetRecLeft() > 2); ++aCurrXclPos.mnCol )
+ XclAddress aCurrXclPos(aXclPos);
+ while (true)
{
+ if (aXclPos.mnCol > aCurrXclPos.mnCol)
+ break;
+ if (aIn.GetRecLeft() <= 2)
+ break;
+
sal_uInt16 nXF = aIn.ReaduInt16();
ScAddress aScPos( ScAddress::UNINITIALIZED );
if( GetAddressConverter().ConvertAddress( aScPos, aCurrXclPos, GetCurrScTab(), true ) )
GetXFRangeBuffer().SetBlankXF( aScPos, nXF );
+ ++aCurrXclPos.mnCol;
}
}