[Libreoffice-commits] .: sc/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sat Jan 19 01:14:11 PST 2013
sc/source/core/tool/autoform.cxx | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
New commits:
commit c228103ce6a5efe60de553073a9b20d977478bf5
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Jan 19 10:11:24 2013 +0100
2 small fixes
Variable 'bRet' is reassigned
++it without checking it != itEnd
Change-Id: I3bdb8fa723cca8a132dc7aa6b5c5e3c7bd0861cf
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index 54ee367..4e14754 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -1099,13 +1099,19 @@ bool ScAutoFormat::Save()
osl_getThreadTextEncoding() );
m_aVersions.Write(rStream, fileVersion);
- bRet = (rStream.GetError() == 0);
+ bRet &= (rStream.GetError() == 0);
+
//-----------------------------------------------------------
rStream << (sal_uInt16)(maData.size() - 1);
- bRet = (rStream.GetError() == 0);
+ bRet &= (rStream.GetError() == 0);
MapType::iterator it = maData.begin(), itEnd = maData.end();
- for (++it; bRet && it != itEnd; ++it) // Skip the first item.
- bRet = it->second->Save(rStream, fileVersion);
+ if (it != itEnd)
+ {
+ for (++it; bRet && it != itEnd; ++it) // Skip the first item.
+ {
+ bRet &= it->second->Save(rStream, fileVersion);
+ }
+ }
rStream.Flush();
More information about the Libreoffice-commits
mailing list