Update ooo320-m1
[ooovba.git] / connectivity / source / drivers / calc / CTables.cxx
blob77057abd11ed82da9f82a9c98a94e513913d2137
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: CTables.cxx,v $
10 * $Revision: 1.12 $
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 "calc/CTables.hxx"
34 #include "calc/CTable.hxx"
35 #include "file/FCatalog.hxx"
36 #ifndef _CONNECTIVITY_FILE_BCONNECTION_HXX_
37 #include "file/FConnection.hxx"
38 #endif
39 #include "calc/CCatalog.hxx"
40 #include <comphelper/types.hxx>
41 #include <rtl/logfile.hxx>
43 using namespace ::comphelper;
44 using namespace connectivity;
45 using namespace connectivity::calc;
46 using namespace connectivity::file;
47 using namespace ::com::sun::star::uno;
48 using namespace ::com::sun::star::beans;
49 using namespace ::com::sun::star::sdbcx;
50 using namespace ::com::sun::star::sdbc;
51 using namespace ::com::sun::star::lang;
52 using namespace ::com::sun::star::container;
53 namespace starutil = ::com::sun::star::util;
55 sdbcx::ObjectType OCalcTables::createObject(const ::rtl::OUString& _rName)
57 RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "calc", "Ocke.Janssen@sun.com", "OCalcTables::createObject" );
58 OCalcTable* pTable = new OCalcTable(this,(OCalcConnection*)static_cast<OFileCatalog&>(m_rParent).getConnection(),
59 _rName,::rtl::OUString::createFromAscii("TABLE"));
60 sdbcx::ObjectType xRet = pTable;
61 pTable->construct();
62 return xRet;
64 // -------------------------------------------------------------------------