summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-03-24 13:03:16 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-03-24 13:08:07 -0400
commit44956c3261b69eec054ffa5fe8440f14f571308c (patch)
treedd585e1cbba5d4d51eb4256b739945e358b1376d /sc
parent4fe8a4954c4c5cf13074fde419c4fc6f094578bf (diff)
coverity#1078504: Remove logically dead code.
Change-Id: I6bb3ee8f604d9b79209cda13a48ccd7f2df4f26e
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/formulacell.cxx44
1 files changed, 0 insertions, 44 deletions
diff --git a/sc/source/core/data/formulacell.cxx b/sc/source/core/data/formulacell.cxx
index b5ec659f6e73..320a2c246bf7 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;