summaryrefslogtreecommitdiff
path: root/dbaccess/source/core/api/definitioncolumn.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/core/api/definitioncolumn.cxx')
-rw-r--r--dbaccess/source/core/api/definitioncolumn.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/dbaccess/source/core/api/definitioncolumn.cxx b/dbaccess/source/core/api/definitioncolumn.cxx
index 8a9f5649a7bd..63f39e13c6e7 100644
--- a/dbaccess/source/core/api/definitioncolumn.cxx
+++ b/dbaccess/source/core/api/definitioncolumn.cxx
@@ -189,7 +189,7 @@ rtl::OUString OTableColumn::getImplementationName( ) throw (RuntimeException)
DBG_NAME( OQueryColumn );
// -------------------------------------------------------------------------
-OQueryColumn::OQueryColumn( const Reference< XPropertySet >& _rxParserColumn, const Reference< XConnection >& _rxConnection )
+OQueryColumn::OQueryColumn( const Reference< XPropertySet >& _rxParserColumn, const Reference< XConnection >& _rxConnection,const ::rtl::OUString& _sNewName )
:OTableColumnDescriptor( false /* do not act as descriptor */ )
{
const sal_Int32 nPropAttr = PropertyAttribute::READONLY;
@@ -207,7 +207,14 @@ OQueryColumn::OQueryColumn( const Reference< XPropertySet >& _rxParserColumn, co
OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_TYPE ) >>= m_nType );
OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_ISAUTOINCREMENT ) >>= m_bAutoIncrement );
OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_ISCURRENCY ) >>= m_bCurrency );
- OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_NAME ) >>= m_sName );
+ if ( _sNewName.getLength() )
+ {
+ m_sName = _sNewName;
+ }
+ else
+ {
+ OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_NAME ) >>= m_sName );
+ }
m_bRowVersion = sal_False;
Reference< XPropertySetInfo > xPSI( _rxParserColumn->getPropertySetInfo(), UNO_SET_THROW );