diff options
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/inc/iosys.hxx | 2 | ||||
-rw-r--r-- | basic/source/runtime/iosys.cxx | 10 |
2 files changed, 4 insertions, 8 deletions
diff --git a/basic/source/inc/iosys.hxx b/basic/source/inc/iosys.hxx index 0902407b71f8..151bdf11d6b7 100644 --- a/basic/source/inc/iosys.hxx +++ b/basic/source/inc/iosys.hxx @@ -64,7 +64,7 @@ public: SbError Close(); SbError Read(OString&, sal_uInt16 = 0, bool bForceReadingPerByte=false); SbError Read( char& ); - SbError Write( const OString&, sal_uInt16 = 0 ); + SbError Write( const OString& ); bool IsText() const { return !bool(nMode & SbiStreamFlags::Binary); } bool IsRandom() const { return bool(nMode & SbiStreamFlags::Random); } diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index e7c890838888..46c90bed8386 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -715,7 +715,7 @@ namespace } } -SbError SbiStream::Write( const OString& rBuf, sal_uInt16 n ) +SbError SbiStream::Write( const OString& rBuf ) { ExpandFile(); if( IsAppend() ) @@ -741,15 +741,11 @@ SbError SbiStream::Write( const OString& rBuf, sal_uInt16 n ) } else { - if( !n ) - { - n = nLen; - } - if( !n ) + if( !nLen ) { return nError = ERRCODE_BASIC_BAD_RECORD_LENGTH; } - pStrm->Write(rBuf.getStr(), n); + pStrm->Write(rBuf.getStr(), nLen); MapError(); } return nError; |