Tag: cws_src680_qiq User: fs Date: 06/05/30 05:56:23 Modified: /dba/dbaccess/source/core/api/ tablecontainer.cxx
Log: #i51143# use an ObjectNameApproval in appendObject, to verify the name against existing query names (if the connection supports queries in queries) File Changes: Directory: /dba/dbaccess/source/core/api/ ========================================= File [changed]: tablecontainer.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/tablecontainer.cxx?r1=1.60.124.1&r2=1.60.124.2 Delta lines: +12 -3 -------------------- --- tablecontainer.cxx 24 May 2006 06:40:21 -0000 1.60.124.1 +++ tablecontainer.cxx 30 May 2006 12:56:20 -0000 1.60.124.2 @@ -4,9 +4,9 @@ * * $RCSfile: tablecontainer.cxx,v $ * - * $Revision: 1.60.124.1 $ + * $Revision: 1.60.124.2 $ * - * last change: $Author: fs $ $Date: 2006/05/24 06:40:21 $ + * last change: $Author: fs $ $Date: 2006/05/30 12:56:20 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -60,6 +60,9 @@ #ifndef _DBA_CORE_RESOURCE_HRC_ #include "core_resource.hrc" #endif +#ifndef _COM_SUN_STAR_SDB_COMMANDTYPE_HPP_ +#include <com/sun/star/sdb/CommandType.hpp> +#endif #ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ #include <com/sun/star/beans/XPropertySet.hpp> #endif @@ -117,6 +120,9 @@ #ifndef _DBACORE_DEFINITIONCOLUMN_HXX_ #include "definitioncolumn.hxx" #endif +#ifndef DBACCESS_OBJECTNAMEAPPROVAL_HXX +#include "objectnameapproval.hxx" +#endif #ifndef _STRING_HXX #include <tools/string.hxx> #endif @@ -378,6 +384,10 @@ throw SQLException(sMessage,static_cast<XTypeProvider*>(static_cast<OFilteredContainer*>(this)),SQLSTATE_GENERAL,1000,Any()); } + Reference< XConnection > xConnection( m_xConnection.get(), UNO_QUERY ); + PContainerApprove pApprove( new ObjectNameApproval( xConnection, ObjectNameApproval::TypeTable, ObjectNameApproval::ThrowSQLException ) ); + pApprove->approveElement( aName, descriptor ); + m_bInAppend = sal_True; try { @@ -390,7 +400,6 @@ { ::rtl::OUString aSql = ::dbtools::createSqlCreateTableStatement(descriptor,m_xConnection); - Reference<XConnection> xCon = m_xConnection; OSL_ENSURE(xCon.is(),"Connection is null!"); if ( xCon.is() ) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
