Kaydet (Commit) c228103c authored tarafından Julien Nabet's avatar Julien Nabet

2 small fixes

Variable 'bRet' is reassigned
++it without checking it != itEnd

Change-Id: I3bdb8fa723cca8a132dc7aa6b5c5e3c7bd0861cf
üst 0d816467
...@@ -1099,13 +1099,19 @@ bool ScAutoFormat::Save() ...@@ -1099,13 +1099,19 @@ bool ScAutoFormat::Save()
osl_getThreadTextEncoding() ); osl_getThreadTextEncoding() );
m_aVersions.Write(rStream, fileVersion); m_aVersions.Write(rStream, fileVersion);
bRet = (rStream.GetError() == 0); bRet &= (rStream.GetError() == 0);
//----------------------------------------------------------- //-----------------------------------------------------------
rStream << (sal_uInt16)(maData.size() - 1); rStream << (sal_uInt16)(maData.size() - 1);
bRet = (rStream.GetError() == 0); bRet &= (rStream.GetError() == 0);
MapType::iterator it = maData.begin(), itEnd = maData.end(); MapType::iterator it = maData.begin(), itEnd = maData.end();
if (it != itEnd)
{
for (++it; bRet && it != itEnd; ++it) // Skip the first item. for (++it; bRet && it != itEnd; ++it) // Skip the first item.
bRet = it->second->Save(rStream, fileVersion); {
bRet &= it->second->Save(rStream, fileVersion);
}
}
rStream.Flush(); rStream.Flush();
......
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