From 2a5f48f7f48804d5ac7d67c5a4f3f28315815a7a Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Fri, 19 Jun 2015 22:49:50 +0200 Subject: TableRef: column specifier is an absolute reference Change-Id: Ia7de5dc101a410aa1c25f36e64627fa3461ee772 --- sc/source/core/tool/compiler.cxx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'sc') 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; } -- cgit