summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2015-06-19 22:49:50 +0200
committerEike Rathke <erack@redhat.com>2015-06-21 18:36:17 +0200
commit2a5f48f7f48804d5ac7d67c5a4f3f28315815a7a (patch)
treeb4168d499fdc93e7d8401d81097372a5cc4897be /sc
parent843f7335b2e11dde66d5f6e0f98b98e30eff7119 (diff)
TableRef: column specifier is an absolute reference
Change-Id: Ia7de5dc101a410aa1c25f36e64627fa3461ee772
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/compiler.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index e4a7293906d7..2d7b37dd849d 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -3450,10 +3450,14 @@ bool ScCompiler::IsTableRefColumn( const OUString& rName ) const
OUString aStr = aIter.getString();
if (ScGlobal::GetpTransliteration()->isEqual( aStr, aName))
{
+ /* XXX NOTE: we could init the column as relative so copying a
+ * formula across columns would point to the relative column,
+ * but do it absolute because:
+ * a) it makes the reference work in named expressions without
+ * having to distinguish
+ * b) Excel does it the same. */
ScSingleRefData aRef;
- aRef.InitFlags();
- aRef.SetColRel( true );
- aRef.SetAddress( aIter.GetPos(), aPos);
+ aRef.InitAddress( aIter.GetPos());
maRawToken.SetSingleReference( aRef );
return true;
}