1*96de5490SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*96de5490SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*96de5490SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*96de5490SAndrew Rist  * distributed with this work for additional information
6*96de5490SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*96de5490SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*96de5490SAndrew Rist  * "License"); you may not use this file except in compliance
9*96de5490SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*96de5490SAndrew Rist  *
11*96de5490SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*96de5490SAndrew Rist  *
13*96de5490SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*96de5490SAndrew Rist  * software distributed under the License is distributed on an
15*96de5490SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*96de5490SAndrew Rist  * KIND, either express or implied.  See the License for the
17*96de5490SAndrew Rist  * specific language governing permissions and limitations
18*96de5490SAndrew Rist  * under the License.
19*96de5490SAndrew Rist  *
20*96de5490SAndrew Rist  *************************************************************/
21*96de5490SAndrew Rist 
22*96de5490SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_dbaccess.hxx"
26cdf0e10cSrcweir 
27cdf0e10cSrcweir #ifndef DBA_COREDATAACESS_COMPONENTDEFINITION_HXX
28cdf0e10cSrcweir #include "ComponentDefinition.hxx"
29cdf0e10cSrcweir #endif
30cdf0e10cSrcweir #ifndef _DBASHARED_APITOOLS_HXX_
31cdf0e10cSrcweir #include "apitools.hxx"
32cdf0e10cSrcweir #endif
33cdf0e10cSrcweir #ifndef DBACCESS_SHARED_DBASTRINGS_HRC
34cdf0e10cSrcweir #include "dbastrings.hrc"
35cdf0e10cSrcweir #endif
36cdf0e10cSrcweir #include "module_dba.hxx"
37cdf0e10cSrcweir 
38cdf0e10cSrcweir #ifndef _TOOLS_DEBUG_HXX
39cdf0e10cSrcweir #include <tools/debug.hxx>
40cdf0e10cSrcweir #endif
41cdf0e10cSrcweir #ifndef _COMPHELPER_SEQUENCE_HXX_
42cdf0e10cSrcweir #include <comphelper/sequence.hxx>
43cdf0e10cSrcweir #endif
44cdf0e10cSrcweir #ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HPP_
45cdf0e10cSrcweir #include <com/sun/star/lang/DisposedException.hpp>
46cdf0e10cSrcweir #endif
47cdf0e10cSrcweir #ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_
48cdf0e10cSrcweir #include <com/sun/star/beans/PropertyAttribute.hpp>
49cdf0e10cSrcweir #endif
50cdf0e10cSrcweir #ifndef _COMPHELPER_PROPERTY_HXX_
51cdf0e10cSrcweir #include <comphelper/property.hxx>
52cdf0e10cSrcweir #endif
53cdf0e10cSrcweir #ifndef _DBACORE_DEFINITIONCOLUMN_HXX_
54cdf0e10cSrcweir #include "definitioncolumn.hxx"
55cdf0e10cSrcweir #endif
56cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx>
57cdf0e10cSrcweir #include <comphelper/componentcontext.hxx>
58cdf0e10cSrcweir 
59cdf0e10cSrcweir using namespace ::com::sun::star::uno;
60cdf0e10cSrcweir using namespace ::com::sun::star::sdbc;
61cdf0e10cSrcweir using namespace ::com::sun::star::lang;
62cdf0e10cSrcweir 
63cdf0e10cSrcweir using namespace ::com::sun::star::beans;
64cdf0e10cSrcweir using namespace ::com::sun::star::container;
65cdf0e10cSrcweir using namespace ::osl;
66cdf0e10cSrcweir using namespace ::comphelper;
67cdf0e10cSrcweir using namespace ::cppu;
68cdf0e10cSrcweir 
createRegistryInfo_OComponentDefinition()69cdf0e10cSrcweir extern "C" void SAL_CALL createRegistryInfo_OComponentDefinition()
70cdf0e10cSrcweir {
71cdf0e10cSrcweir 	static ::dba::OAutoRegistration< ::dbaccess::OComponentDefinition > aAutoRegistration;
72cdf0e10cSrcweir }
73cdf0e10cSrcweir 
74cdf0e10cSrcweir //........................................................................
75cdf0e10cSrcweir namespace dbaccess
76cdf0e10cSrcweir {
77cdf0e10cSrcweir //........................................................................
78cdf0e10cSrcweir /// helper class for column property change events which holds the OComponentDefinition weak
79cdf0e10cSrcweir typedef ::cppu::WeakImplHelper1	< XPropertyChangeListener > TColumnPropertyListener_BASE;
80cdf0e10cSrcweir class OColumnPropertyListener : public TColumnPropertyListener_BASE
81cdf0e10cSrcweir {
82cdf0e10cSrcweir     OComponentDefinition* m_pComponent;
83cdf0e10cSrcweir 
84cdf0e10cSrcweir     OColumnPropertyListener(const OColumnPropertyListener&);
85cdf0e10cSrcweir     void operator =(const OColumnPropertyListener&);
86cdf0e10cSrcweir protected:
~OColumnPropertyListener()87cdf0e10cSrcweir     virtual ~OColumnPropertyListener(){}
88cdf0e10cSrcweir public:
OColumnPropertyListener(OComponentDefinition * _pComponent)89cdf0e10cSrcweir     OColumnPropertyListener(OComponentDefinition* _pComponent) : m_pComponent(_pComponent){}
90cdf0e10cSrcweir     // XPropertyChangeListener
propertyChange(const PropertyChangeEvent &)91cdf0e10cSrcweir 	virtual void SAL_CALL propertyChange( const PropertyChangeEvent& /*_rEvent*/ ) throw (RuntimeException)
92cdf0e10cSrcweir     {
93cdf0e10cSrcweir         if ( m_pComponent )
94cdf0e10cSrcweir             m_pComponent->notifyDataSourceModified();
95cdf0e10cSrcweir     }
96cdf0e10cSrcweir 	// XEventListener
disposing(const EventObject &)97cdf0e10cSrcweir 	virtual void SAL_CALL disposing( const EventObject& /*_rSource*/ ) throw (RuntimeException)
98cdf0e10cSrcweir     {
99cdf0e10cSrcweir     }
clear()100cdf0e10cSrcweir     void clear() { m_pComponent = NULL; }
101cdf0e10cSrcweir };
DBG_NAME(OComponentDefinition_Impl)102cdf0e10cSrcweir DBG_NAME(OComponentDefinition_Impl)
103cdf0e10cSrcweir OComponentDefinition_Impl::OComponentDefinition_Impl()
104cdf0e10cSrcweir {
105cdf0e10cSrcweir     DBG_CTOR(OComponentDefinition_Impl,NULL);
106cdf0e10cSrcweir }
107cdf0e10cSrcweir // -----------------------------------------------------------------------------
~OComponentDefinition_Impl()108cdf0e10cSrcweir OComponentDefinition_Impl::~OComponentDefinition_Impl()
109cdf0e10cSrcweir {
110cdf0e10cSrcweir     DBG_DTOR(OComponentDefinition_Impl,NULL);
111cdf0e10cSrcweir }
112cdf0e10cSrcweir //==========================================================================
113cdf0e10cSrcweir //= OComponentDefinition
114cdf0e10cSrcweir //==========================================================================
115cdf0e10cSrcweir //--------------------------------------------------------------------------
DBG_NAME(OComponentDefinition)116cdf0e10cSrcweir DBG_NAME(OComponentDefinition)
117cdf0e10cSrcweir //--------------------------------------------------------------------------
118cdf0e10cSrcweir void OComponentDefinition::registerProperties()
119cdf0e10cSrcweir {
120cdf0e10cSrcweir     m_xColumnPropertyListener = ::comphelper::ImplementationReference<OColumnPropertyListener,XPropertyChangeListener>(new OColumnPropertyListener(this));
121cdf0e10cSrcweir 	OComponentDefinition_Impl& rDefinition( getDefinition() );
122cdf0e10cSrcweir     ODataSettings::registerPropertiesFor( &rDefinition );
123cdf0e10cSrcweir 
124cdf0e10cSrcweir 	registerProperty(PROPERTY_NAME, PROPERTY_ID_NAME, PropertyAttribute::BOUND | PropertyAttribute::READONLY|PropertyAttribute::CONSTRAINED,
125cdf0e10cSrcweir 					&rDefinition.m_aProps.aTitle, ::getCppuType(&rDefinition.m_aProps.aTitle));
126cdf0e10cSrcweir 
127cdf0e10cSrcweir 	if ( m_bTable )
128cdf0e10cSrcweir 	{
129cdf0e10cSrcweir 		registerProperty(PROPERTY_SCHEMANAME, PROPERTY_ID_SCHEMANAME, PropertyAttribute::BOUND,
130cdf0e10cSrcweir 						&rDefinition.m_sSchemaName, ::getCppuType(&rDefinition.m_sSchemaName));
131cdf0e10cSrcweir 
132cdf0e10cSrcweir 		registerProperty(PROPERTY_CATALOGNAME, PROPERTY_ID_CATALOGNAME, PropertyAttribute::BOUND,
133cdf0e10cSrcweir 						&rDefinition.m_sCatalogName, ::getCppuType(&rDefinition.m_sCatalogName));
134cdf0e10cSrcweir 	}
135cdf0e10cSrcweir }
136cdf0e10cSrcweir 
137cdf0e10cSrcweir //--------------------------------------------------------------------------
OComponentDefinition(const Reference<XMultiServiceFactory> & _xORB,const Reference<XInterface> & _xParentContainer,const TContentPtr & _pImpl,sal_Bool _bTable)138cdf0e10cSrcweir OComponentDefinition::OComponentDefinition(const Reference< XMultiServiceFactory >& _xORB
139cdf0e10cSrcweir 										   ,const Reference< XInterface >&	_xParentContainer
140cdf0e10cSrcweir 										   ,const TContentPtr& _pImpl
141cdf0e10cSrcweir 										   ,sal_Bool _bTable)
142cdf0e10cSrcweir 	:OContentHelper(_xORB,_xParentContainer,_pImpl)
143cdf0e10cSrcweir 	,ODataSettings(OContentHelper::rBHelper,!_bTable)
144cdf0e10cSrcweir 	,m_bTable(_bTable)
145cdf0e10cSrcweir {
146cdf0e10cSrcweir 	DBG_CTOR(OComponentDefinition, NULL);
147cdf0e10cSrcweir 	registerProperties();
148cdf0e10cSrcweir }
149cdf0e10cSrcweir //--------------------------------------------------------------------------
~OComponentDefinition()150cdf0e10cSrcweir OComponentDefinition::~OComponentDefinition()
151cdf0e10cSrcweir {
152cdf0e10cSrcweir 	DBG_DTOR(OComponentDefinition, NULL);
153cdf0e10cSrcweir }
154cdf0e10cSrcweir 
155cdf0e10cSrcweir //--------------------------------------------------------------------------
OComponentDefinition(const Reference<XInterface> & _rxContainer,const::rtl::OUString & _rElementName,const Reference<XMultiServiceFactory> & _xORB,const TContentPtr & _pImpl,sal_Bool _bTable)156cdf0e10cSrcweir OComponentDefinition::OComponentDefinition(	const Reference< XInterface >& _rxContainer
157cdf0e10cSrcweir 									   ,const ::rtl::OUString& _rElementName
158cdf0e10cSrcweir 									   ,const Reference< XMultiServiceFactory >& _xORB
159cdf0e10cSrcweir 									   ,const TContentPtr& _pImpl
160cdf0e10cSrcweir 									   ,sal_Bool _bTable)
161cdf0e10cSrcweir 	:OContentHelper(_xORB,_rxContainer,_pImpl)
162cdf0e10cSrcweir 	,ODataSettings(OContentHelper::rBHelper,!_bTable)
163cdf0e10cSrcweir 	,m_bTable(_bTable)
164cdf0e10cSrcweir {
165cdf0e10cSrcweir 	DBG_CTOR(OComponentDefinition, NULL);
166cdf0e10cSrcweir 	registerProperties();
167cdf0e10cSrcweir 
168cdf0e10cSrcweir 	m_pImpl->m_aProps.aTitle = _rElementName;
169cdf0e10cSrcweir 	DBG_ASSERT(m_pImpl->m_aProps.aTitle.getLength() != 0, "OComponentDefinition::OComponentDefinition : invalid name !");
170cdf0e10cSrcweir }
171cdf0e10cSrcweir 
172cdf0e10cSrcweir //--------------------------------------------------------------------------
173cdf0e10cSrcweir IMPLEMENT_IMPLEMENTATION_ID(OComponentDefinition);
174cdf0e10cSrcweir IMPLEMENT_GETTYPES3(OComponentDefinition,ODataSettings,OContentHelper,OComponentDefinition_BASE);
IMPLEMENT_FORWARD_XINTERFACE3(OComponentDefinition,OContentHelper,ODataSettings,OComponentDefinition_BASE)175cdf0e10cSrcweir IMPLEMENT_FORWARD_XINTERFACE3( OComponentDefinition,OContentHelper,ODataSettings,OComponentDefinition_BASE)
176cdf0e10cSrcweir //--------------------------------------------------------------------------
177cdf0e10cSrcweir ::rtl::OUString OComponentDefinition::getImplementationName_static(  ) throw(RuntimeException)
178cdf0e10cSrcweir {
179cdf0e10cSrcweir 	return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.dba.OComponentDefinition"));
180cdf0e10cSrcweir }
181cdf0e10cSrcweir 
182cdf0e10cSrcweir //--------------------------------------------------------------------------
getImplementationName()183cdf0e10cSrcweir ::rtl::OUString SAL_CALL OComponentDefinition::getImplementationName(  ) throw(RuntimeException)
184cdf0e10cSrcweir {
185cdf0e10cSrcweir 	return getImplementationName_static();
186cdf0e10cSrcweir }
187cdf0e10cSrcweir 
188cdf0e10cSrcweir //--------------------------------------------------------------------------
getSupportedServiceNames_static()189cdf0e10cSrcweir Sequence< ::rtl::OUString > OComponentDefinition::getSupportedServiceNames_static(  ) throw(RuntimeException)
190cdf0e10cSrcweir {
191cdf0e10cSrcweir 	Sequence< ::rtl::OUString > aServices(2);
192cdf0e10cSrcweir 	aServices.getArray()[0] = SERVICE_SDB_TABLEDEFINITION;
193cdf0e10cSrcweir 	aServices.getArray()[1] = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.Content"));
194cdf0e10cSrcweir 
195cdf0e10cSrcweir 	return aServices;
196cdf0e10cSrcweir }
197cdf0e10cSrcweir 
198cdf0e10cSrcweir //--------------------------------------------------------------------------
getSupportedServiceNames()199cdf0e10cSrcweir Sequence< ::rtl::OUString > SAL_CALL OComponentDefinition::getSupportedServiceNames(  ) throw(RuntimeException)
200cdf0e10cSrcweir {
201cdf0e10cSrcweir 	return getSupportedServiceNames_static();
202cdf0e10cSrcweir }
203cdf0e10cSrcweir //------------------------------------------------------------------------------
Create(const Reference<XComponentContext> & _rxContext)204cdf0e10cSrcweir Reference< XInterface > OComponentDefinition::Create( const Reference< XComponentContext >& _rxContext )
205cdf0e10cSrcweir {
206cdf0e10cSrcweir     ::comphelper::ComponentContext aContext( _rxContext );
207cdf0e10cSrcweir 	return *(new OComponentDefinition( aContext.getLegacyServiceFactory(), NULL, TContentPtr( new OComponentDefinition_Impl ) ) );
208cdf0e10cSrcweir }
209cdf0e10cSrcweir // -----------------------------------------------------------------------------
disposing()210cdf0e10cSrcweir void SAL_CALL OComponentDefinition::disposing()
211cdf0e10cSrcweir {
212cdf0e10cSrcweir 	OContentHelper::disposing();
213cdf0e10cSrcweir     if ( m_pColumns.get() )
214cdf0e10cSrcweir 	    m_pColumns->disposing();
215cdf0e10cSrcweir     m_xColumnPropertyListener->clear();
216cdf0e10cSrcweir     m_xColumnPropertyListener.dispose();
217cdf0e10cSrcweir }
218cdf0e10cSrcweir // -----------------------------------------------------------------------------
getInfoHelper()219cdf0e10cSrcweir IPropertyArrayHelper& OComponentDefinition::getInfoHelper()
220cdf0e10cSrcweir {
221cdf0e10cSrcweir 	return *getArrayHelper();
222cdf0e10cSrcweir }
223cdf0e10cSrcweir //--------------------------------------------------------------------------
createArrayHelper() const224cdf0e10cSrcweir IPropertyArrayHelper* OComponentDefinition::createArrayHelper( ) const
225cdf0e10cSrcweir {
226cdf0e10cSrcweir 	Sequence< Property > aProps;
227cdf0e10cSrcweir 	describeProperties(aProps);
228cdf0e10cSrcweir 	return new OPropertyArrayHelper(aProps);
229cdf0e10cSrcweir }
230cdf0e10cSrcweir //--------------------------------------------------------------------------
getPropertySetInfo()231cdf0e10cSrcweir Reference< XPropertySetInfo > SAL_CALL OComponentDefinition::getPropertySetInfo(  ) throw(RuntimeException)
232cdf0e10cSrcweir {
233cdf0e10cSrcweir 	Reference<XPropertySetInfo> xInfo( createPropertySetInfo( getInfoHelper() ) );
234cdf0e10cSrcweir 	return xInfo;
235cdf0e10cSrcweir }
236cdf0e10cSrcweir 
237cdf0e10cSrcweir // -----------------------------------------------------------------------------
determineContentType() const238cdf0e10cSrcweir ::rtl::OUString OComponentDefinition::determineContentType() const
239cdf0e10cSrcweir {
240cdf0e10cSrcweir     return m_bTable
241cdf0e10cSrcweir         ?   ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.org.openoffice.DatabaseTable" ) )
242cdf0e10cSrcweir         :   ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "application/vnd.org.openoffice.DatabaseCommandDefinition" ) );
243cdf0e10cSrcweir }
244cdf0e10cSrcweir 
245cdf0e10cSrcweir // -----------------------------------------------------------------------------
getColumns()246cdf0e10cSrcweir Reference< XNameAccess> OComponentDefinition::getColumns() throw (RuntimeException)
247cdf0e10cSrcweir {
248cdf0e10cSrcweir 	::osl::MutexGuard aGuard(m_aMutex);
249cdf0e10cSrcweir 	::connectivity::checkDisposed(OContentHelper::rBHelper.bDisposed);
250cdf0e10cSrcweir 
251cdf0e10cSrcweir 	if ( !m_pColumns.get() )
252cdf0e10cSrcweir 	{
253cdf0e10cSrcweir         ::std::vector< ::rtl::OUString> aNames;
254cdf0e10cSrcweir 
255cdf0e10cSrcweir         const OComponentDefinition_Impl& rDefinition( getDefinition() );
256cdf0e10cSrcweir 		aNames.reserve( rDefinition.size() );
257cdf0e10cSrcweir 
258cdf0e10cSrcweir         OComponentDefinition_Impl::const_iterator aIter = rDefinition.begin();
259cdf0e10cSrcweir 		OComponentDefinition_Impl::const_iterator aEnd = rDefinition.end();
260cdf0e10cSrcweir 		for ( ; aIter != aEnd; ++aIter )
261cdf0e10cSrcweir 			aNames.push_back( aIter->first );
262cdf0e10cSrcweir 
263cdf0e10cSrcweir         m_pColumns.reset( new OColumns( *this, m_aMutex, sal_True, aNames, this, NULL, sal_True, sal_False, sal_False ) );
264cdf0e10cSrcweir 		m_pColumns->setParent( *this );
265cdf0e10cSrcweir 	}
266cdf0e10cSrcweir 	return m_pColumns.get();
267cdf0e10cSrcweir }
268cdf0e10cSrcweir // -----------------------------------------------------------------------------
createColumn(const::rtl::OUString & _rName) const269cdf0e10cSrcweir OColumn* OComponentDefinition::createColumn(const ::rtl::OUString& _rName) const
270cdf0e10cSrcweir {
271cdf0e10cSrcweir     const OComponentDefinition_Impl& rDefinition( getDefinition() );
272cdf0e10cSrcweir     OComponentDefinition_Impl::const_iterator aFind = rDefinition.find( _rName );
273cdf0e10cSrcweir 	if ( aFind != rDefinition.end() )
274cdf0e10cSrcweir     {
275cdf0e10cSrcweir         aFind->second->addPropertyChangeListener(::rtl::OUString(),m_xColumnPropertyListener.getRef());
276cdf0e10cSrcweir 		return new OTableColumnWrapper( aFind->second, aFind->second, true );
277cdf0e10cSrcweir     }
278cdf0e10cSrcweir     OSL_ENSURE( false, "OComponentDefinition::createColumn: is this a valid case?" );
279cdf0e10cSrcweir         // This here is the last place creating a OTableColumn, and somehow /me thinks it is not needed ...
280cdf0e10cSrcweir 	return new OTableColumn( _rName );
281cdf0e10cSrcweir }
282cdf0e10cSrcweir // -----------------------------------------------------------------------------
createColumnDescriptor()283cdf0e10cSrcweir Reference< XPropertySet > OComponentDefinition::createColumnDescriptor()
284cdf0e10cSrcweir {
285cdf0e10cSrcweir 	return new OTableColumnDescriptor( true );
286cdf0e10cSrcweir }
287cdf0e10cSrcweir // -----------------------------------------------------------------------------
setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any & rValue)288cdf0e10cSrcweir void OComponentDefinition::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue) throw (Exception)
289cdf0e10cSrcweir {
290cdf0e10cSrcweir 	ODataSettings::setFastPropertyValue_NoBroadcast(nHandle,rValue);
291cdf0e10cSrcweir 	notifyDataSourceModified();
292cdf0e10cSrcweir }
293cdf0e10cSrcweir // -----------------------------------------------------------------------------
columnDropped(const::rtl::OUString & _sName)294cdf0e10cSrcweir void OComponentDefinition::columnDropped(const ::rtl::OUString& _sName)
295cdf0e10cSrcweir {
296cdf0e10cSrcweir     getDefinition().erase( _sName );
297cdf0e10cSrcweir 	notifyDataSourceModified();
298cdf0e10cSrcweir }
299cdf0e10cSrcweir // -----------------------------------------------------------------------------
columnAppended(const Reference<XPropertySet> & _rxSourceDescriptor)300cdf0e10cSrcweir void OComponentDefinition::columnAppended( const Reference< XPropertySet >& _rxSourceDescriptor )
301cdf0e10cSrcweir {
302cdf0e10cSrcweir 	::rtl::OUString sName;
303cdf0e10cSrcweir 	_rxSourceDescriptor->getPropertyValue( PROPERTY_NAME ) >>= sName;
304cdf0e10cSrcweir 
305cdf0e10cSrcweir     Reference<XPropertySet> xColDesc = new OTableColumnDescriptor( true );
306cdf0e10cSrcweir 	::comphelper::copyProperties( _rxSourceDescriptor, xColDesc );
307cdf0e10cSrcweir     getDefinition().insert( sName, xColDesc );
308cdf0e10cSrcweir 
309cdf0e10cSrcweir     // formerly, here was a setParent at the xColDesc. The parent used was an adapter (ChildHelper_Impl)
310cdf0e10cSrcweir     // which held another XChild weak, and forwarded all getParent requests to this other XChild.
311cdf0e10cSrcweir     // m_pColumns was used for this. This was nonsense, since m_pColumns dies when our instance dies,
312cdf0e10cSrcweir     // but xColDesc will live longer than this. So effectively, the setParent call was pretty useless.
313cdf0e10cSrcweir     //
314cdf0e10cSrcweir     // The intention for this parenting was that the column descriptor is able to find the data source,
315cdf0e10cSrcweir     // by traveling up the parent hierachy until there's an XDataSource. This didn't work (which
316cdf0e10cSrcweir     // for instance causes #i65023#). We need another way to properly ensure this.
317cdf0e10cSrcweir 
318cdf0e10cSrcweir     notifyDataSourceModified();
319cdf0e10cSrcweir }
320cdf0e10cSrcweir 
321cdf0e10cSrcweir //........................................................................
322cdf0e10cSrcweir }	// namespace dbaccess
323cdf0e10cSrcweir //........................................................................
324cdf0e10cSrcweir 
325