summaryrefslogtreecommitdiff
path: root/basic/source/runtime/methods1.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basic/source/runtime/methods1.cxx')
-rw-r--r--basic/source/runtime/methods1.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index 4bdbe9e7fd81..56b22cd69a5e 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -1055,6 +1055,10 @@ sal_Bool lcl_ReadSbxVariable( SbxVariable& rVar, SvStream* pStrm,
{
sal_uInt8 aByte;
*pStrm >> aByte;
+
+ if( bBinary && SbiRuntime::isVBAEnabled() && aByte == 1 && pStrm->IsEof() )
+ aByte = 0;
+
rVar.PutByte( aByte );
}
break;
@@ -1170,7 +1174,8 @@ void PutGet( SbxArray& rPar, sal_Bool bPut )
}
sal_Int16 nFileNo = rPar.Get(1)->GetInteger();
SbxVariable* pVar2 = rPar.Get(2);
- sal_Bool bHasRecordNo = (sal_Bool)(pVar2->GetType() != SbxEMPTY);
+ SbxDataType eType2 = pVar2->GetType();
+ sal_Bool bHasRecordNo = (sal_Bool)(eType2 != SbxEMPTY && eType2 != SbxERROR);
long nRecordNo = pVar2->GetLong();
if ( nFileNo < 1 || ( bHasRecordNo && nRecordNo < 1 ) )
{