if (xConnection != null)
{
com.sun.star.container.XChild child = UnoRuntime.queryInterface( com.sun.star.container.XChild.class, xConnection );
m_dataSource = UnoRuntime.queryInterface( XDataSource.class, child.getParent() );
XDocumentDataSource xDocu = UnoRuntime.queryInterface( XDocumentDataSource.class, m_dataSource );
if (xDocu != null)
{
xModel = xDocu.getDatabaseDocument();
}
XPropertySet xPSet = UnoRuntime.queryInterface( XPropertySet.class, m_dataSource );
if (xPSet != null)
{
DataSourceName = AnyConverter.toString(xPSet.getPropertyValue("Name"));
}
return getConnection(xConnection);
}
else
{
bdisposeConnection = true;
}
}
else
{
bdisposeConnection = true;
}
if (Properties.hasPropertyValue(curproperties, "DataSourceName"))
{
String sDataSourceName = AnyConverter.toString(Properties.getPropertyValue(curproperties, "DataSourceName"));
return getConnection(sDataSourceName);
}
else if (Properties.hasPropertyValue(curproperties, "DataSource"))
{
m_dataSource = UnoRuntime.queryInterface( XDataSource.class, Properties.getPropertyValue( curproperties, "DataSource" ) );
XDocumentDataSource xDocu = UnoRuntime.queryInterface( XDocumentDataSource.class, this.m_dataSource );
if (xDocu != null)
{
xModel = xDocu.getDatabaseDocument();
}
return getConnection(m_dataSource);
}
if (Properties.hasPropertyValue(curproperties, "DatabaseLocation"))
{