[Libreoffice-commits] core.git: sc/source
Kohei Yoshida
kohei.yoshida at collabora.com
Mon Mar 24 10:09:18 PDT 2014
sc/source/core/data/formulacell.cxx | 44 ------------------------------------
1 file changed, 44 deletions(-)
New commits:
commit 44956c3261b69eec054ffa5fe8440f14f571308c
Author: Kohei Yoshida <kohei.yoshida at collabora.com>
Date: Mon Mar 24 13:03:16 2014 -0400
coverity#1078504: Remove logically dead code.
Change-Id: I6bb3ee8f604d9b79209cda13a48ccd7f2df4f26e
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index b5ec659..320a2c2 100644
--- a/sc/source/core/data/formulacell.cxx
+++ b/sc/source/core/data/formulacell.cxx
@@ -3233,7 +3233,6 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
bool bRefChanged = false;
ScToken* t;
- ScRangeData* pShared = NULL;
pCode->Reset();
while( (t = static_cast<ScToken*>(pCode->GetNextReferenceOrName())) != NULL )
{
@@ -3260,27 +3259,6 @@ void ScFormulaCell::UpdateTranspose( const ScRange& rSource, const ScAddress& rD
}
}
- if (pShared) // Exchange Shared Formula with real Formula
- {
- pDocument->RemoveFromFormulaTree( this ); // update formula count
- delete pCode;
- pCode = new ScTokenArray( *pShared->GetCode() );
- bRefChanged = true;
- pCode->Reset();
- while( (t = static_cast<ScToken*>(pCode->GetNextReference())) != NULL )
- {
- if( t->GetType() != svIndex )
- {
- SingleDoubleRefModifier aMod(*t);
- ScComplexRefData& rRef = aMod.Ref();
- ScRange aAbs = rRef.toAbs(aOldPos);
- bool bMod = (ScRefUpdate::UpdateTranspose(pDocument, rSource, rDest, aAbs) != UR_NOTHING || bPosChanged);
- if (bMod)
- rRef.SetRange(aAbs, aPos); // based on the new anchor position.
- }
- }
- }
-
if (bRefChanged)
{
if (pUndoDoc)
@@ -3308,7 +3286,6 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY
bool bRefChanged = false;
ScToken* t;
- ScRangeData* pShared = NULL;
pCode->Reset();
while( (t = static_cast<ScToken*>(pCode->GetNextReferenceOrName())) != NULL )
@@ -3336,27 +3313,6 @@ void ScFormulaCell::UpdateGrow( const ScRange& rArea, SCCOL nGrowX, SCROW nGrowY
}
}
- if (pShared) // Exchange Shared Formula with real Formula
- {
- pDocument->RemoveFromFormulaTree( this ); // Update formula count
- delete pCode;
- pCode = new ScTokenArray( *pShared->GetCode() );
- bRefChanged = true;
- pCode->Reset();
- while( (t = static_cast<ScToken*>(pCode->GetNextReference())) != NULL )
- {
- if( t->GetType() != svIndex )
- {
- SingleDoubleRefModifier aMod(*t);
- ScComplexRefData& rRef = aMod.Ref();
- ScRange aAbs = rRef.toAbs(aPos);
- bool bMod = (ScRefUpdate::UpdateGrow(rArea, nGrowX, nGrowY, aAbs) != UR_NOTHING);
- if (bMod)
- rRef.SetRange(aAbs, aPos);
- }
- }
- }
-
if (bRefChanged)
{
bCompile = true;
More information about the Libreoffice-commits
mailing list