merge the formfield patch from ooo-build
[ooovba.git] / connectivity / source / drivers / file / FTables.cxx
blobb9233eb8b0d621ceb79686200db43085a23fed55
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: FTables.cxx,v $
10 * $Revision: 1.7 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_connectivity.hxx"
33 #include "file/FTables.hxx"
34 #include "file/FTable.hxx"
35 #include <com/sun/star/sdbc/XRow.hpp>
36 #include <com/sun/star/sdbc/XResultSet.hpp>
37 #include <com/sun/star/sdbc/ColumnValue.hpp>
38 #include <com/sun/star/sdbc/KeyRule.hpp>
39 #include <com/sun/star/sdbcx/KeyType.hpp>
40 #include "file/FCatalog.hxx"
41 #ifndef _CONNECTIVITY_FILE_BCONNECTION_HXX_
42 #include "file/FConnection.hxx"
43 #endif
44 //#ifndef _CONNECTIVITY_FILE_OEMPTYCOLLECTION_HXX_
45 //#include "file/FEmptyCollection.hxx"
46 //#endif
48 using namespace connectivity;
49 using namespace connectivity::file;
50 using namespace ::com::sun::star::uno;
51 using namespace ::com::sun::star::beans;
52 using namespace ::com::sun::star::sdbcx;
53 using namespace ::com::sun::star::sdbc;
54 using namespace ::com::sun::star::container;
56 namespace starutil = ::com::sun::star::util;
57 typedef connectivity::sdbcx::OCollection OCollection_TYPE;
59 sdbcx::ObjectType OTables::createObject(const ::rtl::OUString& /*_rName*/)
61 return sdbcx::ObjectType();
63 // -------------------------------------------------------------------------
64 void OTables::impl_refresh( ) throw(RuntimeException)
66 static_cast<OFileCatalog&>(m_rParent).refreshTables();
68 // -------------------------------------------------------------------------
69 void OTables::disposing(void)
71 m_xMetaData.clear();
72 OCollection::disposing();
74 //------------------------------------------------------------------
75 Any SAL_CALL OTables::queryInterface( const Type & rType ) throw(RuntimeException)
77 if( rType == ::getCppuType((const Reference<XColumnLocate>*)0) ||
78 rType == ::getCppuType((const Reference<XDataDescriptorFactory>*)0) ||
79 rType == ::getCppuType((const Reference<XAppend>*)0) ||
80 rType == ::getCppuType((const Reference<XDrop>*)0))
81 return Any();
83 typedef sdbcx::OCollection OTables_BASE;
84 return OTables_BASE::queryInterface(rType);
86 // -----------------------------------------------------------------------------