office-gobmx/connectivity/source/commontools/FDatabaseMetaDataResultSet.cxx

917 lines
39 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2001-03-28 04:26:47 -06:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2001-03-28 04:26:47 -06:00
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
2001-03-28 04:26:47 -06:00
*
* OpenOffice.org - a multi-platform office productivity suite
2001-03-28 04:26:47 -06:00
*
* This file is part of OpenOffice.org.
2001-03-28 04:26:47 -06:00
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
2001-03-28 04:26:47 -06:00
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
2001-03-28 04:26:47 -06:00
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
2001-03-28 04:26:47 -06:00
*
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_connectivity.hxx"
CWS-TOOLING: integrate CWS dba31h 2009-01-29 10:47:07 +0100 oj r267102 : decl OpCodeMap as friend 2009-01-26 09:41:21 +0100 fs r266905 : #i97137# 2009-01-26 09:10:39 +0100 fs r266903 : #i10000 2009-01-26 09:00:17 +0100 fs r266901 : re-enable user admin for MySQL native 2009-01-23 21:56:08 +0100 fs r266851 : #i97137# 2009-01-23 21:32:40 +0100 fs r266850 : #i97042# 2009-01-23 11:23:59 +0100 msc r266800 : #i98387# 2009-01-23 11:17:05 +0100 msc r266798 : #i98387# 2009-01-23 10:56:33 +0100 fs r266795 : for the moment, disable user administration for MySQL native 2009-01-21 15:08:54 +0100 fs r266672 : removed some advanced settings for MySQL native - letting the user control them does not make sense for this particular type 2009-01-21 13:55:13 +0100 oj r266668 : #i98317# wrong var set 2009-01-21 13:41:22 +0100 fs r266664 : #i98315# 2009-01-21 13:13:09 +0100 oj r266661 : #i97032# enable locking for OOo 2009-01-21 13:11:26 +0100 oj r266660 : #i97032# enable locking for OOo 2009-01-21 10:10:50 +0100 oj r266634 : #i98174# merge conflict resolved 2009-01-21 08:48:58 +0100 fs r266628 : CWS-TOOLING: rebase CWS dba31h to trunk@266428 (milestone: DEV300:m39) 2009-01-20 12:54:32 +0100 fs r266570 : #i98277# 2009-01-19 10:46:31 +0100 fs r266480 : #i97995# 2009-01-19 08:42:09 +0100 fs r266470 : #i97042# provided my mod@openoffice.org: support more SQL comment styles 2009-01-19 07:55:43 +0100 oj r266468 : #i98115# check function name as well 2009-01-16 10:21:28 +0100 oj r266404 : #i97861# remove invalid assertion 2009-01-16 10:18:31 +0100 oj r266403 : #i97861# ini var with false 2009-01-15 14:09:50 +0100 oj r266371 : #i97810# saveas fix 2009-01-15 11:54:18 +0100 oj r266360 : remove : from mysql 2009-01-15 11:07:46 +0100 oj r266355 : insert JNI fixes for method names 2009-01-15 10:54:44 +0100 oj r266351 : fix for parameter subst 2009-01-14 14:41:34 +0100 oj r266308 : parameter subst 2009-01-14 14:40:20 +0100 oj r266307 : add missing try catch 2009-01-14 14:38:34 +0100 oj r266306 : new service for parameter subst 2009-01-14 14:37:52 +0100 oj r266305 : missing types for hyper 2009-01-09 15:28:36 +0100 fs r266090 : #i97889# 2009-01-09 14:16:15 +0100 fs r266082 : #i97892# provided by npower: when reading the xlink:href attrib, use the graphic resolver only if appropriate 2009-01-08 21:31:21 +0100 fs r266041 : #i97346# 2009-01-08 14:51:56 +0100 fs r266012 : #i97871# showPreviewFor: bail out if preview is disabled
2009-02-17 09:39:54 -06:00
#include "ParameterSubstitution.hxx"
2001-03-28 04:26:47 -06:00
#include "FDatabaseMetaDataResultSet.hxx"
#include "FDatabaseMetaDataResultSetMetaData.hxx"
#include <com/sun/star/sdbc/DataType.hpp>
#include <com/sun/star/sdbc/ColumnSearch.hpp>
2001-03-28 04:26:47 -06:00
#include <com/sun/star/sdbc/KeyRule.hpp>
#include <com/sun/star/sdbc/ProcedureResult.hpp>
#include <com/sun/star/sdbc/IndexType.hpp>
#include <comphelper/property.hxx>
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
#include <com/sun/star/sdbc/ResultSetType.hpp>
#include <com/sun/star/sdbc/FetchDirection.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <cppuhelper/typeprovider.hxx>
#include <comphelper/sequence.hxx>
#include <cppuhelper/factory.hxx>
CWS-TOOLING: integrate CWS dba31h 2009-01-29 10:47:07 +0100 oj r267102 : decl OpCodeMap as friend 2009-01-26 09:41:21 +0100 fs r266905 : #i97137# 2009-01-26 09:10:39 +0100 fs r266903 : #i10000 2009-01-26 09:00:17 +0100 fs r266901 : re-enable user admin for MySQL native 2009-01-23 21:56:08 +0100 fs r266851 : #i97137# 2009-01-23 21:32:40 +0100 fs r266850 : #i97042# 2009-01-23 11:23:59 +0100 msc r266800 : #i98387# 2009-01-23 11:17:05 +0100 msc r266798 : #i98387# 2009-01-23 10:56:33 +0100 fs r266795 : for the moment, disable user administration for MySQL native 2009-01-21 15:08:54 +0100 fs r266672 : removed some advanced settings for MySQL native - letting the user control them does not make sense for this particular type 2009-01-21 13:55:13 +0100 oj r266668 : #i98317# wrong var set 2009-01-21 13:41:22 +0100 fs r266664 : #i98315# 2009-01-21 13:13:09 +0100 oj r266661 : #i97032# enable locking for OOo 2009-01-21 13:11:26 +0100 oj r266660 : #i97032# enable locking for OOo 2009-01-21 10:10:50 +0100 oj r266634 : #i98174# merge conflict resolved 2009-01-21 08:48:58 +0100 fs r266628 : CWS-TOOLING: rebase CWS dba31h to trunk@266428 (milestone: DEV300:m39) 2009-01-20 12:54:32 +0100 fs r266570 : #i98277# 2009-01-19 10:46:31 +0100 fs r266480 : #i97995# 2009-01-19 08:42:09 +0100 fs r266470 : #i97042# provided my mod@openoffice.org: support more SQL comment styles 2009-01-19 07:55:43 +0100 oj r266468 : #i98115# check function name as well 2009-01-16 10:21:28 +0100 oj r266404 : #i97861# remove invalid assertion 2009-01-16 10:18:31 +0100 oj r266403 : #i97861# ini var with false 2009-01-15 14:09:50 +0100 oj r266371 : #i97810# saveas fix 2009-01-15 11:54:18 +0100 oj r266360 : remove : from mysql 2009-01-15 11:07:46 +0100 oj r266355 : insert JNI fixes for method names 2009-01-15 10:54:44 +0100 oj r266351 : fix for parameter subst 2009-01-14 14:41:34 +0100 oj r266308 : parameter subst 2009-01-14 14:40:20 +0100 oj r266307 : add missing try catch 2009-01-14 14:38:34 +0100 oj r266306 : new service for parameter subst 2009-01-14 14:37:52 +0100 oj r266305 : missing types for hyper 2009-01-09 15:28:36 +0100 fs r266090 : #i97889# 2009-01-09 14:16:15 +0100 fs r266082 : #i97892# provided by npower: when reading the xlink:href attrib, use the graphic resolver only if appropriate 2009-01-08 21:31:21 +0100 fs r266041 : #i97346# 2009-01-08 14:51:56 +0100 fs r266012 : #i97871# showPreviewFor: bail out if preview is disabled
2009-02-17 09:39:54 -06:00
#include <cppuhelper/implementationentry.hxx>
2001-03-28 04:26:47 -06:00
#include "connectivity/dbexception.hxx"
2001-05-14 05:55:19 -05:00
#include "TConnection.hxx"
2001-03-28 04:26:47 -06:00
using namespace connectivity;
2001-05-14 05:55:19 -05:00
using namespace dbtools;
2001-03-28 04:26:47 -06:00
using namespace cppu;
//------------------------------------------------------------------------------
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
// -------------------------------------------------------------------------
ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet()
:ODatabaseMetaDataResultSet_BASE(m_aMutex)
,::comphelper::OPropertyContainer(ODatabaseMetaDataResultSet_BASE::rBHelper)
,m_aStatement(NULL)
,m_xMetaData(NULL)
,m_bBOF(sal_True)
,m_bEOF(sal_True)
2001-03-28 04:26:47 -06:00
{
2001-03-30 07:01:50 -06:00
construct();
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
ODatabaseMetaDataResultSet::ODatabaseMetaDataResultSet( MetaDataResultSetType _eType )
:ODatabaseMetaDataResultSet_BASE(m_aMutex)
,::comphelper::OPropertyContainer(ODatabaseMetaDataResultSet_BASE::rBHelper)
,m_aStatement(NULL)
,m_xMetaData(NULL)
,m_bBOF(sal_True)
,m_bEOF(sal_True)
{
construct();
setType(_eType);
}
2001-03-28 04:26:47 -06:00
// -------------------------------------------------------------------------
ODatabaseMetaDataResultSet::~ODatabaseMetaDataResultSet()
{
}
// -------------------------------------------------------------------------
void ODatabaseMetaDataResultSet::construct()
{
2001-05-14 05:55:19 -05:00
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FETCHSIZE), PROPERTY_ID_FETCHSIZE, 0,&m_nFetchSize, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL)));
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETTYPE), PROPERTY_ID_RESULTSETTYPE, PropertyAttribute::READONLY,&m_nResultSetType, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL)));
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FETCHDIRECTION), PROPERTY_ID_FETCHDIRECTION, 0, &m_nFetchDirection, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL)));
registerProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_RESULTSETCONCURRENCY), PROPERTY_ID_RESULTSETCONCURRENCY, PropertyAttribute::READONLY,&m_nResultSetConcurrency, ::getCppuType(reinterpret_cast<sal_Int32*>(NULL)));
2001-03-28 04:26:47 -06:00
}
// -----------------------------------------------------------------------------
void ODatabaseMetaDataResultSet::setType(MetaDataResultSetType _eType)
{
switch( _eType )
{
case eCatalogs: setCatalogsMap(); break;
case eSchemas: setSchemasMap(); break;
case eColumnPrivileges: setColumnPrivilegesMap(); break;
case eColumns: setColumnsMap(); break;
case eTables: setTablesMap(); break;
case eTableTypes: setTableTypes(); break;
case eProcedureColumns: setProcedureColumnsMap(); break;
case eProcedures: setProceduresMap(); break;
case eExportedKeys: setExportedKeysMap(); break;
case eImportedKeys: setImportedKeysMap(); break;
case ePrimaryKeys: setPrimaryKeysMap(); break;
case eIndexInfo: setIndexInfoMap(); break;
case eTablePrivileges: setTablePrivilegesMap(); break;
case eCrossReference: setCrossReferenceMap(); break;
case eTypeInfo: setTypeInfoMap(); break;
case eBestRowIdentifier: setBestRowIdentifierMap(); break;
case eVersionColumns: setVersionColumnsMap(); break;
default:
OSL_ENSURE(0,"Wrong type!");
}
}
2001-03-28 04:26:47 -06:00
// -------------------------------------------------------------------------
void ODatabaseMetaDataResultSet::disposing(void)
{
OPropertySetHelper::disposing();
::osl::MutexGuard aGuard(m_aMutex);
m_aStatement = NULL;
m_xMetaData.clear();
2001-03-30 07:01:50 -06:00
m_aRowsIter = m_aRows.end();
m_aRows.clear();
m_aRowsIter = m_aRows.end();
2001-03-28 04:26:47 -06:00
}
2001-03-29 00:05:46 -06:00
// -----------------------------------------------------------------------------
2001-09-27 08:16:52 -05:00
void SAL_CALL ODatabaseMetaDataResultSet::acquire() throw()
2001-03-29 00:05:46 -06:00
{
ODatabaseMetaDataResultSet_BASE::acquire();
}
// -----------------------------------------------------------------------------
2001-09-27 08:16:52 -05:00
void SAL_CALL ODatabaseMetaDataResultSet::release() throw()
2001-03-29 00:05:46 -06:00
{
ODatabaseMetaDataResultSet_BASE::release();
}
2001-03-28 04:26:47 -06:00
// -------------------------------------------------------------------------
Any SAL_CALL ODatabaseMetaDataResultSet::queryInterface( const Type & rType ) throw(RuntimeException)
{
Any aRet = OPropertySetHelper::queryInterface(rType);
return aRet.hasValue() ? aRet : ODatabaseMetaDataResultSet_BASE::queryInterface(rType);
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
2001-04-30 04:16:19 -05:00
Sequence< Type > SAL_CALL ODatabaseMetaDataResultSet::getTypes( ) throw(RuntimeException)
2001-03-28 04:26:47 -06:00
{
2001-04-30 04:16:19 -05:00
::cppu::OTypeCollection aTypes( ::getCppuType( (const Reference< ::com::sun::star::beans::XMultiPropertySet > *)0 ),
::getCppuType( (const Reference< ::com::sun::star::beans::XFastPropertySet > *)0 ),
::getCppuType( (const Reference< ::com::sun::star::beans::XPropertySet > *)0 ));
2001-03-28 04:26:47 -06:00
return ::comphelper::concatSequences(aTypes.getTypes(),ODatabaseMetaDataResultSet_BASE::getTypes());
}
2001-04-18 02:41:08 -05:00
// -----------------------------------------------------------------------------
void ODatabaseMetaDataResultSet::setRows(const ORows& _rRows)
{
m_aRows = _rRows;
m_bBOF = sal_True;
m_bEOF = m_aRows.empty();
2001-04-18 02:41:08 -05:00
}
2001-03-28 04:26:47 -06:00
// -------------------------------------------------------------------------
sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::findColumn( const ::rtl::OUString& columnName ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
2001-05-17 01:30:42 -05:00
checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed );
2001-03-28 04:26:47 -06:00
Reference< XResultSetMetaData > xMeta = getMetaData();
sal_Int32 nLen = xMeta->getColumnCount();
sal_Int32 i = 1;
for(;i<=nLen;++i)
2001-05-17 01:30:42 -05:00
if(xMeta->isCaseSensitive(i) ? columnName == xMeta->getColumnName(i) :
columnName.equalsIgnoreAsciiCase(xMeta->getColumnName(i))
)
2001-03-28 04:26:47 -06:00
break;
return i;
}
// -----------------------------------------------------------------------------
void ODatabaseMetaDataResultSet::checkIndex(sal_Int32 columnIndex ) throw(::com::sun::star::sdbc::SQLException)
{
if(columnIndex >= (sal_Int32)(*m_aRowsIter).size() || columnIndex < 1)
::dbtools::throwInvalidIndexException(*this);
}
2001-03-28 04:26:47 -06:00
// -------------------------------------------------------------------------
Reference< ::com::sun::star::io::XInputStream > SAL_CALL ODatabaseMetaDataResultSet::getBinaryStream( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException)
2001-03-28 04:26:47 -06:00
{
return NULL;
}
// -------------------------------------------------------------------------
Reference< ::com::sun::star::io::XInputStream > SAL_CALL ODatabaseMetaDataResultSet::getCharacterStream( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException)
2001-03-28 04:26:47 -06:00
{
return NULL;
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::getBoolean( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
return getValue(columnIndex);
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
sal_Int8 SAL_CALL ODatabaseMetaDataResultSet::getByte( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
return getValue(columnIndex);
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
Sequence< sal_Int8 > SAL_CALL ODatabaseMetaDataResultSet::getBytes( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
return getValue(columnIndex);
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
::com::sun::star::util::Date SAL_CALL ODatabaseMetaDataResultSet::getDate( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
return getValue(columnIndex);
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
double SAL_CALL ODatabaseMetaDataResultSet::getDouble( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
return getValue(columnIndex);
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
float SAL_CALL ODatabaseMetaDataResultSet::getFloat( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
return getValue(columnIndex);
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::getInt( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
return getValue(columnIndex);
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
sal_Int32 SAL_CALL ODatabaseMetaDataResultSet::getRow( ) throw(SQLException, RuntimeException)
{
return 0;
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
sal_Int64 SAL_CALL ODatabaseMetaDataResultSet::getLong( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
return getValue(columnIndex);
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
Reference< XResultSetMetaData > SAL_CALL ODatabaseMetaDataResultSet::getMetaData( ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
2001-05-17 01:30:42 -05:00
checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed );
2001-03-28 04:26:47 -06:00
if(!m_xMetaData.is())
2001-07-16 00:17:16 -05:00
m_xMetaData = new ODatabaseMetaDataResultSetMetaData();
2001-03-28 04:26:47 -06:00
return m_xMetaData;
}
// -------------------------------------------------------------------------
Reference< XArray > SAL_CALL ODatabaseMetaDataResultSet::getArray( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException)
2001-03-28 04:26:47 -06:00
{
return NULL;
}
// -------------------------------------------------------------------------
Reference< XClob > SAL_CALL ODatabaseMetaDataResultSet::getClob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException)
2001-03-28 04:26:47 -06:00
{
return NULL;
}
// -------------------------------------------------------------------------
Reference< XBlob > SAL_CALL ODatabaseMetaDataResultSet::getBlob( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException)
2001-03-28 04:26:47 -06:00
{
return NULL;
}
// -------------------------------------------------------------------------
Reference< XRef > SAL_CALL ODatabaseMetaDataResultSet::getRef( sal_Int32 /*columnIndex*/ ) throw(SQLException, RuntimeException)
2001-03-28 04:26:47 -06:00
{
return NULL;
}
// -------------------------------------------------------------------------
Any SAL_CALL ODatabaseMetaDataResultSet::getObject( sal_Int32 columnIndex, const Reference< ::com::sun::star::container::XNameAccess >& /*typeMap*/ ) throw(SQLException, RuntimeException)
2001-03-28 04:26:47 -06:00
{
return getValue(columnIndex).makeAny();
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
sal_Int16 SAL_CALL ODatabaseMetaDataResultSet::getShort( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
return getValue(columnIndex);
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
::rtl::OUString SAL_CALL ODatabaseMetaDataResultSet::getString( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
return getValue(columnIndex);
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
::com::sun::star::util::Time SAL_CALL ODatabaseMetaDataResultSet::getTime( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
return getValue(columnIndex);
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
::com::sun::star::util::DateTime SAL_CALL ODatabaseMetaDataResultSet::getTimestamp( sal_Int32 columnIndex ) throw(SQLException, RuntimeException)
{
return getValue(columnIndex);
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isAfterLast( ) throw(SQLException, RuntimeException)
{
return m_bEOF;
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isFirst( ) throw(SQLException, RuntimeException)
{
::dbtools::throwFunctionSequenceException(*this);
return sal_False;
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isLast( ) throw(SQLException, RuntimeException)
{
::dbtools::throwFunctionSequenceException(*this);
return sal_False;
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
void SAL_CALL ODatabaseMetaDataResultSet::beforeFirst( ) throw(SQLException, RuntimeException)
{
::dbtools::throwFunctionSequenceException(*this);
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
void SAL_CALL ODatabaseMetaDataResultSet::afterLast( ) throw(SQLException, RuntimeException)
{
::dbtools::throwFunctionSequenceException(*this);
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
void SAL_CALL ODatabaseMetaDataResultSet::close( ) throw(SQLException, RuntimeException)
{
{
::osl::MutexGuard aGuard( m_aMutex );
2001-05-17 01:30:42 -05:00
checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed );
2001-03-28 04:26:47 -06:00
}
dispose();
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::first( ) throw(SQLException, RuntimeException)
{
::dbtools::throwFunctionSequenceException(*this);
return sal_False;
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::last( ) throw(SQLException, RuntimeException)
{
::dbtools::throwFunctionSequenceException(*this);
return sal_False;
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::absolute( sal_Int32 /*row*/ ) throw(SQLException, RuntimeException)
2001-03-28 04:26:47 -06:00
{
::dbtools::throwFunctionSequenceException(*this);
return sal_False;
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::relative( sal_Int32 /*row*/ ) throw(SQLException, RuntimeException)
2001-03-28 04:26:47 -06:00
{
::dbtools::throwFunctionSequenceException(*this);
return sal_False;
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::previous( ) throw(SQLException, RuntimeException)
{
::dbtools::throwFunctionSequenceException(*this);
return sal_False;
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
Reference< XInterface > SAL_CALL ODatabaseMetaDataResultSet::getStatement( ) throw(SQLException, RuntimeException)
{
return m_aStatement.get();
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowDeleted( ) throw(SQLException, RuntimeException)
{
::dbtools::throwFunctionSequenceException(*this);
return sal_False;
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowInserted( ) throw(SQLException, RuntimeException)
{
::dbtools::throwFunctionSequenceException(*this);
return sal_False;
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::rowUpdated( ) throw(SQLException, RuntimeException)
{
::dbtools::throwFunctionSequenceException(*this);
return sal_False;
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::isBeforeFirst( ) throw(SQLException, RuntimeException)
{
return m_bBOF;
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::next( ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
2001-05-17 01:30:42 -05:00
checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed );
if ( m_bBOF )
2001-03-28 04:26:47 -06:00
{
m_aRowsIter = m_aRows.begin();
m_bBOF = sal_False;
}
else
{
if ( m_bEOF )
throwFunctionSequenceException( *this );
else
if ( m_aRowsIter != m_aRows.end() )
++m_aRowsIter;
2001-03-28 04:26:47 -06:00
}
bool bSuccess = m_aRowsIter != m_aRows.end();
if ( !bSuccess )
{
m_bEOF = sal_True;
m_bBOF = m_aRows.empty();
}
return bSuccess;
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::wasNull( ) throw(SQLException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
2001-05-17 01:30:42 -05:00
checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed );
2001-03-28 04:26:47 -06:00
if(m_aRowsIter == m_aRows.end() || !(*m_aRowsIter)[m_nColPos].isValid())
2001-03-28 04:26:47 -06:00
return sal_True;
return (*m_aRowsIter)[m_nColPos]->getValue().isNull();
2001-03-28 04:26:47 -06:00
}
// -------------------------------------------------------------------------
void SAL_CALL ODatabaseMetaDataResultSet::refreshRow( ) throw(SQLException, RuntimeException)
{
}
// -------------------------------------------------------------------------
void SAL_CALL ODatabaseMetaDataResultSet::cancel( ) throw(RuntimeException)
{
}
// -------------------------------------------------------------------------
void SAL_CALL ODatabaseMetaDataResultSet::clearWarnings( ) throw(SQLException, RuntimeException)
{
}
// -------------------------------------------------------------------------
Any SAL_CALL ODatabaseMetaDataResultSet::getWarnings( ) throw(SQLException, RuntimeException)
{
return Any();
}
// -------------------------------------------------------------------------
::cppu::IPropertyArrayHelper* ODatabaseMetaDataResultSet::createArrayHelper( ) const
{
Sequence< Property > aProps;
describeProperties(aProps);
return new ::cppu::OPropertyArrayHelper(aProps);
}
// -------------------------------------------------------------------------
::cppu::IPropertyArrayHelper & ODatabaseMetaDataResultSet::getInfoHelper()
{
return *const_cast<ODatabaseMetaDataResultSet*>(this)->getArrayHelper();
}
// -------------------------------------------------------------------------
void ODatabaseMetaDataResultSet::setProceduresMap()
{
2001-07-16 00:17:16 -05:00
ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData();
2001-03-28 04:26:47 -06:00
pMetaData->setProceduresMap();
m_xMetaData = pMetaData;
}
// -------------------------------------------------------------------------
void ODatabaseMetaDataResultSet::setCatalogsMap()
{
2001-07-16 00:17:16 -05:00
ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData();
2001-03-28 04:26:47 -06:00
pMetaData->setCatalogsMap();
m_xMetaData = pMetaData;
}
// -------------------------------------------------------------------------
void ODatabaseMetaDataResultSet::setSchemasMap()
{
2001-07-16 00:17:16 -05:00
ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData();
2001-03-28 04:26:47 -06:00
pMetaData->setSchemasMap();
m_xMetaData = pMetaData;
}
// -------------------------------------------------------------------------
void ODatabaseMetaDataResultSet::setColumnPrivilegesMap()
{
2001-07-16 00:17:16 -05:00
ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData();
2001-03-28 04:26:47 -06:00
pMetaData->setColumnPrivilegesMap();
m_xMetaData = pMetaData;
}
// -------------------------------------------------------------------------
void ODatabaseMetaDataResultSet::setColumnsMap()
{
2001-07-16 00:17:16 -05:00
ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData();
2001-03-28 04:26:47 -06:00
pMetaData->setColumnsMap();
m_xMetaData = pMetaData;
}
// -------------------------------------------------------------------------
void ODatabaseMetaDataResultSet::setTablesMap()
{
2001-07-16 00:17:16 -05:00
ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData();
2001-03-28 04:26:47 -06:00
pMetaData->setTablesMap();
m_xMetaData = pMetaData;
}
// -------------------------------------------------------------------------
void ODatabaseMetaDataResultSet::setProcedureColumnsMap()
{
2001-07-16 00:17:16 -05:00
ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData();
2001-03-28 04:26:47 -06:00
pMetaData->setProcedureColumnsMap();
m_xMetaData = pMetaData;
}
// -------------------------------------------------------------------------
void ODatabaseMetaDataResultSet::setPrimaryKeysMap()
{
2001-07-16 00:17:16 -05:00
ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData();
pMetaData->setPrimaryKeysMap();
2001-03-28 04:26:47 -06:00
m_xMetaData = pMetaData;
}
// -------------------------------------------------------------------------
void ODatabaseMetaDataResultSet::setIndexInfoMap()
{
2001-07-16 00:17:16 -05:00
ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData();
2001-03-28 04:26:47 -06:00
pMetaData->setIndexInfoMap();
m_xMetaData = pMetaData;
}
// -------------------------------------------------------------------------
void ODatabaseMetaDataResultSet::setTablePrivilegesMap()
{
2001-07-16 00:17:16 -05:00
ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData();
2001-03-28 04:26:47 -06:00
pMetaData->setTablePrivilegesMap();
m_xMetaData = pMetaData;
}
// -------------------------------------------------------------------------
void ODatabaseMetaDataResultSet::setCrossReferenceMap()
{
2001-07-16 00:17:16 -05:00
ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData();
2001-03-28 04:26:47 -06:00
pMetaData->setCrossReferenceMap();
m_xMetaData = pMetaData;
}
// -------------------------------------------------------------------------
void ODatabaseMetaDataResultSet::setVersionColumnsMap()
{
2001-07-16 00:17:16 -05:00
ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData();
2001-03-28 04:26:47 -06:00
pMetaData->setVersionColumnsMap();
m_xMetaData = pMetaData;
}
// -------------------------------------------------------------------------
void ODatabaseMetaDataResultSet::setBestRowIdentifierMap()
{
2001-07-16 00:17:16 -05:00
ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData();
2001-03-28 04:26:47 -06:00
pMetaData->setBestRowIdentifierMap();
m_xMetaData = pMetaData;
}
// -------------------------------------------------------------------------
void ODatabaseMetaDataResultSet::setTypeInfoMap()
{
2001-07-16 00:17:16 -05:00
ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData();
2001-03-28 04:26:47 -06:00
pMetaData->setTypeInfoMap();
m_xMetaData = pMetaData;
}
// -------------------------------------------------------------------------
void ODatabaseMetaDataResultSet::setTableTypes()
{
2001-07-16 00:17:16 -05:00
ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData();
2001-03-28 04:26:47 -06:00
pMetaData->setTableTypes();
m_xMetaData = pMetaData;
}
// -------------------------------------------------------------------------
void ODatabaseMetaDataResultSet::setExportedKeysMap()
{
2001-07-16 00:17:16 -05:00
ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData();
2001-03-28 04:26:47 -06:00
pMetaData->setExportedKeysMap();
m_xMetaData = pMetaData;
}
// -------------------------------------------------------------------------
void ODatabaseMetaDataResultSet::setImportedKeysMap()
{
2001-07-16 00:17:16 -05:00
ODatabaseMetaDataResultSetMetaData* pMetaData = new ODatabaseMetaDataResultSetMetaData();
2001-03-28 04:26:47 -06:00
pMetaData->setImportedKeysMap();
m_xMetaData = pMetaData;
}
2001-03-30 07:01:50 -06:00
// -----------------------------------------------------------------------------
2001-04-30 04:16:19 -05:00
Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL ODatabaseMetaDataResultSet::getPropertySetInfo( ) throw(RuntimeException)
{
return ::cppu::OPropertySetHelper::createPropertySetInfo(getInfoHelper());
}
// -----------------------------------------------------------------------------
2001-08-29 06:21:08 -05:00
ORowSetValueDecorator& ORowSetValueDecorator::operator=(const ORowSetValue& _aValue)
{
m_aValue = _aValue;
return *this;
}
// -----------------------------------------------------------------------------
const ORowSetValue& ODatabaseMetaDataResultSet::getValue(sal_Int32 columnIndex)
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(ODatabaseMetaDataResultSet_BASE::rBHelper.bDisposed );
if ( isBeforeFirst() || isAfterLast() )
::dbtools::throwFunctionSequenceException( *this );
checkIndex(columnIndex );
m_nColPos = columnIndex;
if(m_aRowsIter != m_aRows.end() && (*m_aRowsIter)[columnIndex].isValid())
return *(*m_aRowsIter)[columnIndex];
return m_aEmptyValue;
}
// -----------------------------------------------------------------------------
/// return an empty ORowSetValueDecorator
2001-08-29 06:21:08 -05:00
ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getEmptyValue()
{
static ORowSetValueDecoratorRef aEmptyValueRef = new ORowSetValueDecorator();
return aEmptyValueRef;
}
// -----------------------------------------------------------------------------
/// return an ORowSetValueDecorator with 0 as value
2001-08-29 06:21:08 -05:00
ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::get0Value()
{
static ORowSetValueDecoratorRef a0ValueRef = new ORowSetValueDecorator((sal_Int32)0);
return a0ValueRef;
}
// -----------------------------------------------------------------------------
/// return an ORowSetValueDecorator with 1 as value
2001-08-29 06:21:08 -05:00
ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::get1Value()
{
static ORowSetValueDecoratorRef a1ValueRef = new ORowSetValueDecorator((sal_Int32)1);
return a1ValueRef;
}
// -----------------------------------------------------------------------------
/// return an ORowSetValueDecorator with ColumnSearch::BASIC as value
2001-08-29 06:21:08 -05:00
ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getBasicValue()
{
static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(ColumnSearch::BASIC);
return aValueRef;
}
// -----------------------------------------------------------------------------
2001-08-29 06:21:08 -05:00
ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getSelectValue()
{
static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("SELECT"));
return aValueRef;
}
// -----------------------------------------------------------------------------
2001-08-29 06:21:08 -05:00
ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getInsertValue()
{
static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("INSERT"));
return aValueRef;
}
// -----------------------------------------------------------------------------
2001-08-29 06:21:08 -05:00
ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getDeleteValue()
{
static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("DELETE"));
return aValueRef;
}
// -----------------------------------------------------------------------------
2001-08-29 06:21:08 -05:00
ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getUpdateValue()
{
static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("UPDATE"));
return aValueRef;
}
// -----------------------------------------------------------------------------
2001-08-29 06:21:08 -05:00
ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getCreateValue()
{
static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("CREATE"));
return aValueRef;
}
// -----------------------------------------------------------------------------
2001-08-29 06:21:08 -05:00
ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getReadValue()
{
static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("READ"));
return aValueRef;
}
// -----------------------------------------------------------------------------
2001-08-29 06:21:08 -05:00
ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getAlterValue()
{
static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("ALTER"));
return aValueRef;
}
// -----------------------------------------------------------------------------
2001-08-29 06:21:08 -05:00
ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getDropValue()
{
static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("DROP"));
return aValueRef;
}
// -----------------------------------------------------------------------------
2001-08-29 06:21:08 -05:00
ORowSetValueDecoratorRef ODatabaseMetaDataResultSet::getQuoteValue()
{
static ORowSetValueDecoratorRef aValueRef = new ORowSetValueDecorator(::rtl::OUString::createFromAscii("'"));
return aValueRef;
}
// -----------------------------------------------------------------------------
void SAL_CALL ODatabaseMetaDataResultSet::initialize( const Sequence< Any >& _aArguments ) throw (Exception, RuntimeException)
{
if ( _aArguments.getLength() == 2 )
{
sal_Int32 nResultSetType = 0;
if ( _aArguments[0] >>= nResultSetType)
{
setType(static_cast<MetaDataResultSetType>(nResultSetType));
Sequence< Sequence<Any> > aRows;
if ( _aArguments[1] >>= aRows )
{
ORows aRowsToSet;
const Sequence<Any>* pRowsIter = aRows.getConstArray();
const Sequence<Any>* pRowsEnd = pRowsIter + aRows.getLength();
for (; pRowsIter != pRowsEnd;++pRowsIter)
{
ORow aRowToSet;
const Any* pRowIter = pRowsIter->getConstArray();
const Any* pRowEnd = pRowIter + pRowsIter->getLength();
for (; pRowIter != pRowEnd;++pRowIter)
{
ORowSetValueDecoratorRef aValue;
switch( pRowIter->getValueTypeClass() )
{
case TypeClass_BOOLEAN:
{
sal_Bool bValue = sal_False;
*pRowIter >>= bValue;
aValue = new ORowSetValueDecorator(ORowSetValue(bValue));
}
break;
case TypeClass_BYTE:
{
sal_Int8 nValue(0);
*pRowIter >>= nValue;
aValue = new ORowSetValueDecorator(ORowSetValue(nValue));
}
break;
case TypeClass_SHORT:
case TypeClass_UNSIGNED_SHORT:
{
sal_Int16 nValue(0);
*pRowIter >>= nValue;
aValue = new ORowSetValueDecorator(ORowSetValue(nValue));
}
break;
case TypeClass_LONG:
case TypeClass_UNSIGNED_LONG:
{
sal_Int32 nValue(0);
*pRowIter >>= nValue;
aValue = new ORowSetValueDecorator(ORowSetValue(nValue));
}
break;
case TypeClass_HYPER:
case TypeClass_UNSIGNED_HYPER:
{
sal_Int64 nValue(0);
*pRowIter >>= nValue;
aValue = new ORowSetValueDecorator(ORowSetValue(nValue));
}
break;
case TypeClass_FLOAT:
{
float nValue(0.0);
*pRowIter >>= nValue;
aValue = new ORowSetValueDecorator(ORowSetValue(nValue));
}
break;
case TypeClass_DOUBLE:
{
double nValue(0.0);
*pRowIter >>= nValue;
aValue = new ORowSetValueDecorator(ORowSetValue(nValue));
}
break;
case TypeClass_STRING:
{
::rtl::OUString sValue;
*pRowIter >>= sValue;
aValue = new ORowSetValueDecorator(ORowSetValue(sValue));
}
break;
default:
break;
}
aRowToSet.push_back(aValue);
}
aRowsToSet.push_back(aRowToSet);
} // for (; pRowsIter != pRowsEnd;++pRowsIter
setRows(aRowsToSet);
}
}
}
}
// XServiceInfo
// --------------------------------------------------------------------------------
//------------------------------------------------------------------------------
rtl::OUString ODatabaseMetaDataResultSet::getImplementationName_Static( ) throw(RuntimeException)
{
return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.helper.DatabaseMetaDataResultSet"));
}
//------------------------------------------------------------------------------
Sequence< ::rtl::OUString > ODatabaseMetaDataResultSet::getSupportedServiceNames_Static( ) throw (RuntimeException)
{
Sequence< ::rtl::OUString > aSNS( 1 );
aSNS[0] = ::rtl::OUString::createFromAscii("com.sun.star.sdbc.ResultSet");
return aSNS;
}
//------------------------------------------------------------------
::rtl::OUString SAL_CALL ODatabaseMetaDataResultSet::getImplementationName( ) throw(RuntimeException)
{
return getImplementationName_Static();
}
//------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaDataResultSet::supportsService( const ::rtl::OUString& _rServiceName ) throw(RuntimeException)
{
Sequence< ::rtl::OUString > aSupported(getSupportedServiceNames());
const ::rtl::OUString* pSupported = aSupported.getConstArray();
const ::rtl::OUString* pEnd = pSupported + aSupported.getLength();
for (;pSupported != pEnd && !pSupported->equals(_rServiceName); ++pSupported)
;
return pSupported != pEnd;
}
//------------------------------------------------------------------
Sequence< ::rtl::OUString > SAL_CALL ODatabaseMetaDataResultSet::getSupportedServiceNames( ) throw(RuntimeException)
{
return getSupportedServiceNames_Static();
}
// -------------------------------------------------------------------------
namespace connectivity
{
CWS-TOOLING: integrate CWS dba31h 2009-01-29 10:47:07 +0100 oj r267102 : decl OpCodeMap as friend 2009-01-26 09:41:21 +0100 fs r266905 : #i97137# 2009-01-26 09:10:39 +0100 fs r266903 : #i10000 2009-01-26 09:00:17 +0100 fs r266901 : re-enable user admin for MySQL native 2009-01-23 21:56:08 +0100 fs r266851 : #i97137# 2009-01-23 21:32:40 +0100 fs r266850 : #i97042# 2009-01-23 11:23:59 +0100 msc r266800 : #i98387# 2009-01-23 11:17:05 +0100 msc r266798 : #i98387# 2009-01-23 10:56:33 +0100 fs r266795 : for the moment, disable user administration for MySQL native 2009-01-21 15:08:54 +0100 fs r266672 : removed some advanced settings for MySQL native - letting the user control them does not make sense for this particular type 2009-01-21 13:55:13 +0100 oj r266668 : #i98317# wrong var set 2009-01-21 13:41:22 +0100 fs r266664 : #i98315# 2009-01-21 13:13:09 +0100 oj r266661 : #i97032# enable locking for OOo 2009-01-21 13:11:26 +0100 oj r266660 : #i97032# enable locking for OOo 2009-01-21 10:10:50 +0100 oj r266634 : #i98174# merge conflict resolved 2009-01-21 08:48:58 +0100 fs r266628 : CWS-TOOLING: rebase CWS dba31h to trunk@266428 (milestone: DEV300:m39) 2009-01-20 12:54:32 +0100 fs r266570 : #i98277# 2009-01-19 10:46:31 +0100 fs r266480 : #i97995# 2009-01-19 08:42:09 +0100 fs r266470 : #i97042# provided my mod@openoffice.org: support more SQL comment styles 2009-01-19 07:55:43 +0100 oj r266468 : #i98115# check function name as well 2009-01-16 10:21:28 +0100 oj r266404 : #i97861# remove invalid assertion 2009-01-16 10:18:31 +0100 oj r266403 : #i97861# ini var with false 2009-01-15 14:09:50 +0100 oj r266371 : #i97810# saveas fix 2009-01-15 11:54:18 +0100 oj r266360 : remove : from mysql 2009-01-15 11:07:46 +0100 oj r266355 : insert JNI fixes for method names 2009-01-15 10:54:44 +0100 oj r266351 : fix for parameter subst 2009-01-14 14:41:34 +0100 oj r266308 : parameter subst 2009-01-14 14:40:20 +0100 oj r266307 : add missing try catch 2009-01-14 14:38:34 +0100 oj r266306 : new service for parameter subst 2009-01-14 14:37:52 +0100 oj r266305 : missing types for hyper 2009-01-09 15:28:36 +0100 fs r266090 : #i97889# 2009-01-09 14:16:15 +0100 fs r266082 : #i97892# provided by npower: when reading the xlink:href attrib, use the graphic resolver only if appropriate 2009-01-08 21:31:21 +0100 fs r266041 : #i97346# 2009-01-08 14:51:56 +0100 fs r266012 : #i97871# showPreviewFor: bail out if preview is disabled
2009-02-17 09:39:54 -06:00
Reference< XInterface > SAL_CALL ODatabaseMetaDataResultSet_CreateInstance(const Reference< XComponentContext >& ) throw( Exception )
{
return *(new ODatabaseMetaDataResultSet());
}
}
// -----------------------------------------------------------------------------
CWS-TOOLING: integrate CWS dba31h 2009-01-29 10:47:07 +0100 oj r267102 : decl OpCodeMap as friend 2009-01-26 09:41:21 +0100 fs r266905 : #i97137# 2009-01-26 09:10:39 +0100 fs r266903 : #i10000 2009-01-26 09:00:17 +0100 fs r266901 : re-enable user admin for MySQL native 2009-01-23 21:56:08 +0100 fs r266851 : #i97137# 2009-01-23 21:32:40 +0100 fs r266850 : #i97042# 2009-01-23 11:23:59 +0100 msc r266800 : #i98387# 2009-01-23 11:17:05 +0100 msc r266798 : #i98387# 2009-01-23 10:56:33 +0100 fs r266795 : for the moment, disable user administration for MySQL native 2009-01-21 15:08:54 +0100 fs r266672 : removed some advanced settings for MySQL native - letting the user control them does not make sense for this particular type 2009-01-21 13:55:13 +0100 oj r266668 : #i98317# wrong var set 2009-01-21 13:41:22 +0100 fs r266664 : #i98315# 2009-01-21 13:13:09 +0100 oj r266661 : #i97032# enable locking for OOo 2009-01-21 13:11:26 +0100 oj r266660 : #i97032# enable locking for OOo 2009-01-21 10:10:50 +0100 oj r266634 : #i98174# merge conflict resolved 2009-01-21 08:48:58 +0100 fs r266628 : CWS-TOOLING: rebase CWS dba31h to trunk@266428 (milestone: DEV300:m39) 2009-01-20 12:54:32 +0100 fs r266570 : #i98277# 2009-01-19 10:46:31 +0100 fs r266480 : #i97995# 2009-01-19 08:42:09 +0100 fs r266470 : #i97042# provided my mod@openoffice.org: support more SQL comment styles 2009-01-19 07:55:43 +0100 oj r266468 : #i98115# check function name as well 2009-01-16 10:21:28 +0100 oj r266404 : #i97861# remove invalid assertion 2009-01-16 10:18:31 +0100 oj r266403 : #i97861# ini var with false 2009-01-15 14:09:50 +0100 oj r266371 : #i97810# saveas fix 2009-01-15 11:54:18 +0100 oj r266360 : remove : from mysql 2009-01-15 11:07:46 +0100 oj r266355 : insert JNI fixes for method names 2009-01-15 10:54:44 +0100 oj r266351 : fix for parameter subst 2009-01-14 14:41:34 +0100 oj r266308 : parameter subst 2009-01-14 14:40:20 +0100 oj r266307 : add missing try catch 2009-01-14 14:38:34 +0100 oj r266306 : new service for parameter subst 2009-01-14 14:37:52 +0100 oj r266305 : missing types for hyper 2009-01-09 15:28:36 +0100 fs r266090 : #i97889# 2009-01-09 14:16:15 +0100 fs r266082 : #i97892# provided by npower: when reading the xlink:href attrib, use the graphic resolver only if appropriate 2009-01-08 21:31:21 +0100 fs r266041 : #i97346# 2009-01-08 14:51:56 +0100 fs r266012 : #i97871# showPreviewFor: bail out if preview is disabled
2009-02-17 09:39:54 -06:00
namespace
{
cppu::ImplementationEntry entries[] = {
{ &ODatabaseMetaDataResultSet_CreateInstance, &ODatabaseMetaDataResultSet::getImplementationName_Static, &ODatabaseMetaDataResultSet::getSupportedServiceNames_Static,
&cppu::createSingleComponentFactory, 0, 0 },
{ &ParameterSubstitution::create, &ParameterSubstitution::getImplementationName_Static, &ParameterSubstitution::getSupportedServiceNames_Static,
&cppu::createSingleComponentFactory, 0, 0 },
{ 0, 0, 0, 0, 0, 0 }
};
}
using ::rtl::OUString;
using ::com::sun::star::uno::Reference;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::registry::XRegistryKey;
using ::com::sun::star::registry::InvalidRegistryException;
using ::com::sun::star::registry::InvalidValueException;
using ::com::sun::star::lang::XMultiServiceFactory;
2001-03-30 07:01:50 -06:00
//==========================================================================
//= registration
//==========================================================================
extern "C"
{
//---------------------------------------------------------------------------------------
CWS-TOOLING: integrate CWS sb102 2008-12-11 16:18:12 +0100 sb r265332 : #i95065# cleanup, to make Windows linking work 2008-12-11 16:16:03 +0100 sb r265331 : #i95065# missing SAL_DLLPUBLIC_EXPORT 2008-12-09 17:40:28 +0100 sb r265122 : #i94469# move CJK specific configuration data to brand layer 2008-12-09 16:09:08 +0100 sb r265112 : #i96959# use PTHREAD_MUTEX_RECURSIVE on all platforms 2008-12-09 15:54:31 +0100 sb r265110 : #i95065# do not derive apphelper::LifeTimeGuard from osl::ResettableMutexGuard to avoid problems with VISIBILITY_HIDDEN=TRUE on MSC 2008-12-09 15:40:51 +0100 sb r265104 : #i95065# add VISIBILITY_HIDDEN=TRUE to connectivity/source/drivers/mozab 2008-12-09 15:36:21 +0100 sb r265102 : #i95501# updated SDK_HOME 2008-12-09 15:31:46 +0100 sb r265099 : typo (temppath vs. tmppath) 2008-12-08 11:48:08 +0100 sb r264979 : #i95065# removed spurious ExplicitCategoriesProvider.obj (ExplicitCategoriesProvider.cxx is not in this directory) 2008-12-07 19:41:07 +0100 sb r264960 : #i96994# erroneously doubled backslash caused visibility feature to be disabled for all GCC versions on Mac OS X 2008-12-06 23:54:49 +0100 sb r264948 : changes from trunk that CWS-TOOLING's rebase to DEV300:m37 (r264891) had missed, as files had been moved around on this CWS 2008-12-05 20:29:23 +0100 sb r264919 : #i85508# versions of flex apparently differ in whether input() resp. yyinput() returns zero or EOF upon end of file 2008-12-05 15:37:23 +0100 sb r264908 : #i95315# removed obsolete jut 2008-12-05 15:34:59 +0100 sb r264907 : #i95531# removed empty obsolete directories 2008-12-05 10:09:23 +0100 sb r264891 : CWS-TOOLING: rebase CWS sb102 to trunk@264807 (milestone: DEV300:m37) 2008-12-04 14:50:20 +0100 sb r264845 : #i95065# introduced VISIBILITY_HIDDEN makefile flag to reduce duplications; made additional libraries use VISIBILITY_HIDDEN=TRUE to avoid warnings with recent GCC 4 versions (had to split certain code directories to make changes that would otherwise erroneously affect multiple libraries built in the same makefile); changed connectivity::ORefVector to no longer derive from std::vector, as that caused problems with the MSC implementation of VISIBILITY_HIDDEN=TRUE; replaced uses of JNIEXPORT with SAL_DLLPUBLIC_EXPORT, as the former does not expand to visibility attributes on some platforms where the latter does 2008-12-03 11:29:38 +0100 sb r264759 : #i94583# remove unnecessary (and wrong) assertion check for rtl_getAppCommandArg return value (which is guaranteed to return osl_Process_E_None or not return at all) 2008-12-02 17:18:31 +0100 sb r264724 : #i96809# silenced GCC 4.3.2 warning 2008-12-02 13:29:34 +0100 sb r264695 : #i96797# make get_tmp_dir fail less often 2008-11-28 17:19:24 +0100 sb r264566 : #i95691# inadvertently missing from -c 264564 2008-11-28 17:07:50 +0100 sb r264564 : #i95691# only structs of exactly 1, 2, 4, or 8 bytes are returned through registers 2008-11-25 13:28:08 +0100 sb r264291 : #i96427# support for SAL_EXCEPTION_DLLPUBLIC_EXPORT (patch by np) 2008-11-21 14:45:22 +0100 sb r264140 : #i95428# added SAL_EXCEPTION_DLLPUBLIC_EXPORT and SAL_EXCEPTION_DLLPRIVATE 2008-11-19 13:19:37 +0100 sb r263984 : #i95525# removed erroneous application/octet-stream svn:mime-type properties
2008-12-30 07:32:01 -06:00
SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(const sal_Char** _ppEnvTypeName, uno_Environment** /*_ppEnv*/)
{
*_ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
//---------------------------------------------------------------------------------------
CWS-TOOLING: integrate CWS dba31h 2009-01-29 10:47:07 +0100 oj r267102 : decl OpCodeMap as friend 2009-01-26 09:41:21 +0100 fs r266905 : #i97137# 2009-01-26 09:10:39 +0100 fs r266903 : #i10000 2009-01-26 09:00:17 +0100 fs r266901 : re-enable user admin for MySQL native 2009-01-23 21:56:08 +0100 fs r266851 : #i97137# 2009-01-23 21:32:40 +0100 fs r266850 : #i97042# 2009-01-23 11:23:59 +0100 msc r266800 : #i98387# 2009-01-23 11:17:05 +0100 msc r266798 : #i98387# 2009-01-23 10:56:33 +0100 fs r266795 : for the moment, disable user administration for MySQL native 2009-01-21 15:08:54 +0100 fs r266672 : removed some advanced settings for MySQL native - letting the user control them does not make sense for this particular type 2009-01-21 13:55:13 +0100 oj r266668 : #i98317# wrong var set 2009-01-21 13:41:22 +0100 fs r266664 : #i98315# 2009-01-21 13:13:09 +0100 oj r266661 : #i97032# enable locking for OOo 2009-01-21 13:11:26 +0100 oj r266660 : #i97032# enable locking for OOo 2009-01-21 10:10:50 +0100 oj r266634 : #i98174# merge conflict resolved 2009-01-21 08:48:58 +0100 fs r266628 : CWS-TOOLING: rebase CWS dba31h to trunk@266428 (milestone: DEV300:m39) 2009-01-20 12:54:32 +0100 fs r266570 : #i98277# 2009-01-19 10:46:31 +0100 fs r266480 : #i97995# 2009-01-19 08:42:09 +0100 fs r266470 : #i97042# provided my mod@openoffice.org: support more SQL comment styles 2009-01-19 07:55:43 +0100 oj r266468 : #i98115# check function name as well 2009-01-16 10:21:28 +0100 oj r266404 : #i97861# remove invalid assertion 2009-01-16 10:18:31 +0100 oj r266403 : #i97861# ini var with false 2009-01-15 14:09:50 +0100 oj r266371 : #i97810# saveas fix 2009-01-15 11:54:18 +0100 oj r266360 : remove : from mysql 2009-01-15 11:07:46 +0100 oj r266355 : insert JNI fixes for method names 2009-01-15 10:54:44 +0100 oj r266351 : fix for parameter subst 2009-01-14 14:41:34 +0100 oj r266308 : parameter subst 2009-01-14 14:40:20 +0100 oj r266307 : add missing try catch 2009-01-14 14:38:34 +0100 oj r266306 : new service for parameter subst 2009-01-14 14:37:52 +0100 oj r266305 : missing types for hyper 2009-01-09 15:28:36 +0100 fs r266090 : #i97889# 2009-01-09 14:16:15 +0100 fs r266082 : #i97892# provided by npower: when reading the xlink:href attrib, use the graphic resolver only if appropriate 2009-01-08 21:31:21 +0100 fs r266041 : #i97346# 2009-01-08 14:51:56 +0100 fs r266012 : #i97871# showPreviewFor: bail out if preview is disabled
2009-02-17 09:39:54 -06:00
SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo(void* serviceManager, com::sun::star::registry::XRegistryKey* registryKey)
{
CWS-TOOLING: integrate CWS dba31h 2009-01-29 10:47:07 +0100 oj r267102 : decl OpCodeMap as friend 2009-01-26 09:41:21 +0100 fs r266905 : #i97137# 2009-01-26 09:10:39 +0100 fs r266903 : #i10000 2009-01-26 09:00:17 +0100 fs r266901 : re-enable user admin for MySQL native 2009-01-23 21:56:08 +0100 fs r266851 : #i97137# 2009-01-23 21:32:40 +0100 fs r266850 : #i97042# 2009-01-23 11:23:59 +0100 msc r266800 : #i98387# 2009-01-23 11:17:05 +0100 msc r266798 : #i98387# 2009-01-23 10:56:33 +0100 fs r266795 : for the moment, disable user administration for MySQL native 2009-01-21 15:08:54 +0100 fs r266672 : removed some advanced settings for MySQL native - letting the user control them does not make sense for this particular type 2009-01-21 13:55:13 +0100 oj r266668 : #i98317# wrong var set 2009-01-21 13:41:22 +0100 fs r266664 : #i98315# 2009-01-21 13:13:09 +0100 oj r266661 : #i97032# enable locking for OOo 2009-01-21 13:11:26 +0100 oj r266660 : #i97032# enable locking for OOo 2009-01-21 10:10:50 +0100 oj r266634 : #i98174# merge conflict resolved 2009-01-21 08:48:58 +0100 fs r266628 : CWS-TOOLING: rebase CWS dba31h to trunk@266428 (milestone: DEV300:m39) 2009-01-20 12:54:32 +0100 fs r266570 : #i98277# 2009-01-19 10:46:31 +0100 fs r266480 : #i97995# 2009-01-19 08:42:09 +0100 fs r266470 : #i97042# provided my mod@openoffice.org: support more SQL comment styles 2009-01-19 07:55:43 +0100 oj r266468 : #i98115# check function name as well 2009-01-16 10:21:28 +0100 oj r266404 : #i97861# remove invalid assertion 2009-01-16 10:18:31 +0100 oj r266403 : #i97861# ini var with false 2009-01-15 14:09:50 +0100 oj r266371 : #i97810# saveas fix 2009-01-15 11:54:18 +0100 oj r266360 : remove : from mysql 2009-01-15 11:07:46 +0100 oj r266355 : insert JNI fixes for method names 2009-01-15 10:54:44 +0100 oj r266351 : fix for parameter subst 2009-01-14 14:41:34 +0100 oj r266308 : parameter subst 2009-01-14 14:40:20 +0100 oj r266307 : add missing try catch 2009-01-14 14:38:34 +0100 oj r266306 : new service for parameter subst 2009-01-14 14:37:52 +0100 oj r266305 : missing types for hyper 2009-01-09 15:28:36 +0100 fs r266090 : #i97889# 2009-01-09 14:16:15 +0100 fs r266082 : #i97892# provided by npower: when reading the xlink:href attrib, use the graphic resolver only if appropriate 2009-01-08 21:31:21 +0100 fs r266041 : #i97346# 2009-01-08 14:51:56 +0100 fs r266012 : #i97871# showPreviewFor: bail out if preview is disabled
2009-02-17 09:39:54 -06:00
return cppu::component_writeInfoHelper(serviceManager, registryKey, entries);
}
//---------------------------------------------------------------------------------------
CWS-TOOLING: integrate CWS dba31h 2009-01-29 10:47:07 +0100 oj r267102 : decl OpCodeMap as friend 2009-01-26 09:41:21 +0100 fs r266905 : #i97137# 2009-01-26 09:10:39 +0100 fs r266903 : #i10000 2009-01-26 09:00:17 +0100 fs r266901 : re-enable user admin for MySQL native 2009-01-23 21:56:08 +0100 fs r266851 : #i97137# 2009-01-23 21:32:40 +0100 fs r266850 : #i97042# 2009-01-23 11:23:59 +0100 msc r266800 : #i98387# 2009-01-23 11:17:05 +0100 msc r266798 : #i98387# 2009-01-23 10:56:33 +0100 fs r266795 : for the moment, disable user administration for MySQL native 2009-01-21 15:08:54 +0100 fs r266672 : removed some advanced settings for MySQL native - letting the user control them does not make sense for this particular type 2009-01-21 13:55:13 +0100 oj r266668 : #i98317# wrong var set 2009-01-21 13:41:22 +0100 fs r266664 : #i98315# 2009-01-21 13:13:09 +0100 oj r266661 : #i97032# enable locking for OOo 2009-01-21 13:11:26 +0100 oj r266660 : #i97032# enable locking for OOo 2009-01-21 10:10:50 +0100 oj r266634 : #i98174# merge conflict resolved 2009-01-21 08:48:58 +0100 fs r266628 : CWS-TOOLING: rebase CWS dba31h to trunk@266428 (milestone: DEV300:m39) 2009-01-20 12:54:32 +0100 fs r266570 : #i98277# 2009-01-19 10:46:31 +0100 fs r266480 : #i97995# 2009-01-19 08:42:09 +0100 fs r266470 : #i97042# provided my mod@openoffice.org: support more SQL comment styles 2009-01-19 07:55:43 +0100 oj r266468 : #i98115# check function name as well 2009-01-16 10:21:28 +0100 oj r266404 : #i97861# remove invalid assertion 2009-01-16 10:18:31 +0100 oj r266403 : #i97861# ini var with false 2009-01-15 14:09:50 +0100 oj r266371 : #i97810# saveas fix 2009-01-15 11:54:18 +0100 oj r266360 : remove : from mysql 2009-01-15 11:07:46 +0100 oj r266355 : insert JNI fixes for method names 2009-01-15 10:54:44 +0100 oj r266351 : fix for parameter subst 2009-01-14 14:41:34 +0100 oj r266308 : parameter subst 2009-01-14 14:40:20 +0100 oj r266307 : add missing try catch 2009-01-14 14:38:34 +0100 oj r266306 : new service for parameter subst 2009-01-14 14:37:52 +0100 oj r266305 : missing types for hyper 2009-01-09 15:28:36 +0100 fs r266090 : #i97889# 2009-01-09 14:16:15 +0100 fs r266082 : #i97892# provided by npower: when reading the xlink:href attrib, use the graphic resolver only if appropriate 2009-01-08 21:31:21 +0100 fs r266041 : #i97346# 2009-01-08 14:51:56 +0100 fs r266012 : #i97871# showPreviewFor: bail out if preview is disabled
2009-02-17 09:39:54 -06:00
SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(const sal_Char* implName, ::com::sun::star::lang::XMultiServiceFactory* serviceManager, void* registryKey)
{
CWS-TOOLING: integrate CWS dba31h 2009-01-29 10:47:07 +0100 oj r267102 : decl OpCodeMap as friend 2009-01-26 09:41:21 +0100 fs r266905 : #i97137# 2009-01-26 09:10:39 +0100 fs r266903 : #i10000 2009-01-26 09:00:17 +0100 fs r266901 : re-enable user admin for MySQL native 2009-01-23 21:56:08 +0100 fs r266851 : #i97137# 2009-01-23 21:32:40 +0100 fs r266850 : #i97042# 2009-01-23 11:23:59 +0100 msc r266800 : #i98387# 2009-01-23 11:17:05 +0100 msc r266798 : #i98387# 2009-01-23 10:56:33 +0100 fs r266795 : for the moment, disable user administration for MySQL native 2009-01-21 15:08:54 +0100 fs r266672 : removed some advanced settings for MySQL native - letting the user control them does not make sense for this particular type 2009-01-21 13:55:13 +0100 oj r266668 : #i98317# wrong var set 2009-01-21 13:41:22 +0100 fs r266664 : #i98315# 2009-01-21 13:13:09 +0100 oj r266661 : #i97032# enable locking for OOo 2009-01-21 13:11:26 +0100 oj r266660 : #i97032# enable locking for OOo 2009-01-21 10:10:50 +0100 oj r266634 : #i98174# merge conflict resolved 2009-01-21 08:48:58 +0100 fs r266628 : CWS-TOOLING: rebase CWS dba31h to trunk@266428 (milestone: DEV300:m39) 2009-01-20 12:54:32 +0100 fs r266570 : #i98277# 2009-01-19 10:46:31 +0100 fs r266480 : #i97995# 2009-01-19 08:42:09 +0100 fs r266470 : #i97042# provided my mod@openoffice.org: support more SQL comment styles 2009-01-19 07:55:43 +0100 oj r266468 : #i98115# check function name as well 2009-01-16 10:21:28 +0100 oj r266404 : #i97861# remove invalid assertion 2009-01-16 10:18:31 +0100 oj r266403 : #i97861# ini var with false 2009-01-15 14:09:50 +0100 oj r266371 : #i97810# saveas fix 2009-01-15 11:54:18 +0100 oj r266360 : remove : from mysql 2009-01-15 11:07:46 +0100 oj r266355 : insert JNI fixes for method names 2009-01-15 10:54:44 +0100 oj r266351 : fix for parameter subst 2009-01-14 14:41:34 +0100 oj r266308 : parameter subst 2009-01-14 14:40:20 +0100 oj r266307 : add missing try catch 2009-01-14 14:38:34 +0100 oj r266306 : new service for parameter subst 2009-01-14 14:37:52 +0100 oj r266305 : missing types for hyper 2009-01-09 15:28:36 +0100 fs r266090 : #i97889# 2009-01-09 14:16:15 +0100 fs r266082 : #i97892# provided by npower: when reading the xlink:href attrib, use the graphic resolver only if appropriate 2009-01-08 21:31:21 +0100 fs r266041 : #i97346# 2009-01-08 14:51:56 +0100 fs r266012 : #i97871# showPreviewFor: bail out if preview is disabled
2009-02-17 09:39:54 -06:00
return cppu::component_getFactoryHelper(implName, serviceManager, registryKey, entries);
}
2001-03-28 04:26:47 -06:00
} // extern "C"
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */