[Libreoffice-commits] core.git: connectivity/source
Wastack
btomi96 at gmail.com
Tue Dec 20 18:18:40 UTC 2016
connectivity/source/drivers/firebird/ResultSetMetaData.cxx | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
New commits:
commit ef1aee0f80d34b75b0d406abc708a0e8316fe5e8
Author: Wastack <btomi96 at gmail.com>
Date: Thu Dec 15 12:19:59 2016 +0100
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 <lionel at mamane.lu>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
Tested-by: Julien Nabet <serval2412 at yahoo.fr>
diff --git a/connectivity/source/drivers/firebird/ResultSetMetaData.cxx b/connectivity/source/drivers/firebird/ResultSetMetaData.cxx
index 6b6d984..7d2dd2f 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)
More information about the Libreoffice-commits
mailing list