summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke [er] <eike.rathke@oracle.com>2011-02-22 13:48:40 +0100
committerEike Rathke [er] <eike.rathke@oracle.com>2011-02-22 13:48:40 +0100
commitfbd12549299a2fccab00e3f5a9d0bac161170b75 (patch)
tree1f772fd3c23660a2bcfb3ee706f571c1f8277480
parentd0ce561b856d43b13d5884b5aa5106f7889ea929 (diff)
calc66: #i110588# treat external references as 3D again (they are at least 3.5D ;)
-rw-r--r--sc/source/core/tool/token.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index a270969e100c..59f055296f75 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -552,24 +552,28 @@ sal_Bool ScToken::TextEqual( const FormulaToken& _rToken ) const
sal_Bool ScToken::Is3DRef() const
{
switch ( eType )
{
case svDoubleRef :
if ( GetSingleRef2().IsFlag3D() )
return sal_True;
//! fallthru
case svSingleRef :
if ( GetSingleRef().IsFlag3D() )
return sal_True;
break;
+ case svExternalSingleRef:
+ case svExternalDoubleRef:
+ return sal_True;
+ break;
default:
{
// added to avoid warnings
}
}
return sal_False;
}
// static
FormulaTokenRef ScToken::ExtendRangeReference( FormulaToken & rTok1, FormulaToken & rTok2,
const ScAddress & rPos, bool bReuseDoubleRef )
{
@@ -1816,21 +1820,35 @@ void ScTokenArray::ReadjustRelative3DReferences( const ScAddress& rOldPos,
}
//! fallthru
case svSingleRef :
{
ScSingleRefData& rRef1 = static_cast<ScToken*>(pCode[j])->GetSingleRef();
if ( rRef1.IsFlag3D() )
{
rRef1.CalcAbsIfRel( rOldPos );
rRef1.CalcRelFromAbs( rNewPos );
}
}
break;
+ case svExternalDoubleRef:
+ {
+ ScSingleRefData& rRef2 = static_cast<ScToken*>(pCode[j])->GetSingleRef2();
+ rRef2.CalcAbsIfRel( rOldPos );
+ rRef2.CalcRelFromAbs( rNewPos );
+ }
+ //! fallthru
+ case svExternalSingleRef:
+ {
+ ScSingleRefData& rRef1 = static_cast<ScToken*>(pCode[j])->GetSingleRef();
+ rRef1.CalcAbsIfRel( rOldPos );
+ rRef1.CalcRelFromAbs( rNewPos );
+ }
+ break;
default:
{
// added to avoid warnings
}
}
}
}