Kaydet (Commit) 44956c32 authored tarafından Kohei Yoshida's avatar Kohei Yoshida

coverity#1078504: Remove logically dead code.

Change-Id: I6bb3ee8f604d9b79209cda13a48ccd7f2df4f26e
üst 4fe8a495
......@@ -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;
......
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