summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2013-01-01 15:17:21 +0100
committerJulien Nabet <serval2412@yahoo.fr>2013-01-01 15:18:07 +0100
commit2e1abe1c59b1121ffb5d46afe82ce985cb70c4db (patch)
tree0644b3edd44b43317ba0957665eedc267f4836c3
parent4f21a0de363116cde65151d09ef4af9aff08886c (diff)
Fix some 'bRet' is reassigned a value before the old one has been used
Change-Id: I815b943871f11ae2bbe2d5ecfa6e096fb7bb463f
-rw-r--r--sc/source/core/tool/autoform.cxx11
1 files changed, 3 insertions, 8 deletions
diff --git a/sc/source/core/tool/autoform.cxx b/sc/source/core/tool/autoform.cxx
index a11e5f6c7a4e..54ee367d541d 100644
--- a/sc/source/core/tool/autoform.cxx
+++ b/sc/source/core/tool/autoform.cxx
@@ -746,10 +746,9 @@ void ScAutoFormatData::GetFromItemSet( sal_uInt16 nIndex, const SfxItemSet& rIte
bool ScAutoFormatData::Load( SvStream& rStream, const ScAfVersions& rVersions )
{
- sal_Bool bRet = true;
sal_uInt16 nVer = 0;
rStream >> nVer;
- bRet = 0 == rStream.GetError();
+ bool bRet = 0 == rStream.GetError();
if( bRet && (nVer == AUTOFORMAT_DATA_ID_X ||
(AUTOFORMAT_DATA_ID_504 <= nVer && nVer <= AUTOFORMAT_DATA_ID)) )
{
@@ -1016,8 +1015,6 @@ ScAutoFormat::iterator ScAutoFormat::end()
bool ScAutoFormat::Load()
{
- bool bRet = true;
-
INetURLObject aURL;
SvtPathOptions aPathOpt;
aURL.SetSmartURL( aPathOpt.GetUserConfigPath() );
@@ -1026,7 +1023,7 @@ bool ScAutoFormat::Load()
SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), STREAM_READ );
SvStream* pStream = aMedium.GetInStream();
- bRet = (pStream && pStream->GetError() == 0);
+ bool bRet = (pStream && pStream->GetError() == 0);
if (bRet)
{
SvStream& rStream = *pStream;
@@ -1079,8 +1076,6 @@ bool ScAutoFormat::Load()
bool ScAutoFormat::Save()
{
- bool bRet = true;
-
INetURLObject aURL;
SvtPathOptions aPathOpt;
aURL.SetSmartURL( aPathOpt.GetUserConfigPath() );
@@ -1089,7 +1084,7 @@ bool ScAutoFormat::Save()
SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), STREAM_WRITE );
SvStream* pStream = aMedium.GetOutStream();
- bRet = (pStream && pStream->GetError() == 0);
+ bool bRet = (pStream && pStream->GetError() == 0);
if (bRet)
{
const sal_uInt16 fileVersion = SOFFICE_FILEFORMAT_50;