Kaydet (Commit) 6af7d067 authored tarafından Andrzej J.R. Hunt's avatar Andrzej J.R. Hunt

Fix warnings for firebird-sdbc.

Mostly unused parameter warnings for unimplemented methods. Done in preparation
for merging to master to allow for building with -Werror.

Change-Id: Ie54f0a642189f5e221919252ec7df5897974ab95
üst 3385abe0
......@@ -591,6 +591,7 @@ void SAL_CALL OConnection::documentEventOccured( const DocumentEvent& _Event )
// XEventListener
void SAL_CALL OConnection::disposing( const EventObject& Source ) throw (RuntimeException)
{
(void) Source;
}
//--------------------------------------------------------------------
void OConnection::buildTypeInfo() throw( SQLException)
......
......@@ -41,7 +41,10 @@
#include <com/sun/star/document/DocumentEvent.hpp>
#include <com/sun/star/document/XDocumentEventListener.hpp>
#include <com/sun/star/embed/XStorage.hpp>
#include "OSubComponent.hxx"
#include "connectivity/OSubComponent.hxx"
#include "connectivity/CommonTools.hxx"
#include "FSubComponent.hxx"
#include "OTypeInfo.hxx"
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
......@@ -50,7 +53,6 @@
#include <com/sun/star/sdbc/XConnection.hpp>
#include <cppuhelper/compbase4.hxx>
#include <cppuhelper/weakref.hxx>
#include <map>
#include <ibase.h>
......@@ -77,9 +79,9 @@ namespace connectivity
class OConnection : public OBase_Mutex,
public OConnection_BASE,
public connectivity::firebird::OSubComponent<OConnection, OConnection_BASE>
public connectivity::OSubComponent<OConnection, OConnection_BASE>
{
friend class connectivity::firebird::OSubComponent<OConnection, OConnection_BASE>;
friend class connectivity::OSubComponent<OConnection, OConnection_BASE>;
protected:
static const OUString sDBLocation; // Location within .odb container
......
......@@ -312,6 +312,7 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsOpenCursorsAcrossRollback( ) throw
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaData::supportsTransactionIsolationLevel( sal_Int32 level ) throw(SQLException, RuntimeException)
{
(void) level;
return sal_False;
}
// -------------------------------------------------------------------------
......@@ -430,6 +431,8 @@ sal_Bool SAL_CALL ODatabaseMetaData::supportsTableCorrelationNames( ) throw(SQL
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaData::supportsConvert( sal_Int32 fromType, sal_Int32 toType ) throw(SQLException, RuntimeException)
{
(void) fromType;
(void) toType;
return sal_False;
}
// -------------------------------------------------------------------------
......@@ -699,56 +702,68 @@ sal_Int32 SAL_CALL ODatabaseMetaData::getMaxUserNameLength( ) throw(SQLExceptio
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetType( sal_Int32 setType ) throw(SQLException, RuntimeException)
{
(void) setType;
return sal_False;
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaData::supportsResultSetConcurrency( sal_Int32 setType, sal_Int32 concurrency ) throw(SQLException, RuntimeException)
{
(void) setType;
(void) concurrency;
return sal_False;
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaData::ownUpdatesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException)
{
(void) setType;
return sal_False;
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaData::ownDeletesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException)
{
(void) setType;
return sal_False;
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaData::ownInsertsAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException)
{
(void) setType;
return sal_False;
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaData::othersUpdatesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException)
{
(void) setType;
return sal_False;
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaData::othersDeletesAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException)
{
(void) setType;
return sal_False;
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaData::othersInsertsAreVisible( sal_Int32 setType ) throw(SQLException, RuntimeException)
{
(void) setType;
return sal_False;
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaData::updatesAreDetected( sal_Int32 setType ) throw(SQLException, RuntimeException)
{
(void) setType;
return sal_False;
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaData::deletesAreDetected( sal_Int32 setType ) throw(SQLException, RuntimeException)
{
(void) setType;
return sal_False;
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL ODatabaseMetaData::insertsAreDetected( sal_Int32 setType ) throw(SQLException, RuntimeException)
{
(void) setType;
return sal_False;
}
// -------------------------------------------------------------------------
......@@ -823,6 +838,10 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumnPrivileges(
const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table,
const ::rtl::OUString& columnNamePattern ) throw(SQLException, RuntimeException)
{
(void) catalog;
(void) schema;
(void) table;
(void) columnNamePattern;
return NULL;
}
// -------------------------------------------------------------------------
......@@ -830,6 +849,10 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getColumns(
const Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& tableNamePattern,
const ::rtl::OUString& columnNamePattern ) throw(SQLException, RuntimeException)
{
(void) catalog;
(void) schemaPattern;
(void) tableNamePattern;
(void) columnNamePattern;
return NULL;
}
// -------------------------------------------------------------------------
......@@ -837,6 +860,8 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
const Any& catalog, const ::rtl::OUString& schemaPattern,
const ::rtl::OUString& tableNamePattern, const Sequence< ::rtl::OUString >& types ) throw(SQLException, RuntimeException)
{
(void) catalog;
(void) types;
SAL_INFO("connectivity.firebird", "=> ODatabaseMetaData::getTables(). "
"Got called with schemaPattern: " << schemaPattern << " , "
"TableNamePattern: " << tableNamePattern);
......@@ -942,6 +967,10 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedureColumns(
const Any& catalog, const ::rtl::OUString& schemaPattern,
const ::rtl::OUString& procedureNamePattern, const ::rtl::OUString& columnNamePattern ) throw(SQLException, RuntimeException)
{
(void) catalog;
(void) schemaPattern;
(void) procedureNamePattern;
(void) columnNamePattern;
return NULL;
}
// -------------------------------------------------------------------------
......@@ -949,30 +978,45 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getProcedures(
const Any& catalog, const ::rtl::OUString& schemaPattern,
const ::rtl::OUString& procedureNamePattern ) throw(SQLException, RuntimeException)
{
(void) catalog;
(void) schemaPattern;
(void) procedureNamePattern;
return NULL;
}
// -------------------------------------------------------------------------
Reference< XResultSet > SAL_CALL ODatabaseMetaData::getVersionColumns(
const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ) throw(SQLException, RuntimeException)
{
(void) catalog;
(void) schema;
(void) table;
return NULL;
}
// -------------------------------------------------------------------------
Reference< XResultSet > SAL_CALL ODatabaseMetaData::getExportedKeys(
const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ) throw(SQLException, RuntimeException)
{
(void) catalog;
(void) schema;
(void) table;
return NULL;
}
// -------------------------------------------------------------------------
Reference< XResultSet > SAL_CALL ODatabaseMetaData::getImportedKeys(
const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ) throw(SQLException, RuntimeException)
{
(void) catalog;
(void) schema;
(void) table;
return NULL;
}
// -------------------------------------------------------------------------
Reference< XResultSet > SAL_CALL ODatabaseMetaData::getPrimaryKeys(
const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table ) throw(SQLException, RuntimeException)
{
(void) catalog;
(void) schema;
(void) table;
return NULL;
}
// -------------------------------------------------------------------------
......@@ -980,6 +1024,11 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getIndexInfo(
const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table,
sal_Bool unique, sal_Bool approximate ) throw(SQLException, RuntimeException)
{
(void) catalog;
(void) schema;
(void) table;
(void) unique;
(void) approximate;
return NULL;
}
// -------------------------------------------------------------------------
......@@ -987,12 +1036,20 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getBestRowIdentifier(
const Any& catalog, const ::rtl::OUString& schema, const ::rtl::OUString& table, sal_Int32 scope,
sal_Bool nullable ) throw(SQLException, RuntimeException)
{
(void) catalog;
(void) schema;
(void) table;
(void) scope;
(void) nullable;
return NULL;
}
// -------------------------------------------------------------------------
Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTablePrivileges(
const Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& tableNamePattern ) throw(SQLException, RuntimeException)
{
(void) catalog;
(void) schemaPattern;
(void) tableNamePattern;
return NULL;
}
// -------------------------------------------------------------------------
......@@ -1001,11 +1058,21 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getCrossReference(
const ::rtl::OUString& primaryTable, const Any& foreignCatalog,
const ::rtl::OUString& foreignSchema, const ::rtl::OUString& foreignTable ) throw(SQLException, RuntimeException)
{
(void) primaryCatalog;
(void) primarySchema;
(void) primaryTable;
(void) foreignCatalog;
(void) foreignSchema;
(void) foreignTable;
return NULL;
}
// -------------------------------------------------------------------------
Reference< XResultSet > SAL_CALL ODatabaseMetaData::getUDTs( const Any& catalog, const ::rtl::OUString& schemaPattern, const ::rtl::OUString& typeNamePattern, const Sequence< sal_Int32 >& types ) throw(SQLException, RuntimeException)
{
(void) catalog;
(void) schemaPattern;
(void) typeNamePattern;
(void) types;
OSL_FAIL("Not implemented yet!");
throw SQLException();
return NULL;
......
......@@ -63,7 +63,7 @@ IMPLEMENT_SERVICE_INFO(OPreparedStatement,"com.sun.star.sdbcx.firebird.PreparedS
* Print the status, the SQLCODE, and exit.
* Also, indicate which operation the error occured on.
*/
static int pr_error (const ISC_STATUS* status, char* operation)
static int pr_error (const ISC_STATUS* status, const char* operation)
{
SAL_WARN("connectivity.firebird", "=> OPreparedStatement static pr_error().");
......@@ -80,9 +80,9 @@ static int pr_error (const ISC_STATUS* status, char* operation)
OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const TTypeInfoVector& _TypeInfo,const ::rtl::OUString& sql)
:OStatement_BASE2(_pConnection)
,m_aTypeInfo(_TypeInfo)
,m_bPrepared(sal_False)
,m_sSqlStatement(sql)
,m_nNumParams(0)
,m_sSqlStatement(sql)
,m_bPrepared(sal_False)
{
SAL_INFO("connectivity.firebird", "=> OPreparedStatement::OPreparedStatement_BASE(). "
"sql: " << sql);
......@@ -260,6 +260,8 @@ Reference< XResultSet > SAL_CALL OPreparedStatement::executeQuery( ) throw(SQLE
void SAL_CALL OPreparedStatement::setBoolean( sal_Int32 parameterIndex, sal_Bool x ) throw(SQLException, RuntimeException)
{
(void) parameterIndex;
(void) x;
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
......@@ -267,6 +269,8 @@ void SAL_CALL OPreparedStatement::setBoolean( sal_Int32 parameterIndex, sal_Bool
// -------------------------------------------------------------------------
void SAL_CALL OPreparedStatement::setByte( sal_Int32 parameterIndex, sal_Int8 x ) throw(SQLException, RuntimeException)
{
(void) parameterIndex;
(void) x;
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
......@@ -276,6 +280,8 @@ void SAL_CALL OPreparedStatement::setByte( sal_Int32 parameterIndex, sal_Int8 x
void SAL_CALL OPreparedStatement::setDate( sal_Int32 parameterIndex, const Date& aData ) throw(SQLException, RuntimeException)
{
(void) parameterIndex;
(void) aData;
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
......@@ -285,6 +291,8 @@ void SAL_CALL OPreparedStatement::setDate( sal_Int32 parameterIndex, const Date&
void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const Time& aVal ) throw(SQLException, RuntimeException)
{
(void) parameterIndex;
(void) aVal;
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
......@@ -293,6 +301,8 @@ void SAL_CALL OPreparedStatement::setTime( sal_Int32 parameterIndex, const Time&
void SAL_CALL OPreparedStatement::setTimestamp( sal_Int32 parameterIndex, const DateTime& aVal ) throw(SQLException, RuntimeException)
{
(void) parameterIndex;
(void) aVal;
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
......@@ -301,6 +311,8 @@ void SAL_CALL OPreparedStatement::setTimestamp( sal_Int32 parameterIndex, const
void SAL_CALL OPreparedStatement::setDouble( sal_Int32 parameterIndex, double x ) throw(SQLException, RuntimeException)
{
(void) parameterIndex;
(void) x;
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
......@@ -310,6 +322,8 @@ void SAL_CALL OPreparedStatement::setDouble( sal_Int32 parameterIndex, double x
void SAL_CALL OPreparedStatement::setFloat( sal_Int32 parameterIndex, float x ) throw(SQLException, RuntimeException)
{
(void) parameterIndex;
(void) x;
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
......@@ -318,6 +332,8 @@ void SAL_CALL OPreparedStatement::setFloat( sal_Int32 parameterIndex, float x )
void SAL_CALL OPreparedStatement::setInt( sal_Int32 parameterIndex, sal_Int32 x ) throw(SQLException, RuntimeException)
{
(void) parameterIndex;
(void) x;
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
......@@ -326,6 +342,8 @@ void SAL_CALL OPreparedStatement::setInt( sal_Int32 parameterIndex, sal_Int32 x
void SAL_CALL OPreparedStatement::setLong( sal_Int32 parameterIndex, sal_Int64 aVal ) throw(SQLException, RuntimeException)
{
(void) parameterIndex;
(void) aVal;
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
......@@ -334,6 +352,8 @@ void SAL_CALL OPreparedStatement::setLong( sal_Int32 parameterIndex, sal_Int64 a
void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 sqlType ) throw(SQLException, RuntimeException)
{
(void) parameterIndex;
(void) sqlType;
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
......@@ -342,6 +362,8 @@ void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 s
void SAL_CALL OPreparedStatement::setClob( sal_Int32 parameterIndex, const Reference< XClob >& x ) throw(SQLException, RuntimeException)
{
(void) parameterIndex;
(void) x;
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
......@@ -350,6 +372,8 @@ void SAL_CALL OPreparedStatement::setClob( sal_Int32 parameterIndex, const Refer
void SAL_CALL OPreparedStatement::setBlob( sal_Int32 parameterIndex, const Reference< XBlob >& x ) throw(SQLException, RuntimeException)
{
(void) parameterIndex;
(void) x;
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
......@@ -358,6 +382,8 @@ void SAL_CALL OPreparedStatement::setBlob( sal_Int32 parameterIndex, const Refer
void SAL_CALL OPreparedStatement::setArray( sal_Int32 parameterIndex, const Reference< XArray >& x ) throw(SQLException, RuntimeException)
{
(void) parameterIndex;
(void) x;
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
......@@ -366,6 +392,8 @@ void SAL_CALL OPreparedStatement::setArray( sal_Int32 parameterIndex, const Refe
void SAL_CALL OPreparedStatement::setRef( sal_Int32 parameterIndex, const Reference< XRef >& x ) throw(SQLException, RuntimeException)
{
(void) parameterIndex;
(void) x;
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
......@@ -374,6 +402,10 @@ void SAL_CALL OPreparedStatement::setRef( sal_Int32 parameterIndex, const Refere
void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, const Any& x, sal_Int32 sqlType, sal_Int32 scale ) throw(SQLException, RuntimeException)
{
(void) parameterIndex;
(void) x;
(void) sqlType;
(void) scale;
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
::osl::MutexGuard aGuard( m_aMutex );
......@@ -382,6 +414,9 @@ void SAL_CALL OPreparedStatement::setObjectWithInfo( sal_Int32 parameterIndex, c
void SAL_CALL OPreparedStatement::setObjectNull( sal_Int32 parameterIndex, sal_Int32 sqlType, const ::rtl::OUString& typeName ) throw(SQLException, RuntimeException)
{
(void) parameterIndex;
(void) sqlType;
(void) typeName;
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
......@@ -390,6 +425,8 @@ void SAL_CALL OPreparedStatement::setObjectNull( sal_Int32 parameterIndex, sal_I
void SAL_CALL OPreparedStatement::setObject( sal_Int32 parameterIndex, const Any& x ) throw(SQLException, RuntimeException)
{
(void) parameterIndex;
(void) x;
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
......@@ -398,6 +435,8 @@ void SAL_CALL OPreparedStatement::setObject( sal_Int32 parameterIndex, const Any
void SAL_CALL OPreparedStatement::setShort( sal_Int32 parameterIndex, sal_Int16 x ) throw(SQLException, RuntimeException)
{
(void) parameterIndex;
(void) x;
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
......@@ -406,6 +445,8 @@ void SAL_CALL OPreparedStatement::setShort( sal_Int32 parameterIndex, sal_Int16
void SAL_CALL OPreparedStatement::setBytes( sal_Int32 parameterIndex, const Sequence< sal_Int8 >& x ) throw(SQLException, RuntimeException)
{
(void) parameterIndex;
(void) x;
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
......@@ -415,6 +456,9 @@ void SAL_CALL OPreparedStatement::setBytes( sal_Int32 parameterIndex, const Sequ
void SAL_CALL OPreparedStatement::setCharacterStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
{
(void) parameterIndex;
(void) x;
(void) length;
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
......@@ -423,6 +467,9 @@ void SAL_CALL OPreparedStatement::setCharacterStream( sal_Int32 parameterIndex,
void SAL_CALL OPreparedStatement::setBinaryStream( sal_Int32 parameterIndex, const Reference< ::com::sun::star::io::XInputStream >& x, sal_Int32 length ) throw(SQLException, RuntimeException)
{
(void) parameterIndex;
(void) x;
(void) length;
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
......
......@@ -49,7 +49,7 @@
#include <com/sun/star/sdbcx/XDeleteRows.hpp>
#include <cppuhelper/compbase12.hxx>
#include "FStatement.hxx"
#include "OSubComponent.hxx"
#include "connectivity/OSubComponent.hxx"
#include <ibase.h>
......
......@@ -40,6 +40,7 @@ using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::sdbc;
// -------------------------------------------------------------------------
OResultSetMetaData::~OResultSetMetaData()
{
......@@ -48,12 +49,14 @@ OResultSetMetaData::~OResultSetMetaData()
// -------------------------------------------------------------------------
sal_Int32 SAL_CALL OResultSetMetaData::getColumnDisplaySize( sal_Int32 column ) throw(SQLException, RuntimeException)
{
(void) column;
return 50;
}
// -------------------------------------------------------------------------
sal_Int32 SAL_CALL OResultSetMetaData::getColumnType( sal_Int32 column ) throw(SQLException, RuntimeException)
{
(void) column;
sal_Int32 nType = 0;
return nType;
}
......@@ -68,55 +71,65 @@ sal_Int32 SAL_CALL OResultSetMetaData::getColumnCount( ) throw(SQLException, Ru
sal_Bool SAL_CALL OResultSetMetaData::isCaseSensitive( sal_Int32 column ) throw(SQLException, RuntimeException)
{
(void) column;
return sal_True;
}
// -------------------------------------------------------------------------
::rtl::OUString SAL_CALL OResultSetMetaData::getSchemaName( sal_Int32 column ) throw(SQLException, RuntimeException)
{
(void) column;
return ::rtl::OUString();
}
// -------------------------------------------------------------------------
::rtl::OUString SAL_CALL OResultSetMetaData::getColumnName( sal_Int32 column ) throw(SQLException, RuntimeException)
{
(void) column;
return ::rtl::OUString("Column") + ::rtl::OUString::valueOf(column);
}
// -------------------------------------------------------------------------
::rtl::OUString SAL_CALL OResultSetMetaData::getTableName( sal_Int32 column ) throw(SQLException, RuntimeException)
{
(void) column;
return ::rtl::OUString();
}
// -------------------------------------------------------------------------
::rtl::OUString SAL_CALL OResultSetMetaData::getCatalogName( sal_Int32 column ) throw(SQLException, RuntimeException)
{
(void) column;
return ::rtl::OUString();
}
// -------------------------------------------------------------------------
::rtl::OUString SAL_CALL OResultSetMetaData::getColumnTypeName( sal_Int32 column ) throw(SQLException, RuntimeException)
{
(void) column;
return ::rtl::OUString();
}
// -------------------------------------------------------------------------
::rtl::OUString SAL_CALL OResultSetMetaData::getColumnLabel( sal_Int32 column ) throw(SQLException, RuntimeException)
{
(void) column;
return ::rtl::OUString();
}
// -------------------------------------------------------------------------
::rtl::OUString SAL_CALL OResultSetMetaData::getColumnServiceName( sal_Int32 column ) throw(SQLException, RuntimeException)
{
(void) column;
return ::rtl::OUString();
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL OResultSetMetaData::isCurrency( sal_Int32 column ) throw(SQLException, RuntimeException)
{
(void) column;
return sal_False;
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL OResultSetMetaData::isAutoIncrement( sal_Int32 column ) throw(SQLException, RuntimeException)
{
(void) column;
return sal_False;
}
// -------------------------------------------------------------------------
......@@ -124,46 +137,53 @@ sal_Bool SAL_CALL OResultSetMetaData::isAutoIncrement( sal_Int32 column ) throw(
sal_Bool SAL_CALL OResultSetMetaData::isSigned( sal_Int32 column ) throw(SQLException, RuntimeException)
{
(void) column;
return sal_False;
}
// -------------------------------------------------------------------------
sal_Int32 SAL_CALL OResultSetMetaData::getPrecision( sal_Int32 column ) throw(SQLException, RuntimeException)
{
(void) column;
return 0;
}
// -----------------------------------------------------------------------------
sal_Int32 SAL_CALL OResultSetMetaData::getScale( sal_Int32 column ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
(void) column;
return 0;
}
// -------------------------------------------------------------------------
sal_Int32 SAL_CALL OResultSetMetaData::isNullable( sal_Int32 column ) throw(SQLException, RuntimeException)
{
(void) column;
return 0;
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL OResultSetMetaData::isSearchable( sal_Int32 column ) throw(SQLException, RuntimeException)
{
(void) column;
return sal_True;
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL OResultSetMetaData::isReadOnly( sal_Int32 column ) throw(SQLException, RuntimeException)
{
(void) column;
return sal_True;
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL OResultSetMetaData::isDefinitelyWritable( sal_Int32 column ) throw(SQLException, RuntimeException)
{
(void) column;
return sal_False;
;
}
// -------------------------------------------------------------------------
sal_Bool SAL_CALL OResultSetMetaData::isWritable( sal_Int32 column ) throw(SQLException, RuntimeException)
{
(void) column;
return sal_False;
}
// -------------------------------------------------------------------------
......
......@@ -74,7 +74,7 @@ void REGISTER_PROVIDER(
Reference< ::com::sun::star::registry::XRegistryKey > xNewKey( xKey->createKey(aMainKeyName) );
OSL_ENSURE(xNewKey.is(), "FIREBIRD::component_writeInfo : could not create a registry key !");
for (sal_uInt32 i=0; i<Services.getLength(); ++i)
for (sal_Int32 i=0; i<Services.getLength(); ++i)
xNewKey->createKey(Services[i]);
}
......@@ -123,6 +123,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL firebird_sdbc_component_getFactor
void* pServiceManager,
void* pRegistryKey)
{
(void) pRegistryKey;
void* pRet = 0;
if (pServiceManager)
{
......
......@@ -46,7 +46,7 @@
#include <cppuhelper/compbase5.hxx>
#include "FConnection.hxx"
#include <list>
#include "OSubComponent.hxx"
#include "connectivity/OSubComponent.hxx"
#include <com/sun/star/lang/XServiceInfo.hpp>
namespace connectivity
......
......@@ -33,8 +33,8 @@
*
*************************************************************************/
#ifndef _CONNECTIVITY_OSUBCOMPONENT_HXX_
#define _CONNECTIVITY_OSUBCOMPONENT_HXX_
#ifndef _CONNECTIVITY_FSUBCOMPONENT_HXX_
#define _CONNECTIVITY_FSUBCOMPONENT_HXX_
#include <cppuhelper/weak.hxx>
#include <cppuhelper/interfacecontainer.h>
......@@ -219,36 +219,9 @@ namespace connectivity
}
#define DECLARE_SERVICE_INFO() \
virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); \
virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException); \
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException) \
#define IMPLEMENT_SERVICE_INFO(classname, implasciiname, serviceasciiname) \
::rtl::OUString SAL_CALL classname::getImplementationName( ) throw (::com::sun::star::uno::RuntimeException) \
{ \
return ::rtl::OUString::createFromAscii(implasciiname); \
} \
::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL classname::getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException) \
{ \
::com::sun::star::uno::Sequence< ::rtl::OUString > aSupported(1); \
aSupported[0] = ::rtl::OUString::createFromAscii(serviceasciiname); \
return aSupported; \
} \
sal_Bool SAL_CALL classname::supportsService( const ::rtl::OUString& _rServiceName ) throw(::com::sun::star::uno::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; \
} \
}
}
#endif // _CONNECTIVITY_OSUBCOMPONENT_HXX_
#endif // _CONNECTIVITY_FSUBCOMPONENT_HXX_
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment