From ef1aee0f80d34b75b0d406abc708a0e8316fe5e8 Mon Sep 17 00:00:00 2001 From: Wastack Date: Thu, 15 Dec 2016 12:19:59 +0100 Subject: tdf#70506 implement getColumnLabel function which is responsible for aliasnames defined with the SQL 'AS' keyword. Change-Id: I6aaf1ba6969e2bd738941e41492338382168bc89 Reviewed-on: https://gerrit.libreoffice.org/32042 Reviewed-by: Lionel Elie Mamane Reviewed-by: Julien Nabet Tested-by: Julien Nabet --- connectivity/source/drivers/firebird/ResultSetMetaData.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'connectivity') diff --git a/connectivity/source/drivers/firebird/ResultSetMetaData.cxx b/connectivity/source/drivers/firebird/ResultSetMetaData.cxx index 6b6d9849e6af..7d2dd2f392a5 100644 --- a/connectivity/source/drivers/firebird/ResultSetMetaData.cxx +++ b/connectivity/source/drivers/firebird/ResultSetMetaData.cxx @@ -128,8 +128,13 @@ OUString SAL_CALL OResultSetMetaData::getColumnTypeName(sal_Int32 column) OUString SAL_CALL OResultSetMetaData::getColumnLabel(sal_Int32 column) throw(SQLException, RuntimeException, std::exception) { - // TODO: clarify what this is -- probably not the alias - return getColumnName(column); + // aliasname + verifyValidColumn(column); + OUString sRet(m_pSqlda->sqlvar[column-1].aliasname, + m_pSqlda->sqlvar[column-1].aliasname_length, + RTL_TEXTENCODING_UTF8); + sanitizeIdentifier(sRet); + return sRet; } OUString SAL_CALL OResultSetMetaData::getColumnServiceName(sal_Int32 column) -- cgit