cid#1470786 Uncaught exception
Change-Id: I85e75e40c9280b16b12ea268b5070f0ce450208e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109061 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
parent
9b0c4607d0
commit
b345a2bab0
1 changed files with 25 additions and 18 deletions
|
@ -1117,27 +1117,34 @@ bool ImpGraphic::swapInContent(SvStream& rStream)
|
|||
sal_Int32 nType;
|
||||
sal_Int32 nLength;
|
||||
|
||||
rStream.ReadUInt32(nId);
|
||||
|
||||
// check version
|
||||
if (SWAP_FORMAT_ID != nId)
|
||||
try
|
||||
{
|
||||
SAL_WARN("vcl", "Incompatible swap file!");
|
||||
return false;
|
||||
rStream.ReadUInt32(nId);
|
||||
|
||||
// check version
|
||||
if (SWAP_FORMAT_ID != nId)
|
||||
{
|
||||
SAL_WARN("vcl", "Incompatible swap file!");
|
||||
return false;
|
||||
}
|
||||
|
||||
rStream.ReadInt32(nType);
|
||||
rStream.ReadInt32(nLength);
|
||||
|
||||
meType = static_cast<GraphicType>(nType);
|
||||
|
||||
if (meType == GraphicType::NONE || meType == GraphicType::Default)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
bRet = swapInGraphic(rStream);
|
||||
}
|
||||
}
|
||||
|
||||
rStream.ReadInt32(nType);
|
||||
rStream.ReadInt32(nLength);
|
||||
|
||||
meType = static_cast<GraphicType>(nType);
|
||||
|
||||
if (meType == GraphicType::NONE || meType == GraphicType::Default)
|
||||
catch (const SvStreamEOFException&)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
bRet = swapInGraphic(rStream);
|
||||
SAL_WARN("vcl", "EOF");
|
||||
}
|
||||
|
||||
return bRet;
|
||||
|
|
Loading…
Reference in a new issue