Kaydet (Commit) 53d8b344 authored tarafından Eike Rathke's avatar Eike Rathke

TableRef: ScCompiler::IsTableRefColumn() lookup column name in ScDBData

... as a fallback for named expressions during document import when cell
content isn't available yet.

Change-Id: I134ac2aaeb5f336703edbadfd6664d916d2c5885
(cherry picked from commit 4fc13975)
üst e8e333aa
......@@ -3496,6 +3496,22 @@ bool ScCompiler::IsTableRefColumn( const OUString& rName ) const
}
}
}
// And now a fallback for named expressions during document load time when
// cell content isn't available yet. This could be the preferred method IF
// the ScDBData column names were maintained and refreshed on ALL sheet
// operations, including cell content changes.
sal_Int32 nOffset = pDBData->GetColumnNameOffset( aName);
if (nOffset >= 0)
{
ScSingleRefData aRef;
ScAddress aAdr( aRange.aStart);
aAdr.IncCol( nOffset);
aRef.InitAddress( aAdr);
maRawToken.SetSingleReference( aRef );
return true;
}
return false;
}
......
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