Kaydet (Commit) dc350dee authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Andras Timar

check returns of SeekToEndOfRecord

Change-Id: Ia593dd0e2239a97f17bb03f005d22028da482445
(cherry picked from commit d400f155)
Reviewed-on: https://gerrit.libreoffice.org/18096Reviewed-by: 's avatarDavid Tardon <dtardon@redhat.com>
Tested-by: 's avatarDavid Tardon <dtardon@redhat.com>
üst cffed0c4
...@@ -3253,12 +3253,19 @@ bool SvxMSDffManager::SeekToRec( SvStream& rSt, sal_uInt16 nRecId, sal_uLong nMa ...@@ -3253,12 +3253,19 @@ bool SvxMSDffManager::SeekToRec( SvStream& rSt, sal_uInt16 nRecId, sal_uLong nMa
if ( pRecHd != NULL ) if ( pRecHd != NULL )
*pRecHd = aHd; *pRecHd = aHd;
else else
aHd.SeekToBegOfRecord( rSt ); {
bool bSeekSuccess = aHd.SeekToBegOfRecord(rSt);
if (!bSeekSuccess)
{
bRet = false;
break;
}
}
} }
} }
if ( !bRet ) if ( !bRet )
{ {
bool bSeekSuccess = aHd.SeekToEndOfRecord( rSt ); bool bSeekSuccess = aHd.SeekToEndOfRecord(rSt);
if (!bSeekSuccess) if (!bSeekSuccess)
break; break;
} }
...@@ -3287,11 +3294,22 @@ bool SvxMSDffManager::SeekToRec2( sal_uInt16 nRecId1, sal_uInt16 nRecId2, sal_uL ...@@ -3287,11 +3294,22 @@ bool SvxMSDffManager::SeekToRec2( sal_uInt16 nRecId1, sal_uInt16 nRecId2, sal_uL
if ( pRecHd ) if ( pRecHd )
*pRecHd = aHd; *pRecHd = aHd;
else else
aHd.SeekToBegOfRecord( rStCtrl ); {
bool bSeekSuccess = aHd.SeekToBegOfRecord(rStCtrl);
if (!bSeekSuccess)
{
bRet = false;
break;
}
}
} }
} }
if ( !bRet ) if ( !bRet )
aHd.SeekToEndOfRecord( rStCtrl ); {
bool bSeekSuccess = aHd.SeekToEndOfRecord(rStCtrl);
if (!bSeekSuccess)
break;
}
} }
while ( rStCtrl.good() && rStCtrl.Tell() < nMaxFilePos && !bRet ); while ( rStCtrl.good() && rStCtrl.Tell() < nMaxFilePos && !bRet );
if ( !bRet ) if ( !bRet )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment