Clean up function declarations and some unused functions
Change-Id: I4c63cd304908ce0e8ae3f9938d7323225dd314a5
This commit is contained in:
@@ -17,6 +17,9 @@
|
|||||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <sal/config.h>
|
||||||
|
|
||||||
|
#include <boost/noncopyable.hpp>
|
||||||
#include "connectivity/TTableHelper.hxx"
|
#include "connectivity/TTableHelper.hxx"
|
||||||
#include <com/sun/star/sdbc/XRow.hpp>
|
#include <com/sun/star/sdbc/XRow.hpp>
|
||||||
#include <com/sun/star/sdbc/XResultSet.hpp>
|
#include <com/sun/star/sdbc/XResultSet.hpp>
|
||||||
@@ -50,13 +53,12 @@ namespace
|
|||||||
{
|
{
|
||||||
/// helper class for column property change events which holds the OComponentDefinition weak
|
/// helper class for column property change events which holds the OComponentDefinition weak
|
||||||
typedef ::cppu::WeakImplHelper1 < XContainerListener > OTableContainerListener_BASE;
|
typedef ::cppu::WeakImplHelper1 < XContainerListener > OTableContainerListener_BASE;
|
||||||
class OTableContainerListener : public OTableContainerListener_BASE
|
class OTableContainerListener:
|
||||||
|
public OTableContainerListener_BASE, private boost::noncopyable
|
||||||
{
|
{
|
||||||
OTableHelper* m_pComponent;
|
OTableHelper* m_pComponent;
|
||||||
::std::map< OUString,bool> m_aRefNames;
|
::std::map< OUString,bool> m_aRefNames;
|
||||||
|
|
||||||
OTableContainerListener(const OTableContainerListener&);
|
|
||||||
void operator =(const OTableContainerListener&);
|
|
||||||
protected:
|
protected:
|
||||||
virtual ~OTableContainerListener(){}
|
virtual ~OTableContainerListener(){}
|
||||||
public:
|
public:
|
||||||
|
@@ -40,31 +40,6 @@ using namespace ::com::sun::star::sdbcx;
|
|||||||
using namespace ::com::sun::star::sdbc;
|
using namespace ::com::sun::star::sdbc;
|
||||||
using namespace ::com::sun::star::lang;
|
using namespace ::com::sun::star::lang;
|
||||||
|
|
||||||
OUString implGetExceptionMsg( Exception& e, const OUString& aExceptionType_ )
|
|
||||||
{
|
|
||||||
OUString aExceptionType = aExceptionType_;
|
|
||||||
if( aExceptionType.isEmpty() )
|
|
||||||
aExceptionType = "Unknown";
|
|
||||||
|
|
||||||
OUString aTypeLine( "\nType: " );
|
|
||||||
aTypeLine += aExceptionType;
|
|
||||||
|
|
||||||
OUString aMessageLine( "\nMessage: " );
|
|
||||||
aMessageLine += e.Message;
|
|
||||||
|
|
||||||
OUString aMsg(aTypeLine);
|
|
||||||
aMsg += aMessageLine;
|
|
||||||
return aMsg;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Exception type unknown
|
|
||||||
OUString implGetExceptionMsg( Exception& e )
|
|
||||||
{
|
|
||||||
OUString aMsg = implGetExceptionMsg( e, OUString() );
|
|
||||||
return aMsg;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
OEvoabConnection::OEvoabConnection( OEvoabDriver& _rDriver )
|
OEvoabConnection::OEvoabConnection( OEvoabDriver& _rDriver )
|
||||||
:OSubComponent<OEvoabConnection, OConnection_BASE>( (::cppu::OWeakObject*)(&_rDriver), this )
|
:OSubComponent<OEvoabConnection, OConnection_BASE>( (::cppu::OWeakObject*)(&_rDriver), this )
|
||||||
,m_rDriver(_rDriver)
|
,m_rDriver(_rDriver)
|
||||||
|
@@ -40,29 +40,6 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
|
|||||||
rtl_ModuleCount* _pTemp
|
rtl_ModuleCount* _pTemp
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// The required C-Api must be provided!
|
|
||||||
// It contains of 3 special functions that have to be exported.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void REGISTER_PROVIDER(
|
|
||||||
const OUString& aServiceImplName,
|
|
||||||
const Sequence< OUString>& Services,
|
|
||||||
const Reference< ::com::sun::star::registry::XRegistryKey > & xKey)
|
|
||||||
{
|
|
||||||
OUString aMainKeyName = "/" + aServiceImplName + "/UNO/SERVICES";
|
|
||||||
|
|
||||||
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_Int32 i=0; i<Services.getLength(); ++i)
|
|
||||||
xNewKey->createKey(Services[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct ProviderRequest
|
struct ProviderRequest
|
||||||
{
|
{
|
||||||
Reference< XSingleServiceFactory > xRet;
|
Reference< XSingleServiceFactory > xRet;
|
||||||
|
@@ -83,33 +83,6 @@ namespace GraphicColorMode = ::com::sun::star::graphic::GraphicColorMode;
|
|||||||
|
|
||||||
namespace connectivity { namespace hsqldb
|
namespace connectivity { namespace hsqldb
|
||||||
{
|
{
|
||||||
|
|
||||||
// = FlushListeners
|
|
||||||
|
|
||||||
typedef ::comphelper::OListenerContainerBase< XFlushListener, EventObject > FlushListeners_Base;
|
|
||||||
class FlushListeners : public FlushListeners_Base
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
FlushListeners( ::osl::Mutex& _rMutex ) :FlushListeners_Base( _rMutex ) { }
|
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual bool implTypedNotify(
|
|
||||||
const Reference< XFlushListener >& _rxListener,
|
|
||||||
const EventObject& _rEvent
|
|
||||||
) SAL_THROW( ( Exception ) ) SAL_OVERRIDE;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
bool FlushListeners::implTypedNotify( const Reference< XFlushListener >& _rxListener, const EventObject& _rEvent ) SAL_THROW( ( Exception ) )
|
|
||||||
{
|
|
||||||
_rxListener->flushed( _rEvent );
|
|
||||||
return true; // continue notifying the other listeners, if any
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// = OHsqlConnection
|
|
||||||
|
|
||||||
|
|
||||||
void SAL_CALL OHsqlConnection::disposing(void)
|
void SAL_CALL OHsqlConnection::disposing(void)
|
||||||
{
|
{
|
||||||
m_aFlushListeners.disposeAndClear( EventObject( *this ) );
|
m_aFlushListeners.disposeAndClear( EventObject( *this ) );
|
||||||
|
@@ -35,47 +35,6 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
|
|||||||
rtl_ModuleCount*
|
rtl_ModuleCount*
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
struct ProviderRequest
|
|
||||||
{
|
|
||||||
Reference< XSingleServiceFactory > xRet;
|
|
||||||
Reference< XMultiServiceFactory > const xServiceManager;
|
|
||||||
OUString const sImplementationName;
|
|
||||||
|
|
||||||
ProviderRequest(
|
|
||||||
void* pServiceManager,
|
|
||||||
sal_Char const* pImplementationName
|
|
||||||
)
|
|
||||||
: xServiceManager(reinterpret_cast<XMultiServiceFactory*>(pServiceManager))
|
|
||||||
, sImplementationName(OUString::createFromAscii(pImplementationName))
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
inline
|
|
||||||
sal_Bool CREATE_PROVIDER(
|
|
||||||
const OUString& Implname,
|
|
||||||
const Sequence< OUString > & Services,
|
|
||||||
::cppu::ComponentInstantiation Factory,
|
|
||||||
createFactoryFunc creator
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if (!xRet.is() && (Implname == sImplementationName))
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
xRet = creator( xServiceManager, sImplementationName,Factory, Services,0);
|
|
||||||
}
|
|
||||||
catch(...)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return xRet.is();
|
|
||||||
}
|
|
||||||
|
|
||||||
void* getProvider() const { return xRet.get(); }
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL mysql_component_getFactory(
|
extern "C" SAL_DLLPUBLIC_EXPORT void* SAL_CALL mysql_component_getFactory(
|
||||||
const sal_Char* pImplementationName,
|
const sal_Char* pImplementationName,
|
||||||
void* pServiceManager,
|
void* pServiceManager,
|
||||||
|
@@ -25,7 +25,6 @@
|
|||||||
|
|
||||||
namespace connectivity
|
namespace connectivity
|
||||||
{
|
{
|
||||||
sal_Bool LoadFunctions(oslModule pODBCso);
|
|
||||||
sal_Bool LoadLibrary_ODBC3(OUString &_rPath);
|
sal_Bool LoadLibrary_ODBC3(OUString &_rPath);
|
||||||
// extern declaration of the function pointer
|
// extern declaration of the function pointer
|
||||||
extern T3SQLAllocHandle pODBC3SQLAllocHandle;
|
extern T3SQLAllocHandle pODBC3SQLAllocHandle;
|
||||||
|
@@ -28,7 +28,7 @@ namespace connectivity
|
|||||||
{
|
{
|
||||||
|
|
||||||
// sal_Bool LoadFunctions(oslModule pODBCso, sal_Bool _bDS=sal_True);
|
// sal_Bool LoadFunctions(oslModule pODBCso, sal_Bool _bDS=sal_True);
|
||||||
// sal_Bool LoadLibrary_ODBC3(OUString &_rPath);
|
sal_Bool LoadLibrary_ODBC3(OUString &_rPath);
|
||||||
// sal_Bool LoadLibrary_ADABAS(OUString &_rPath);
|
// sal_Bool LoadLibrary_ADABAS(OUString &_rPath);
|
||||||
|
|
||||||
// Connecting to a data source
|
// Connecting to a data source
|
||||||
|
Reference in New Issue
Block a user