summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrank Schönheit [fs] <frank.schoenheit@sun.com>2009-11-03 10:43:12 +0100
committerFrank Schönheit [fs] <frank.schoenheit@sun.com>2009-11-03 10:43:12 +0100
commitb6b8881b12269ae337d4706b58bfdc075eb252b1 (patch)
treeafc87530450ca5f4f7a6337bf8957a1da1f0cbba
parent70d7ac8e4969c4de099f691b649e5bfd232e4632 (diff)
one step towards fixing issue #i67022#:
query columns now use the ColumnSettings of the underlying table column, if - this table column can be determined - the query column doesn't have own settings (which would overrule the table col settings) However, we're not there, yet: Changing the settings of the table column is not reflected in the query column until closing and re-opening the database document. That's up to a next implementation step.
-rw-r--r--dbaccess/source/core/api/definitioncolumn.cxx180
-rw-r--r--dbaccess/source/core/api/query.cxx9
-rw-r--r--dbaccess/source/core/api/querycontainer.cxx4
-rw-r--r--dbaccess/source/core/api/querydescriptor.cxx7
-rw-r--r--dbaccess/source/core/dataaccess/ComponentDefinition.cxx2
-rw-r--r--dbaccess/source/core/inc/definitioncolumn.hxx75
-rw-r--r--dbaccess/source/core/inc/querycontainer.hxx2
-rw-r--r--dbaccess/source/core/misc/ContainerMediator.cxx2
8 files changed, 159 insertions, 122 deletions
diff --git a/dbaccess/source/core/api/definitioncolumn.cxx b/dbaccess/source/core/api/definitioncolumn.cxx
index fafdf0a97185..19dd1f1962ad 100644
--- a/dbaccess/source/core/api/definitioncolumn.cxx
+++ b/dbaccess/source/core/api/definitioncolumn.cxx
@@ -64,15 +64,15 @@ using namespace dbaccess;
IMPLEMENT_FORWARD_XINTERFACE2(OTableColumnDescriptor,OColumn,TXChild)
//------------------------------------------------------------------------------
-void OTableColumnDescriptor::impl_registerProperties( const bool _bActAsDescriptor )
+void OTableColumnDescriptor::impl_registerProperties()
{
- sal_Int32 nDefaultAttr = _bActAsDescriptor ? 0 : PropertyAttribute::READONLY;
+ sal_Int32 nDefaultAttr = m_bActAsDescriptor ? 0 : PropertyAttribute::READONLY;
registerProperty( PROPERTY_TYPENAME, PROPERTY_ID_TYPENAME, nDefaultAttr, &m_aTypeName, ::getCppuType( &m_aTypeName ) );
registerProperty( PROPERTY_DESCRIPTION, PROPERTY_ID_DESCRIPTION, nDefaultAttr, &m_aDescription, ::getCppuType( &m_aDescription ) );
registerProperty( PROPERTY_DEFAULTVALUE, PROPERTY_ID_DEFAULTVALUE, nDefaultAttr, &m_aDefaultValue, ::getCppuType( &m_aDefaultValue ) );
- if ( _bActAsDescriptor )
+ if ( m_bActAsDescriptor )
registerProperty( PROPERTY_AUTOINCREMENTCREATION, PROPERTY_ID_AUTOINCREMENTCREATION, nDefaultAttr, &m_aAutoIncrementValue, ::getCppuType( &m_aAutoIncrementValue ) );
registerProperty( PROPERTY_TYPE, PROPERTY_ID_TYPE, nDefaultAttr, &m_nType, ::getCppuType( &m_nType ) );
@@ -87,20 +87,7 @@ void OTableColumnDescriptor::impl_registerProperties( const bool _bActAsDescript
}
//--------------------------------------------------------------------------
-Sequence< sal_Int8 > OTableColumnDescriptor::getImplementationId() throw (RuntimeException)
-{
- static OImplementationId * pId = 0;
- if (! pId)
- {
- MutexGuard aGuard( Mutex::getGlobalMutex() );
- if (! pId)
- {
- static OImplementationId aId;
- pId = &aId;
- }
- }
- return pId->getImplementationId();
-}
+IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumnDescriptor )
// ::com::sun::star::lang::XServiceInfo
//------------------------------------------------------------------------------
@@ -113,7 +100,7 @@ rtl::OUString OTableColumnDescriptor::getImplementationName( ) throw (RuntimeEx
Sequence< ::rtl::OUString > OTableColumnDescriptor::getSupportedServiceNames( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aSNS( 2 );
- aSNS[0] = SERVICE_SDBCX_COLUMNDESCRIPTOR;
+ aSNS[0] = m_bActAsDescriptor ? SERVICE_SDBCX_COLUMNDESCRIPTOR : SERVICE_SDBCX_COLUMN;
aSNS[1] = SERVICE_SDB_COLUMNSETTINGS;
return aSNS;
}
@@ -169,31 +156,69 @@ DBG_NAME(OTableColumn);
// -------------------------------------------------------------------------
OTableColumn::OTableColumn( const ::rtl::OUString& _rName )
- :OTableColumnDescriptor( false )
+ :OTableColumnDescriptor( false /* do not act as descriptor */ )
{
DBG_CTOR(OTableColumn,NULL);
m_sName = _rName;
}
-// -------------------------------------------------------------------------
-OTableColumn::OTableColumn(const Reference<XPropertySet>& _xColumn)
- :OTableColumnDescriptor( false )
+// -----------------------------------------------------------------------------
+OTableColumn::~OTableColumn()
{
- DBG_CTOR(OTableColumn,NULL);
+ DBG_DTOR(OTableColumn,NULL);
+}
+
+//--------------------------------------------------------------------------
+IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumn )
+
+//------------------------------------------------------------------------------
+rtl::OUString OTableColumn::getImplementationName( ) throw (RuntimeException)
+{
+ return rtl::OUString::createFromAscii("com.sun.star.sdb.OTableColumn");
+}
+
+//------------------------------------------------------------------------------
+::cppu::IPropertyArrayHelper& SAL_CALL OTableColumn::getInfoHelper()
+{
+ return *OTableColumn_PBase::getArrayHelper();
+}
- OSL_VERIFY( _xColumn->getPropertyValue( PROPERTY_TYPENAME ) >>= m_aTypeName );
- OSL_VERIFY( _xColumn->getPropertyValue( PROPERTY_ISNULLABLE ) >>= m_nIsNullable );
- OSL_VERIFY( _xColumn->getPropertyValue( PROPERTY_PRECISION ) >>= m_nPrecision );
- OSL_VERIFY( _xColumn->getPropertyValue( PROPERTY_SCALE ) >>= m_nScale );
- OSL_VERIFY( _xColumn->getPropertyValue( PROPERTY_TYPE ) >>= m_nType );
- OSL_VERIFY( _xColumn->getPropertyValue( PROPERTY_ISAUTOINCREMENT ) >>= m_bAutoIncrement );
- OSL_VERIFY( _xColumn->getPropertyValue( PROPERTY_ISCURRENCY ) >>= m_bCurrency );
- OSL_VERIFY( _xColumn->getPropertyValue( PROPERTY_NAME ) >>= m_sName );
+//------------------------------------------------------------------------------
+::cppu::IPropertyArrayHelper* OTableColumn::createArrayHelper( ) const
+{
+ return OTableColumnDescriptor::createArrayHelper();
+}
+
+// =========================================================================
+//= OQueryColumn
+// =========================================================================
+DBG_NAME( OQueryColumn );
+
+// -------------------------------------------------------------------------
+OQueryColumn::OQueryColumn( const Reference< XPropertySet >& _rxParserColumn )
+ :OTableColumnDescriptor( false /* do not act as descriptor */ )
+{
+ const sal_Int32 nPropAttr = PropertyAttribute::READONLY;
+ registerProperty( PROPERTY_CATALOGNAME, PROPERTY_ID_CATALOGNAME, nPropAttr, &m_sCatalogName, ::getCppuType( &m_sCatalogName ) );
+ registerProperty( PROPERTY_SCHEMANAME, PROPERTY_ID_SCHEMANAME, nPropAttr, &m_sSchemaName, ::getCppuType( &m_sSchemaName ) );
+ registerProperty( PROPERTY_TABLENAME, PROPERTY_ID_TABLENAME, nPropAttr, &m_sTableName, ::getCppuType( &m_sTableName ) );
+ registerProperty( PROPERTY_REALNAME, PROPERTY_ID_REALNAME, nPropAttr, &m_sRealName, ::getCppuType( &m_sRealName ) );
+
+ DBG_CTOR( OQueryColumn, NULL );
+
+ OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_TYPENAME ) >>= m_aTypeName );
+ OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_ISNULLABLE ) >>= m_nIsNullable );
+ OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_PRECISION ) >>= m_nPrecision );
+ OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_SCALE ) >>= m_nScale );
+ 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 );
m_bRowVersion = sal_False;
- Reference< XPropertySetInfo > xPSI( _xColumn->getPropertySetInfo(), UNO_SET_THROW );
+ Reference< XPropertySetInfo > xPSI( _rxParserColumn->getPropertySetInfo(), UNO_SET_THROW );
if ( xPSI->hasPropertyByName( PROPERTY_DEFAULTVALUE ) )
- OSL_VERIFY( _xColumn->getPropertyValue( PROPERTY_DEFAULTVALUE ) >>= m_aDefaultValue );
+ OSL_VERIFY( _rxParserColumn->getPropertyValue( PROPERTY_DEFAULTVALUE ) >>= m_aDefaultValue );
// if the source column also has column settings, copy those
struct ColumnSettingDescriptor
@@ -209,70 +234,49 @@ OTableColumn::OTableColumn(const Reference<XPropertySet>& _xColumn)
{ PROPERTY_ALIGN, PROPERTY_ID_ALIGN },
{ PROPERTY_HELPTEXT, PROPERTY_ID_HELPTEXT },
{ PROPERTY_CONTROLDEFAULT, PROPERTY_ID_CONTROLDEFAULT },
- { PROPERTY_HIDDEN, PROPERTY_ID_HIDDEN }
+ { PROPERTY_HIDDEN, PROPERTY_ID_HIDDEN },
+ { PROPERTY_CATALOGNAME, PROPERTY_ID_CATALOGNAME },
+ { PROPERTY_SCHEMANAME, PROPERTY_ID_SCHEMANAME },
+ { PROPERTY_TABLENAME, PROPERTY_ID_TABLENAME },
+ { PROPERTY_REALNAME, PROPERTY_ID_REALNAME }
};
for ( size_t i=0; i < sizeof( aProps ) / sizeof( aProps[0] ); ++i )
{
if ( xPSI->hasPropertyByName( aProps[i].sName ) )
- OTableColumnDescriptor::setFastPropertyValue_NoBroadcast( aProps[i].nHandle, _xColumn->getPropertyValue( aProps[i].sName ) );
+ OTableColumnDescriptor::setFastPropertyValue_NoBroadcast( aProps[i].nHandle, _rxParserColumn->getPropertyValue( aProps[i].sName ) );
}
}
-// -----------------------------------------------------------------------------
-OTableColumn::~OTableColumn()
-{
- DBG_DTOR(OTableColumn,NULL);
-}
-
-// com::sun::star::lang::XTypeProvider
//--------------------------------------------------------------------------
-Sequence< sal_Int8 > OTableColumn::getImplementationId() throw (RuntimeException)
+OQueryColumn::~OQueryColumn()
{
- static OImplementationId * pId = 0;
- if (! pId)
- {
- MutexGuard aGuard( Mutex::getGlobalMutex() );
- if (! pId)
- {
- static OImplementationId aId;
- pId = &aId;
- }
- }
- return pId->getImplementationId();
+ DBG_DTOR( OQueryColumn, NULL );
}
-// ::com::sun::star::lang::XServiceInfo
-//------------------------------------------------------------------------------
-rtl::OUString OTableColumn::getImplementationName( ) throw (RuntimeException)
-{
- return rtl::OUString::createFromAscii("com.sun.star.sdb.OTableColumn");
-}
+//--------------------------------------------------------------------------
+IMPLEMENT_GET_IMPLEMENTATION_ID( OQueryColumn )
-//------------------------------------------------------------------------------
-Sequence< ::rtl::OUString > OTableColumn::getSupportedServiceNames( ) throw (RuntimeException)
+//--------------------------------------------------------------------------
+::rtl::OUString SAL_CALL OQueryColumn::getImplementationName( ) throw(RuntimeException)
{
- Sequence< ::rtl::OUString > aSNS( 2 );
- aSNS[0] = SERVICE_SDBCX_COLUMN;
- aSNS[1] = SERVICE_SDB_COLUMNSETTINGS;
- return aSNS;
+ return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.comp.dbaccess.OQueryColumn" ) );
}
//------------------------------------------------------------------------------
-::cppu::IPropertyArrayHelper& OTableColumn::getInfoHelper()
+::cppu::IPropertyArrayHelper& SAL_CALL OQueryColumn::getInfoHelper()
{
- return *static_cast< ::comphelper::OPropertyArrayUsageHelper< OTableColumn >* >(this)->getArrayHelper();
+ return *OQueryColumn_PBase::getArrayHelper();
}
-// comphelper::OPropertyArrayUsageHelper
-//------------------------------------------------------------------------------
-::cppu::IPropertyArrayHelper* OTableColumn::createArrayHelper( ) const
+//--------------------------------------------------------------------------
+::cppu::IPropertyArrayHelper* OQueryColumn::createArrayHelper() const
{
return OTableColumnDescriptor::createArrayHelper();
}
-//============================================================
+//==========================================================================
//= OColumnWrapper
-//============================================================
+//==========================================================================
DBG_NAME(OColumnWrapper);
//--------------------------------------------------------------------------
OColumnWrapper::OColumnWrapper( const Reference< XPropertySet > & rCol, const bool _bNameIsReadOnly )
@@ -389,20 +393,7 @@ OTableColumnDescriptorWrapper::OTableColumnDescriptorWrapper( const Reference< X
// com::sun::star::lang::XTypeProvider
//--------------------------------------------------------------------------
-Sequence< sal_Int8 > OTableColumnDescriptorWrapper::getImplementationId() throw (RuntimeException)
-{
- static OImplementationId * pId = 0;
- if (! pId)
- {
- MutexGuard aGuard( Mutex::getGlobalMutex() );
- if (! pId)
- {
- static OImplementationId aId;
- pId = &aId;
- }
- }
- return pId->getImplementationId();
-}
+IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumnDescriptorWrapper )
// ::com::sun::star::lang::XServiceInfo
//------------------------------------------------------------------------------
@@ -589,20 +580,7 @@ OTableColumnWrapper::~OTableColumnWrapper()
// com::sun::star::lang::XTypeProvider
//--------------------------------------------------------------------------
-Sequence< sal_Int8 > OTableColumnWrapper::getImplementationId() throw (RuntimeException)
-{
- static OImplementationId * pId = 0;
- if (! pId)
- {
- MutexGuard aGuard( Mutex::getGlobalMutex() );
- if (! pId)
- {
- static OImplementationId aId;
- pId = &aId;
- }
- }
- return pId->getImplementationId();
-}
+IMPLEMENT_GET_IMPLEMENTATION_ID( OTableColumnWrapper )
// ::com::sun::star::lang::XServiceInfo
//------------------------------------------------------------------------------
diff --git a/dbaccess/source/core/api/query.cxx b/dbaccess/source/core/api/query.cxx
index 489ca625c5d7..1f887a737e30 100644
--- a/dbaccess/source/core/api/query.cxx
+++ b/dbaccess/source/core/api/query.cxx
@@ -241,13 +241,12 @@ void OQuery::rebuildColumns()
for ( ;pBegin != pEnd; ++pBegin)
{
Reference<XPropertySet> xSource(xColumns->getByName( *pBegin ),UNO_QUERY);
- OTableColumn* pColumn = new OTableColumn( xSource );
- Reference<XChild> xChild(*pColumn,UNO_QUERY);
- if ( xChild.is() )
- xChild->setParent(*this);
+ OQueryColumn* pColumn = new OQueryColumn( xSource );
+ Reference< XChild > xChild( *pColumn, UNO_QUERY_THROW );
+ xChild->setParent( *this );
implAppendColumn( *pBegin, pColumn );
- Reference<XPropertySet> xDest(*pColumn,UNO_QUERY);
+ Reference< XPropertySet > xDest( *pColumn, UNO_QUERY_THROW );
if ( m_pColumnMediator.is() )
m_pColumnMediator->notifyElementCreated( *pBegin, xDest );
}
diff --git a/dbaccess/source/core/api/querycontainer.cxx b/dbaccess/source/core/api/querycontainer.cxx
index f86a1a8bf6e5..2d75ce3bf8bd 100644
--- a/dbaccess/source/core/api/querycontainer.cxx
+++ b/dbaccess/source/core/api/querycontainer.cxx
@@ -163,6 +163,10 @@ OQueryContainer::~OQueryContainer()
}
// -----------------------------------------------------------------------------
IMPLEMENT_FORWARD_XINTERFACE2( OQueryContainer,ODefinitionContainer,OQueryContainer_Base)
+
+//------------------------------------------------------------------------------
+IMPLEMENT_FORWARD_XTYPEPROVIDER2( OQueryContainer,ODefinitionContainer,OQueryContainer_Base)
+
//------------------------------------------------------------------------------
void OQueryContainer::disposing()
{
diff --git a/dbaccess/source/core/api/querydescriptor.cxx b/dbaccess/source/core/api/querydescriptor.cxx
index a666d250f07c..00b3a247aed5 100644
--- a/dbaccess/source/core/api/querydescriptor.cxx
+++ b/dbaccess/source/core/api/querydescriptor.cxx
@@ -265,7 +265,7 @@ Reference< XNameAccess > SAL_CALL OQueryDescriptor_Base::getColumns( ) throw (Ru
{
rebuildColumns();
}
- catch(...)
+ catch ( const Exception& )
{
setColumnsOutOfDate( sal_True );
throw;
@@ -336,9 +336,10 @@ void OQueryDescriptor_Base::refreshColumns()
}
//------------------------------------------------------------------------------
-OColumn* OQueryDescriptor_Base::createColumn(const ::rtl::OUString& _rName) const
+OColumn* OQueryDescriptor_Base::createColumn( const ::rtl::OUString& /*_rName*/ ) const
{
- return new OTableColumn(_rName);
+ // creating a column/descriptor for a query/descriptor does not make sense at all
+ return NULL;
}
// -----------------------------------------------------------------------------
//........................................................................
diff --git a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
index 81ad98dfc97b..678ed2ce612e 100644
--- a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
+++ b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
@@ -282,6 +282,8 @@ OColumn* OComponentDefinition::createColumn(const ::rtl::OUString& _rName) const
aFind->second->addPropertyChangeListener(::rtl::OUString(),m_xColumnPropertyListener.getRef());
return new OTableColumnWrapper( aFind->second, aFind->second, true );
}
+ OSL_ENSURE( false, "OComponentDefinition::createColumn: is this a valid case?" );
+ // This here is the last place creating a OTableColumn, and somehow /me thinks it is not needed ...
return new OTableColumn( _rName );
}
// -----------------------------------------------------------------------------
diff --git a/dbaccess/source/core/inc/definitioncolumn.hxx b/dbaccess/source/core/inc/definitioncolumn.hxx
index 85800355ddfa..366797ee5cdf 100644
--- a/dbaccess/source/core/inc/definitioncolumn.hxx
+++ b/dbaccess/source/core/inc/definitioncolumn.hxx
@@ -47,6 +47,9 @@ namespace dbaccess
{
typedef ::cppu::ImplHelper1< ::com::sun::star::container::XChild > TXChild;
+ // =========================================================================
+ //= OTableColumnDescriptor
+ // =========================================================================
/**
* provides the properties for description. A descriptor could be used to create a new table column.
*/
@@ -55,7 +58,9 @@ namespace dbaccess
,public ::comphelper::OPropertyArrayUsageHelper < OTableColumnDescriptor >
,public TXChild
{
- ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xParent;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xParent;
+ const bool m_bActAsDescriptor;
+
protected:
// <properties>
rtl::OUString m_aTypeName;
@@ -74,6 +79,7 @@ namespace dbaccess
public:
OTableColumnDescriptor( const bool _bActAsDescriptor )
:OColumn( !_bActAsDescriptor )
+ ,m_bActAsDescriptor( _bActAsDescriptor )
,m_nType( ::com::sun::star::sdbc::DataType::SQLNULL )
,m_nPrecision( 0 )
,m_nScale( 0 )
@@ -82,7 +88,7 @@ namespace dbaccess
,m_bRowVersion( sal_False )
,m_bCurrency( sal_False )
{
- impl_registerProperties( _bActAsDescriptor );
+ impl_registerProperties();
}
DECLARE_XINTERFACE( )
@@ -110,37 +116,76 @@ namespace dbaccess
virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException);
private:
- void impl_registerProperties( const bool _bActAsDescriptor );
+ void impl_registerProperties();
protected:
using OColumn::getFastPropertyValue;
};
- /** describes a column of a table or query
+ // =========================================================================
+ // = OTableColumn
+ // =========================================================================
+ class OTableColumn;
+ typedef ::comphelper::OPropertyArrayUsageHelper < OTableColumn > OTableColumn_PBase;
+ /** describes a column of a table
*/
class OTableColumn :public OTableColumnDescriptor
- ,public ::comphelper::OPropertyArrayUsageHelper < OTableColumn >
+ ,public OTableColumn_PBase
{
- friend class ODBTable;
-
protected:
virtual ~OTableColumn();
+
public:
OTableColumn(const ::rtl::OUString& _rName);
- OTableColumn(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _xColumn);
- // com::sun::star::lang::XTypeProvider
+ // XTypeProvider
virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException);
- // ::com::sun::star::lang::XServiceInfo
+ // XServiceInfo
virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
- // ::comphelper::OPropertyArrayUsageHelper
+ // OPropertyArrayUsageHelper
+ virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const;
+ };
+
+ // =========================================================================
+ // = OQueryColumn
+ // =========================================================================
+ class OQueryColumn;
+ typedef ::comphelper::OPropertyArrayUsageHelper< OQueryColumn > OQueryColumn_PBase;
+ /** a column of a Query, with additional information obtained from parsing the query statement
+ */
+ class OQueryColumn :public OTableColumnDescriptor
+ ,public OQueryColumn_PBase
+ {
+ // <properties>
+ ::rtl::OUString m_sCatalogName;
+ ::rtl::OUString m_sSchemaName;
+ ::rtl::OUString m_sTableName;
+ ::rtl::OUString m_sRealName;
+ // </properties>
+
+ protected:
+ ~OQueryColumn();
+
+ public:
+ OQueryColumn( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet>& _rxParserColumn );
+
+ // XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
+
+ // OPropertyArrayUsageHelper
virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+ virtual ::cppu::IPropertyArrayHelper* createArrayHelper() const;
};
+ // =========================================================================
+ // = OColumnWrapper
+ // =========================================================================
/**
* describes all properties for a columns of a table. Only the view parts are provided
* directly, all the other parts are derived from a driver implementation
@@ -184,6 +229,9 @@ namespace dbaccess
using OColumn::getFastPropertyValue;
};
+ // =========================================================================
+ // = OTableColumnDescriptorWrapper
+ // =========================================================================
/**
* provides the properties for description. A descriptor could be used to create a new table column.
*/
@@ -234,6 +282,9 @@ namespace dbaccess
using OColumnWrapper::getFastPropertyValue;
};
+ // =========================================================================
+ // = OTableColumnWrapper
+ // =========================================================================
/**
* describes all properties for a columns of a table. Only the view parts are provided
* directly, all the other parts are derived from a driver implementation
diff --git a/dbaccess/source/core/inc/querycontainer.hxx b/dbaccess/source/core/inc/querycontainer.hxx
index ac3d61bac8d1..6d8b523ec84c 100644
--- a/dbaccess/source/core/inc/querycontainer.hxx
+++ b/dbaccess/source/core/inc/querycontainer.hxx
@@ -180,7 +180,7 @@ namespace dbaccess
);
DECLARE_XINTERFACE( )
- // ::com::sun::star::lang::XServiceInfo
+ DECLARE_XTYPEPROVIDER( )
DECLARE_SERVICE_INFO();
// ::com::sun::star::container::XContainerListener
diff --git a/dbaccess/source/core/misc/ContainerMediator.cxx b/dbaccess/source/core/misc/ContainerMediator.cxx
index c116928ce267..c50e5559ed36 100644
--- a/dbaccess/source/core/misc/ContainerMediator.cxx
+++ b/dbaccess/source/core/misc/ContainerMediator.cxx
@@ -228,7 +228,9 @@ Reference< XPropertySet > OContainerMediator::impl_getSettingsForInitialization_
try
{
if ( m_xSettings.is() && m_xSettings->hasByName( _rName ) )
+ {
OSL_VERIFY( m_xSettings->getByName( _rName ) >>= xSettings );
+ }
else if ( m_eType == eColumns )
{
do // artifial loop for easier flow control