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

it's no use to check for stream status after a seek

seek resets failures, need to check after a read
and before a seek

Change-Id: Ia249e258c51af5efc838f92c4ead6237b403c701
(cherry picked from commit 170ff56b)
Reviewed-on: https://gerrit.libreoffice.org/17866Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst b8db661f
......@@ -1226,19 +1226,22 @@ void SfxOlePropertySet::ImplLoad( SvStream& rStrm )
// read sections
sal_Size nSectPosPos = rStrm.Tell();
for( sal_Int32 nSectIdx = 0; (nSectIdx < nSectCount) && (rStrm.GetErrorCode() == SVSTREAM_OK) && !rStrm.IsEof(); ++nSectIdx )
for (sal_Int32 nSectIdx = 0; nSectIdx < nSectCount; ++nSectIdx)
{
// read section guid/position pair
rStrm.Seek( nSectPosPos );
rStrm.Seek(nSectPosPos);
SvGlobalName aSectGuid;
sal_uInt32 nSectPos;
rStrm >> aSectGuid;
rStrm.ReadUInt32( nSectPos );
sal_uInt32 nSectPos(0);
rStrm.ReadUInt32(nSectPos);
if (!rStrm.good())
break;
nSectPosPos = rStrm.Tell();
// read section
rStrm.Seek( static_cast< sal_Size >( nSectPos ) );
if( rStrm.GetErrorCode() == SVSTREAM_OK )
LoadObject( rStrm, AddSection( aSectGuid ) );
rStrm.Seek(nSectPos);
LoadObject(rStrm, AddSection(aSectGuid));
if (!rStrm.good())
break;
}
}
......
This diff was suppressed by a .gitattributes entry.
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