Kaydet (Commit) 1d29e817 authored tarafından Ivo Hinkelmann's avatar Ivo Hinkelmann

INTEGRATION: CWS dba24c (1.3.142); FILE MERGED

2007/09/20 18:35:33 fs 1.3.142.1: #i80856# some error strings now taken from ::connectivity::SQLError, using the new css.sdb.ErrorCondition
üst 14a0cc5c
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: connectiontools.cxx,v $ * $RCSfile: connectiontools.cxx,v $
* *
* $Revision: 1.3 $ * $Revision: 1.4 $
* *
* last change: $Author: obo $ $Date: 2006-09-17 06:49:31 $ * last change: $Author: ihi $ $Date: 2007-11-21 15:45:12 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -88,8 +88,8 @@ namespace sdbtools ...@@ -88,8 +88,8 @@ namespace sdbtools
//= ConnectionTools //= ConnectionTools
//==================================================================== //====================================================================
//-------------------------------------------------------------------- //--------------------------------------------------------------------
ConnectionTools::ConnectionTools( const Reference< XComponentContext >& _rxContext ) ConnectionTools::ConnectionTools( const ::comphelper::ComponentContext& _rContext )
:m_aContext( _rxContext ) :ConnectionDependentComponent( _rContext )
{ {
} }
...@@ -102,21 +102,21 @@ namespace sdbtools ...@@ -102,21 +102,21 @@ namespace sdbtools
Reference< XTableName > SAL_CALL ConnectionTools::createTableName() throw (RuntimeException) Reference< XTableName > SAL_CALL ConnectionTools::createTableName() throw (RuntimeException)
{ {
EntryGuard aGuard( *this ); EntryGuard aGuard( *this );
return new TableName( getConnection() ); return new TableName( getContext(), getConnection() );
} }
//-------------------------------------------------------------------- //--------------------------------------------------------------------
Reference< XObjectNames > SAL_CALL ConnectionTools::getObjectNames() throw (RuntimeException) Reference< XObjectNames > SAL_CALL ConnectionTools::getObjectNames() throw (RuntimeException)
{ {
EntryGuard aGuard( *this ); EntryGuard aGuard( *this );
return new ObjectNames( getConnection() ); return new ObjectNames( getContext(), getConnection() );
} }
//-------------------------------------------------------------------- //--------------------------------------------------------------------
Reference< XDataSourceMetaData > SAL_CALL ConnectionTools::getDataSourceMetaData() throw (RuntimeException) Reference< XDataSourceMetaData > SAL_CALL ConnectionTools::getDataSourceMetaData() throw (RuntimeException)
{ {
EntryGuard aGuard( *this ); EntryGuard aGuard( *this );
return new DataSourceMetaData( getConnection() ); return new DataSourceMetaData( getContext(), getConnection() );
} }
//-------------------------------------------------------------------- //--------------------------------------------------------------------
...@@ -157,7 +157,7 @@ namespace sdbtools ...@@ -157,7 +157,7 @@ namespace sdbtools
//-------------------------------------------------------------------- //--------------------------------------------------------------------
Reference< XInterface > SAL_CALL ConnectionTools::Create(const Reference< XComponentContext >& _rxContext ) Reference< XInterface > SAL_CALL ConnectionTools::Create(const Reference< XComponentContext >& _rxContext )
{ {
return *( new ConnectionTools( _rxContext ) ); return *( new ConnectionTools( ::comphelper::ComponentContext( _rxContext ) ) );
} }
//-------------------------------------------------------------------- //--------------------------------------------------------------------
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: datasourcemetadata.cxx,v $ * $RCSfile: datasourcemetadata.cxx,v $
* *
* $Revision: 1.3 $ * $Revision: 1.4 $
* *
* last change: $Author: obo $ $Date: 2006-09-17 06:49:46 $ * last change: $Author: ihi $ $Date: 2007-11-21 15:45:50 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -73,8 +73,9 @@ namespace sdbtools ...@@ -73,8 +73,9 @@ namespace sdbtools
//= DataSourceMetaData //= DataSourceMetaData
//==================================================================== //====================================================================
//-------------------------------------------------------------------- //--------------------------------------------------------------------
DataSourceMetaData::DataSourceMetaData( const Reference< XConnection >& _rxConnection ) DataSourceMetaData::DataSourceMetaData( const ::comphelper::ComponentContext& _rContext, const Reference< XConnection >& _rxConnection )
:m_pImpl( new DataSourceMetaData_Impl ) :ConnectionDependentComponent( _rContext )
,m_pImpl( new DataSourceMetaData_Impl )
{ {
if ( !_rxConnection.is() ) if ( !_rxConnection.is() )
throw NullPointerException(); throw NullPointerException();
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: tablename.cxx,v $ * $RCSfile: tablename.cxx,v $
* *
* $Revision: 1.3 $ * $Revision: 1.4 $
* *
* last change: $Author: obo $ $Date: 2006-09-17 06:50:13 $ * last change: $Author: ihi $ $Date: 2007-11-21 15:47:16 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -36,35 +36,20 @@ ...@@ -36,35 +36,20 @@
// MARKER(update_precomp.py): autogen include statement, do not remove // MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_dbaccess.hxx" #include "precompiled_dbaccess.hxx"
#ifndef DBACCESS_SOURCE_SDBTOOLS_CONNECTION_TABLENAME_HXX
#include "tablename.hxx" #include "tablename.hxx"
#endif #include "sdbt_resource.hrc"
#ifndef DBACCESS_MODULE_SDBT_HXX
#include "module_sdbt.hxx" #include "module_sdbt.hxx"
#endif
#ifndef DBACCESS_SHARED_SDBTSTRINGS_HRC
#include "sdbtstrings.hrc" #include "sdbtstrings.hrc"
#endif
/** === begin UNO includes === **/ /** === begin UNO includes === **/
#ifndef _COM_SUN_STAR_LANG_NULLPOINTEREXCEPTION_HPP_
#include <com/sun/star/lang/NullPointerException.hpp> #include <com/sun/star/lang/NullPointerException.hpp>
#endif
#ifndef _COM_SUN_STAR_SDB_TOOLS_COMPOSITIONTYPE_HPP_
#include <com/sun/star/sdb/tools/CompositionType.hpp> #include <com/sun/star/sdb/tools/CompositionType.hpp>
#endif
#ifndef _COM_SUN_STAR_SDBCX_XTABLESSUPPLIER_HPP_
#include <com/sun/star/sdbcx/XTablesSupplier.hpp> #include <com/sun/star/sdbcx/XTablesSupplier.hpp>
#endif
/** === end UNO includes === **/ /** === end UNO includes === **/
#ifndef _CONNECTIVITY_DBTOOLS_HXX_
#include <connectivity/dbtools.hxx> #include <connectivity/dbtools.hxx>
#endif
#ifndef TOOLS_DIAGNOSE_EX_H
#include <tools/diagnose_ex.h> #include <tools/diagnose_ex.h>
#endif #include <tools/string.hxx>
//........................................................................ //........................................................................
namespace sdbtools namespace sdbtools
...@@ -108,8 +93,9 @@ namespace sdbtools ...@@ -108,8 +93,9 @@ namespace sdbtools
//= TableName //= TableName
//==================================================================== //====================================================================
//-------------------------------------------------------------------- //--------------------------------------------------------------------
TableName::TableName( const Reference< XConnection >& _rxConnection ) TableName::TableName( const ::comphelper::ComponentContext& _rContext, const Reference< XConnection >& _rxConnection )
:m_pImpl( new TableName_Impl ) :ConnectionDependentComponent( _rContext )
,m_pImpl( new TableName_Impl )
{ {
if ( !_rxConnection.is() ) if ( !_rxConnection.is() )
throw NullPointerException(); throw NullPointerException();
...@@ -211,11 +197,10 @@ namespace sdbtools ...@@ -211,11 +197,10 @@ namespace sdbtools
|| !xPSI->hasPropertyByName( PROPERTY_NAME ) || !xPSI->hasPropertyByName( PROPERTY_NAME )
) )
throw IllegalArgumentException( throw IllegalArgumentException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "The given object is no table object." ) ), String( SdbtRes( STR_NO_TABLE_OBJECT ) ),
*this, *this,
0 0
); );
// TODO: resource
try try
{ {
...@@ -224,14 +209,9 @@ namespace sdbtools ...@@ -224,14 +209,9 @@ namespace sdbtools
OSL_VERIFY( _table->getPropertyValue( PROPERTY_NAME ) >>= m_pImpl->sName ); OSL_VERIFY( _table->getPropertyValue( PROPERTY_NAME ) >>= m_pImpl->sName );
} }
catch( const RuntimeException& ) { throw; } catch( const RuntimeException& ) { throw; }
catch( const Exception& ) catch( const Exception& e )
{ {
throw IllegalArgumentException( throw IllegalArgumentException( e.Message, e.Context, 0 );
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "An unknown error occured while examining the given table object." ) ),
*this,
0
);
// TODO: resource
} }
} }
...@@ -265,11 +245,10 @@ namespace sdbtools ...@@ -265,11 +245,10 @@ namespace sdbtools
found = true; found = true;
if ( !found ) if ( !found )
throw IllegalArgumentException( throw IllegalArgumentException(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Invalid composition type (not from com.sun.star.sdb.tools.CompositionType)" ) ), String( SdbtRes( STR_INVALID_COMPOSITION_TYPE ) ),
NULL, NULL,
0 0
); );
// TODO: resource
return TypeTable[i].eComposeRule; return TypeTable[i].eComposeRule;
} }
......
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