Tag: cws_src680_qiq User: fs Date: 06/05/12 07:34:44 Modified: /dba/dbaccess/source/ui/app/ AppControllerGen.cxx
Log: #i51143# when creating a view from a query, substitute sub queries File Changes: Directory: /dba/dbaccess/source/ui/app/ ======================================= File [changed]: AppControllerGen.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/app/AppControllerGen.cxx?r1=1.17&r2=1.17.24.1 Delta lines: +27 -39 --------------------- --- AppControllerGen.cxx 29 Mar 2006 12:36:08 -0000 1.17 +++ AppControllerGen.cxx 12 May 2006 14:34:42 -0000 1.17.24.1 @@ -4,9 +4,9 @@ * * $RCSfile: AppControllerGen.cxx,v $ * - * $Revision: 1.17 $ + * $Revision: 1.17.24.1 $ * - * last change: $Author: obo $ $Date: 2006/03/29 12:36:08 $ + * last change: $Author: fs $ $Date: 2006/05/12 14:34:42 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -153,23 +153,14 @@ try { SharedConnection xConnection( getConnection() ); - Reference<XQueriesSupplier> xSup(xConnection,UNO_QUERY); - if ( xSup.is() ) - { - Reference<XNameAccess> xQueries = xSup->getQueries(); - if ( xQueries.is() && xQueries->hasByName(_sName) ) - { - Reference<XPropertySet> xSourceObject(xQueries->getByName( _sName ),UNO_QUERY); + Reference< XQueriesSupplier > xSup( xConnection, UNO_QUERY_THROW ); + Reference< XNameAccess > xQueries( xSup->getQueries(), UNO_QUERY_THROW ); + Reference< XPropertySet > xSourceObject( xQueries->getByName( _sName ), UNO_QUERY_THROW ); - OSL_ENSURE(xSourceObject.is(),"Query is NULL!"); - if ( xSourceObject.is() ) - { - Reference<XTablesSupplier> xTablesSup(xConnection,UNO_QUERY); - Reference<XNameAccess> xTables; - if ( xTablesSup.is() ) - xTables = xTablesSup->getTables(); + Reference< XTablesSupplier > xTablesSup( xConnection, UNO_QUERY_THROW ); + Reference< XNameAccess > xTables( xTablesSup->getTables(), UNO_QUERY_THROW ); - Reference<XDatabaseMetaData > xMeta = xConnection->getMetaData(); + Reference< XDatabaseMetaData > xMeta = xConnection->getMetaData(); String aName = String(ModuleRes(STR_TBL_TITLE)); aName = aName.GetToken(0,' '); @@ -187,9 +178,6 @@ if ( !xView.is() ) throw SQLException(String(ModuleRes(STR_NO_TABLE_FORMAT_INSIDE)),*this,::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("S1000")) ,0,Any()); getContainer()->elementAdded(E_TABLE,sNewName,makeAny(xView),xConnection); - } - } - } } } catch(SQLContext& e) { showError(SQLExceptionInfo(e)); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
