diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2017-06-28 03:55:33 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2017-07-02 11:55:34 +0200 |
commit | 032872ffc7902e330df2863399c84550dbb31ae6 (patch) | |
tree | d8d3583a7a11e64710485e1c723687c0587a18f4 /sc | |
parent | 9f6358e8f359eb50b45b056573ce315473ab692d (diff) |
check for end of file, correct comment
Change-Id: I8262651019364b5a2a927667cfd31555d03e6eab
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/unoobj/filtuno.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx index 45570676c9e2..de16f6b28f55 100644 --- a/sc/source/ui/unoobj/filtuno.cxx +++ b/sc/source/ui/unoobj/filtuno.cxx @@ -103,9 +103,8 @@ namespace dbf_Stream->SetEndian(SvStreamEndian::LITTLE); dbf_Stream->Seek(STREAM_SEEK_TO_BEGIN + 29); - // TODO : how to check this? - // if (seek_succeeded_ie_not_end_of_file) - //{ + if (! dbf_Stream->IsEof()) + { sal_uInt8 nEncoding=0; dbf_Stream->ReadUChar( nEncoding ); if (nEncoding != 0x00) @@ -148,9 +147,8 @@ namespace return charsetSource::charset_from_file; } } - //} + } } - // dbf_Stream goes out of scope, is automatically closed } { Sequence<Any> aValues; @@ -360,6 +358,7 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() break; } bDBEnc = true; + // pInStream goes out of scope, the stream is automatically closed } else if ( aFilterString == ScDocShell::GetDifFilterName() ) { |