summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-04-11 17:16:52 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-04-11 17:16:52 +0200
commitd4b8fe32f5763cd3c768aa939178c099b0bf7a19 (patch)
tree1a6f1a7225ac3fa590b853264842c399b3bd74c7 /connectivity
parent8755eb0274dc71acfc4d589e1fe5cefd34b77cec (diff)
Clean up function declarations and some unused functions
Change-Id: I4c63cd304908ce0e8ae3f9938d7323225dd314a5
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/commontools/TTableHelper.cxx8
-rw-r--r--connectivity/source/drivers/evoab2/NConnection.cxx25
-rw-r--r--connectivity/source/drivers/firebird/Services.cxx23
-rw-r--r--connectivity/source/drivers/hsqldb/HConnection.cxx27
-rw-r--r--connectivity/source/drivers/mysql/Yservices.cxx41
-rw-r--r--connectivity/source/drivers/odbc/ORealDriver.cxx1
-rw-r--r--connectivity/source/inc/odbc/OFunctions.hxx2
7 files changed, 6 insertions, 121 deletions
diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx
index 14454ab1570f..be7e9a135253 100644
--- a/connectivity/source/commontools/TTableHelper.cxx
+++ b/connectivity/source/commontools/TTableHelper.cxx
@@ -17,6 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <boost/noncopyable.hpp>
#include "connectivity/TTableHelper.hxx"
#include <com/sun/star/sdbc/XRow.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
typedef ::cppu::WeakImplHelper1 < XContainerListener > OTableContainerListener_BASE;
-class OTableContainerListener : public OTableContainerListener_BASE
+class OTableContainerListener:
+ public OTableContainerListener_BASE, private boost::noncopyable
{
OTableHelper* m_pComponent;
::std::map< OUString,bool> m_aRefNames;
- OTableContainerListener(const OTableContainerListener&);
- void operator =(const OTableContainerListener&);
protected:
virtual ~OTableContainerListener(){}
public:
diff --git a/connectivity/source/drivers/evoab2/NConnection.cxx b/connectivity/source/drivers/evoab2/NConnection.cxx
index fd522c0f0f88..67204db0f049 100644
--- a/connectivity/source/drivers/evoab2/NConnection.cxx
+++ b/connectivity/source/drivers/evoab2/NConnection.cxx
@@ -40,31 +40,6 @@ using namespace ::com::sun::star::sdbcx;
using namespace ::com::sun::star::sdbc;
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 )
:OSubComponent<OEvoabConnection, OConnection_BASE>( (::cppu::OWeakObject*)(&_rDriver), this )
,m_rDriver(_rDriver)
diff --git a/connectivity/source/drivers/firebird/Services.cxx b/connectivity/source/drivers/firebird/Services.cxx
index 883ff7b3fcd6..25fb67e4ea03 100644
--- a/connectivity/source/drivers/firebird/Services.cxx
+++ b/connectivity/source/drivers/firebird/Services.cxx
@@ -40,29 +40,6 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
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
{
Reference< XSingleServiceFactory > xRet;
diff --git a/connectivity/source/drivers/hsqldb/HConnection.cxx b/connectivity/source/drivers/hsqldb/HConnection.cxx
index aa2bc4af0643..70fc2529af3d 100644
--- a/connectivity/source/drivers/hsqldb/HConnection.cxx
+++ b/connectivity/source/drivers/hsqldb/HConnection.cxx
@@ -83,33 +83,6 @@ namespace GraphicColorMode = ::com::sun::star::graphic::GraphicColorMode;
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)
{
m_aFlushListeners.disposeAndClear( EventObject( *this ) );
diff --git a/connectivity/source/drivers/mysql/Yservices.cxx b/connectivity/source/drivers/mysql/Yservices.cxx
index 950418751a66..04a5da00bb42 100644
--- a/connectivity/source/drivers/mysql/Yservices.cxx
+++ b/connectivity/source/drivers/mysql/Yservices.cxx
@@ -35,47 +35,6 @@ typedef Reference< XSingleServiceFactory > (SAL_CALL *createFactoryFunc)
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(
const sal_Char* pImplementationName,
void* pServiceManager,
diff --git a/connectivity/source/drivers/odbc/ORealDriver.cxx b/connectivity/source/drivers/odbc/ORealDriver.cxx
index 3576ecbd3743..30d7bfd0699a 100644
--- a/connectivity/source/drivers/odbc/ORealDriver.cxx
+++ b/connectivity/source/drivers/odbc/ORealDriver.cxx
@@ -25,7 +25,6 @@
namespace connectivity
{
- sal_Bool LoadFunctions(oslModule pODBCso);
sal_Bool LoadLibrary_ODBC3(OUString &_rPath);
// extern declaration of the function pointer
extern T3SQLAllocHandle pODBC3SQLAllocHandle;
diff --git a/connectivity/source/inc/odbc/OFunctions.hxx b/connectivity/source/inc/odbc/OFunctions.hxx
index 239869f00b48..c6424f685069 100644
--- a/connectivity/source/inc/odbc/OFunctions.hxx
+++ b/connectivity/source/inc/odbc/OFunctions.hxx
@@ -28,7 +28,7 @@ namespace connectivity
{
// 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);
// Connecting to a data source