summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-11-22 10:02:51 +0000
committerCaolán McNamara <caolanm@redhat.com>2017-11-22 13:33:46 +0100
commitdf2e78f1a8a1dc628eb26c8173ba1f6bae0ca6f4 (patch)
tree6aaf6d2f2613c3de773e3d3134b0d1354e0d0b12 /sw
parent2161d04688be77112c281a1ada5263b963677c43 (diff)
replace check of eof and GetError with good
Change-Id: I7d9f04262ab5420e9a14813fa1274bb9d01e3291 Reviewed-on: https://gerrit.libreoffice.org/45076 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/edit/edtox.cxx2
-rw-r--r--sw/source/core/layout/laycache.cxx3
-rw-r--r--sw/source/ui/index/cnttab.cxx2
3 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/core/edit/edtox.cxx b/sw/source/core/edit/edtox.cxx
index 0e109d9d87d9..0af2a5d91ee4 100644
--- a/sw/source/core/edit/edtox.cxx
+++ b/sw/source/core/edit/edtox.cxx
@@ -320,7 +320,7 @@ void SwEditShell::ApplyAutoMark()
SearchAlgorithms2::ABSOLUTE,
'\\' );
- while( !rStrm.GetError() && !rStrm.eof() )
+ while (rStrm.good())
{
OString aRdLine;
rStrm.ReadLine( aRdLine );
diff --git a/sw/source/core/layout/laycache.cxx b/sw/source/core/layout/laycache.cxx
index b6dfe8daa4cf..435903bc70f0 100644
--- a/sw/source/core/layout/laycache.cxx
+++ b/sw/source/core/layout/laycache.cxx
@@ -1068,8 +1068,7 @@ bool SwLayCacheIoImpl::OpenRec( sal_uInt8 cType )
sal_uInt32 nVal(0);
pStream->ReadUInt32( nVal );
sal_uInt8 cRecTyp = (sal_uInt8)nVal;
- if( !nVal || cRecTyp != cType ||
- pStream->GetErrorCode() != ERRCODE_NONE || pStream->eof() )
+ if (!nVal || cRecTyp != cType || !pStream->good())
{
OSL_ENSURE( nVal, "OpenRec: Record-Header is 0" );
OSL_ENSURE( cRecTyp == cType, "OpenRec: Wrong Record Type" );
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index d99014941c60..ac3b7fc411d0 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -4095,7 +4095,7 @@ void SwEntryBrowseBox::ReadEntries(SvStream& rInStr)
{
AutoMarkEntry* pToInsert = nullptr;
rtl_TextEncoding eTEnc = osl_getThreadTextEncoding();
- while( !rInStr.GetError() && !rInStr.eof() )
+ while (rInStr.good())
{
OUString sLine;
rInStr.ReadByteStringLine( sLine, eTEnc );